View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0006076 | SymmetricDS | Bug | public | 2023-11-01 12:38 | 2024-06-12 13:05 |
Reporter | emiller | Assigned To | emiller | ||
Priority | normal | ||||
Status | closed | Resolution | fixed | ||
Product Version | 3.14.10 | ||||
Target Version | 3.14.11 | Fixed in Version | 3.14.11 | ||
Summary | 0006076: Protect against exceptions in CPU monitor | ||||
Description | It's possible for the CPU monitor to encounter a NullPointerException or an IndexOutOfBoundsException if the command to get the CPU usage doesn't behave as expected. It would be better to fall back to the old method of obtaining CPU usage than to throw an exception. Also, for Windows, the full path to powershell.exe should be specified to prevent the following errors: 2023-11-01 10:36:09 [INFO ] [java ] Cannot run program "powershell": CreateProcess error=2, The system cannot find the file specified 2023-11-01 10:36:09 [INFO ] [java ] java.io.IOException: Cannot run program "powershell": CreateProcess error=2, The system cannot find the file specified 2023-11-01 10:36:09 [INFO ] [java ] at java.lang.ProcessBuilder.start(Unknown Source) 2023-11-01 10:36:09 [INFO ] [java ] at org.jumpmind.symmetric.monitor.MonitorTypeCpu.runCommand(MonitorTypeCpu.java:149) 2023-11-01 10:36:09 [INFO ] [java ] at org.jumpmind.symmetric.monitor.MonitorTypeCpu.getCpuUsage(MonitorTypeCpu.java:78) 2023-11-01 10:36:09 [INFO ] [java ] at org.jumpmind.symmetric.monitor.MonitorTypeCpu.check(MonitorTypeCpu.java:67) 2023-11-01 10:36:09 [INFO ] [java ] at org.jumpmind.symmetric.service.impl.MonitorService.updateMonitor(MonitorService.java:187) 2023-11-01 10:36:09 [INFO ] [java ] at org.jumpmind.symmetric.service.impl.MonitorService.update(MonitorService.java:121) 2023-11-01 10:36:09 [INFO ] [java ] at org.jumpmind.symmetric.job.MonitorJob.doJob(MonitorJob.java:44) 2023-11-01 10:36:09 [INFO ] [java ] at org.jumpmind.symmetric.job.AbstractJob.invoke(AbstractJob.java:200) 2023-11-01 10:36:09 [INFO ] [java ] at org.jumpmind.symmetric.job.AbstractJob.run(AbstractJob.java:266) 2023-11-01 10:36:09 [INFO ] [java ] at org.springframework.scheduling.support.DelegatingErrorHandlingRunnable.run(DelegatingErrorHandlingRunnable.java:54) 2023-11-01 10:36:09 [INFO ] [java ] at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) 2023-11-01 10:36:09 [INFO ] [java ] at java.util.concurrent.FutureTask.runAndReset(Unknown Source) 2023-11-01 10:36:09 [INFO ] [java ] at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(Unknown Source) 2023-11-01 10:36:09 [INFO ] [java ] at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown Source) 2023-11-01 10:36:09 [INFO ] [java ] at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) 2023-11-01 10:36:09 [INFO ] [java ] at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) 2023-11-01 10:36:09 [INFO ] [java ] at java.lang.Thread.run(Unknown Source) 2023-11-01 10:36:09 [INFO ] [java ] Caused by: java.io.IOException: CreateProcess error=2, The system cannot find the file specified 2023-11-01 10:36:09 [INFO ] [java ] at java.lang.ProcessImpl.create(Native Method) 2023-11-01 10:36:09 [INFO ] [java ] at java.lang.ProcessImpl.<init>(Unknown Source) 2023-11-01 10:36:09 [INFO ] [java ] at java.lang.ProcessImpl.start(Unknown Source) 2023-11-01 10:36:09 [INFO ] [java ] ... 17 more 2023-11-01 10:24:34,104 ERROR [server] [MonitorJob] [server-job-5] Exception while executing job 'Monitor' StackTraceKey.init [NullPointerException:2882032157] java.lang.NullPointerException at org.jumpmind.symmetric.monitor.MonitorTypeCpu.getCpuUsage(MonitorTypeCpu.java:81) at org.jumpmind.symmetric.monitor.MonitorTypeCpu.check(MonitorTypeCpu.java:67) at org.jumpmind.symmetric.service.impl.MonitorService.updateMonitor(MonitorService.java:187) at org.jumpmind.symmetric.service.impl.MonitorService.update(MonitorService.java:121) at org.jumpmind.symmetric.job.MonitorJob.doJob(MonitorJob.java:44) at org.jumpmind.symmetric.job.AbstractJob.invoke(AbstractJob.java:200) at org.jumpmind.symmetric.job.AbstractJob.run(AbstractJob.java:266) at org.springframework.scheduling.support.DelegatingErrorHandlingRunnable.run(DelegatingErrorHandlingRunnable.java:54) at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) at java.util.concurrent.FutureTask.runAndReset(Unknown Source) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(Unknown Source) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown Source) at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Unknown Source) | ||||
Tags | monitoring | ||||
Date Modified | Username | Field | Change |
---|---|---|---|
2023-11-01 12:38 | emiller | New Issue | |
2023-11-01 12:38 | emiller | Status | new => assigned |
2023-11-01 12:38 | emiller | Assigned To | => emiller |
2023-11-01 12:38 | emiller | Tag Attached: monitoring | |
2023-11-01 12:39 | emiller | Relationship added | related to 0006077 |
2023-11-01 12:53 | emiller | Status | assigned => resolved |
2023-11-01 12:53 | emiller | Resolution | open => fixed |
2023-11-01 12:53 | emiller | Fixed in Version | => 3.14.11 |
2023-11-01 13:00 | Changeset attached | => SymmetricDS 3.14 b4c4fe52 | |
2023-12-16 01:56 | admin | Status | resolved => closed |
2024-06-12 12:59 | pmarzullo | Relationship added | related to 0006489 |
2024-06-12 13:05 | pmarzullo | Relationship deleted | related to 0006489 |