ShelleyZhang / javamelody

Automatically exported from code.google.com/p/javamelody
0 stars 0 forks source link

java.io.IOException: JavaMelody directory can't be created: /tmp/javamelody/javamelody_roach.corp.apple.com #115

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
I am getting the below exception. What could be wrong? Any solution, please 
suggest

06:37:32,283 WARN  [javamelody] exception while collecting data
java.io.IOException: JavaMelody directory can't be created: 
/tmp/javamelody/javamelody_roach.corp.apple.com
    at net.bull.javamelody.JRobin.init(JRobin.java:137)
    at net.bull.javamelody.JRobin.<init>(JRobin.java:80)
    at net.bull.javamelody.JRobin.createInstance(JRobin.java:127)
    at net.bull.javamelody.Collector.getCounterJRobin(Collector.java:696)
    at net.bull.javamelody.Collector.collectJRobinValues(Collector.java:395)
    at net.bull.javamelody.Collector.collectJavaInformations(Collector.java:337)
    at net.bull.javamelody.Collector.collect(Collector.java:257)
    at net.bull.javamelody.Collector.collectWithoutErrors(Collector.java:243)
    at net.bull.javamelody.Collector.collectLocalContextWithoutErrors(Collector.java:233)
    at net.bull.javamelody.FilterContext$CollectTimerTask.run(FilterContext.java:52)
    at java.util.TimerThread.mainLoop(Timer.java:512)
    at java.util.TimerThread.run(Timer.java:462)

Original issue reported on code.google.com by kirank...@gmail.com on 17 Jun 2011 at 6:39

GoogleCodeExporter commented 9 years ago
It seems that the temporary directory is "/tmp" and that the OS user running 
the application server does not have the permission to create the directory 
"/tmp/javamelody/javamelody_roach.corp.apple.com".

The solution is certainly to give the permission to the OS user to create this 
directory and to write files in there. Note that if you use jsvc to run the 
application server, then jsvc may change itself the OS user running the server; 
so you may check in this case what is the real OS user to give him the 
permissions.

Another solution could be to create the 
"/tmp/javamelody/javamelody_roach.corp.apple.com" yourself and then to give 
only the permission to read and write files in there.

This permission is needed because all monitoring data will be stored in this 
directory (which is configurable with the "storage-directory" parameter as said 
in the user guide).

Original comment by evernat@free.fr on 17 Jun 2011 at 8:15

GoogleCodeExporter commented 9 years ago
First time when i started it, everything was working fine. I mean I was not 
getting any exception and also i was getting the web page which shows graphs. 

But once i got "Out of Memory exception" from server, i started experiencing 
this problem. Even i created myself with the folder 
javamelody/javamelody_roach.corp.apple.com however result is that i got the 
same exception. 

I am running the server in remote host for which the operating system is Linux. 
So you mean to tell that i have to set the permissions in order to create a 
directory or what could be wrong?

Original comment by kirank...@gmail.com on 17 Jun 2011 at 9:47

GoogleCodeExporter commented 9 years ago
The suggested simple solution within 
http://code.google.com/p/javamelody/issues/detail?id=240 will most probably 
also fix this problem.

Original comment by mineral_...@gmx.de on 4 Sep 2012 at 4:16