Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

exception while collecting data java.io.IOException: Read failed, file xyz not mapped for I/O #141

Closed
GoogleCodeExporter opened this issue Jun 21, 2015 · 2 comments

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?
1. Long time production application running 
2. Some "Out of disk space errors" 

What is the expected output? What do you see instead?

No warning and no 'empty' files, I can see this warnings, and referenced files 
are 0 length
ls -l 
-rw-r--r-- 1 tomcat users 0 2011-09-07 11:30 
temp/javamelody/_XYZ.xyz/http61d116e9f3af92c3c4e2a211cf5c80b3987ad0e6.rrd

21 Sep 2011 10:14:29 [javamelody] [] WARN  javamelody      - exception while 
collecting data
java.io.IOException: Read failed, file 
temp/javamelody/_xyz.xyz/http61d116e9f3af92c3c4e2a211cf5c80b3987ad0e6.rrd not 
mapped for I/O
        at org.jrobin.core.RrdNioBackend.read(RrdNioBackend.java:132)
 .................................

What version of the product are you using? On what application server, JDK,
operating system?
Using JavaMelody 1.26.0 
OS:     OS Linux unknown, amd64/64 (8 cores)
Java:   Java(TM) SE Runtime Environment, 1.6.0_23-b05
JVM:    Java HotSpot(TM) 64-Bit Server VM, 19.0-b09, mixed mode
Server:     Server Apache Tomcat/6.0.32 


Please provide any additional information below.

StackTrace:
21 Sep 2011 10:14:29 [javamelody] [] WARN  javamelody      - exception while 
collecting data
java.io.IOException: Read failed, file 
temp/javamelody/_xyz.xyz/http61d116e9f3af92c3c4e2a211cf5c80b3987ad0e6.rrd not 
mapped for I/O
        at org.jrobin.core.RrdNioBackend.read(RrdNioBackend.java:132)
        at org.jrobin.core.RrdBackend.readString(RrdBackend.java:258)
        at org.jrobin.core.RrdPrimitive.readString(RrdPrimitive.java:107)
        at org.jrobin.core.RrdString.get(RrdString.java:53)
        at org.jrobin.core.Header.isJRobinHeader(Header.java:199)
        at org.jrobin.core.Header.validateHeader(Header.java:203)
        at org.jrobin.core.RrdDb.<init>(RrdDb.java:233)
        at org.jrobin.core.RrdDb.<init>(RrdDb.java:203)
        at org.jrobin.core.RrdDb.<init>(RrdDb.java:266)
        at org.jrobin.core.RrdDbPool.requestRrdDb(RrdDbPool.java:103)
        at net.bull.javamelody.JRobin.addValue(JRobin.java:294)
        at net.bull.javamelody.Collector.collectCounterRequestData(Collector.java:619)
        at net.bull.javamelody.Collector.collectCounterRequestsAndErrorsData(Collector.java:579)
        at net.bull.javamelody.Collector.collectCounterData(Collector.java:556)
        at net.bull.javamelody.Collector.collect(Collector.java:267)
        at net.bull.javamelody.Collector.collectWithoutErrors(Collector.java:242)
        at net.bull.javamelody.Collector.collectLocalContextWithoutErrors(Collector.java:232)
        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 nico.go...@codeoscopic.com on 21 Sep 2011 at 10:17

@GoogleCodeExporter
Copy link
Author

Thanks for the issue.
Now, when javamelody opens a file which has a length of 0, it will recreate the 
file.
It is fixed and committed in trunk of svn (revision 2143) and ready for the 
next release (1.32).

If you want to try it, I have made a new build from the current trunk and it is 
available at:
http://javamelody.googlecode.com/files/javamelody-20110925.jar

Otherwise you could simply delete the 0 length files. The files will then be 
created correctly if you have enough space.

Original comment by evernat@free.fr on 25 Sep 2011 at 2:59

  • Changed state: Fixed

@GoogleCodeExporter
Copy link
Author

I have faced the same issue and the workaround resolved this issue. Command to 
delete 0 length RRD

find -maxdepth 1 -type f -size 0 -print0 | xargs -0 rm -f

I am going to upgrade javameloody to latest soon

Original comment by siva.b...@gmail.com on 30 May 2012 at 11:17

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant