Projects tigase _server server-core Issues #571
CPU Temp Task causes FileNotFoundException (#571)
Closed
Daniel Wisnewski opened 9 years ago
Due Date
2015-10-08

CPU Temp Task throws following error when run.

2015-09-15 12:57:49.270 [scheduler_pool-8-thread-1-monitor]  CpuTempTask.checkCPUTemperature()  WARNING: Can't read file: /proc/acpi/thermal_zone/TZ01/temperature
java.io.FileNotFoundException: /proc/acpi/thermal_zone/TZ01/temperature (No such file or directory)
	at java.io.FileInputStream.open0(Native Method)
	at java.io.FileInputStream.open(FileInputStream.java:195)
	at java.io.FileInputStream.[init](FileInputStream.java:138)
	at java.io.FileInputStream.[init](FileInputStream.java:93)
	at java.io.FileReader.[init](FileReader.java:58)
	at tigase.monitor.tasks.CpuTempTask.checkCPUTemperature(CpuTempTask.java:77)
	at tigase.monitor.tasks.CpuTempTask.run(CpuTempTask.java:126)
	at tigase.monitor.tasks.AbstractConfigurableTimerTask$1.run(AbstractConfigurableTimerTask.java:23)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
	at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	at java.lang.Thread.run(Thread.java:745)
2015-09-15 12:57:59.270 [scheduler_pool-8-thread-1-monitor]  CpuTempTask.checkCPUTemperature()  WARNING: Can't read file: /proc/acpi/thermal_zone/TZ01/temperature
java.io.FileNotFoundException: /proc/acpi/thermal_zone/TZ01/temperature (No such file or directory)
	at java.io.FileInputStream.open0(Native Method)
	at java.io.FileInputStream.open(FileInputStream.java:195)
	at java.io.FileInputStream.[init](FileInputStream.java:138)
	at java.io.FileInputStream.[init](FileInputStream.java:93)
	at java.io.FileReader.[init](FileReader.java:58)
	at tigase.monitor.tasks.CpuTempTask.checkCPUTemperature(CpuTempTask.java:77)
	at tigase.monitor.tasks.CpuTempTask.run(CpuTempTask.java:126)
	at tigase.monitor.tasks.AbstractConfigurableTimerTask$1.run(AbstractConfigurableTimerTask.java:23)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
	at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	at java.lang.Thread.run(Thread.java:745)

Error repeats every 10 seconds (default temp read setting) and floods the log files, also eats resources with the errors. If we cant fix, perhaps recommend hiding this monitor task until it is repaired.

Bartosz Małkowski commented 9 years ago

It seems that on this machine kernel module to read temperature is not installed. At least in version compatible with Tigase.

Daniel Wisnewski commented 9 years ago

I will add some text in the documentation about this. I assume cpu-temp-task uses kernel from OS. Any recommended packages for linux for users to have installed prior?

Artur Hefczyc commented 9 years ago

Bartek, please update the monitor so it does not throw an exception to a log file. Instead, it should print an error or a warning to log entry that this monitor is not supported on this installation and it should disable itself to avoid filling logs with the same message over and over again.

Daniel Wisnewski commented 9 years ago

%bmalkow Any update to this?

Bartosz Małkowski commented 9 years ago

In case of file doesn't exists, warning to log (without stack trace) will be added, and task will be turned off.

Daniel Wisnewski commented 9 years ago

I can confirm this works, nice clean exit!

Closing Issue.

issue 1 of 1
Type
Bug
Priority
Normal
Assignee
RedmineID
3534
Version
tigase-server-7.1.0
Issue Votes (0)
Watchers (0)
Reference
tigase/_server/server-core#571
Please wait...
Page is in error, reload to recover