java
Java-Monitor Forum > Forum > JBoss Administration » error on /proc/self/fd
Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 10-06-2010, 02:16
purpleheart purpleheart is offline
Junior Member
 
Join Date: Jun 2010
Posts: 1
Default error on /proc/self/fd

Any ideas on this? This is on a FreeBSD system so no proc at all, would be /dev/fd/X (0-2). But I'm having a hard time figuring out why it would fail on or need fd at all?

21:02:36,809 INFO [Server] JBoss (MX MicroKernel) [4.2.0.GA (build: SVNTag=JBoss_4_2_0_GA date=200705111440)] Started in 16s:843ms
21:02:37,284 ERROR [STDERR] Jun 9, 2010 9:02:37 PM com.javamonitor.JavaMonitorCollector$CollectorDriv er run
SEVERE: This probe was hit by an unexpected exception: errno: 2 error: Unable to open directory /proc/self/fd

java.lang.InternalError: errno: 2 error: Unable to open directory /proc/self/fd

at com.sun.management.UnixOperatingSystem.getOpenFile DescriptorCount(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Native MethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.sun.jmx.mbeanserver.ConvertingMethod.invokeWit hOpenReturn(ConvertingMethod.java:167)
at com.sun.jmx.mbeanserver.MXBeanIntrospector.invokeM 2(MXBeanIntrospector.java:96)
at com.sun.jmx.mbeanserver.MXBeanIntrospector.invokeM 2(MXBeanIntrospector.java:33)
at com.sun.jmx.mbeanserver.MBeanIntrospector.invokeM( MBeanIntrospector.java:208)
at com.sun.jmx.mbeanserver.PerInterface.getAttribute( PerInterface.java:65)
at com.sun.jmx.mbeanserver.MBeanSupport.getAttribute( MBeanSupport.java:216)
at javax.management.StandardMBean.getAttribute(Standa rdMBean.java:358)
at org.jboss.mx.server.RawDynamicInvoker.getAttribute (RawDynamicInvoker.java:117)
at org.jboss.mx.server.MBeanServerImpl.getAttribute(M BeanServerImpl.java:556)
at com.javamonitor.JmxHelper.query(JmxHelper.java:210 )
at com.javamonitor.Collector.queryItems(Collector.jav a:205)
at com.javamonitor.Collector.push(Collector.java:106)
at com.javamonitor.JavaMonitorCollector$CollectorDriv er.run(JavaMonitorCollector.java:162)
at java.lang.Thread.run(Thread.java:619)
Reply With Quote
  #2  
Old 10-06-2010, 12:57
kjkoster kjkoster is offline
Forum Operator
 
Join Date: Jul 2008
Posts: 1,136
Default

Dear purpleheart,

Ah, a fellow FreeBSD user. :-)

JMX has a field named OpenFileDescriptorCount on the mbean named java.lang:type=OperatingSystem. Java-monitor queries that field because it is one of the typical things you run out of on a busy UNIX machine.

On FreeBSD, the JVM counts the open file descriptors simply by opening the list if file descriptors and counting how many entries there are. However, last time I looked, it used /dev/fd and not /proc. I just checked on FreeBSD 7.3 and that is the case.

You can try to remedy this by using these lines in your /etc/fstab:
Code:
proc                    /proc           procfs  rw              0       0
fdescfs                 /dev/fd         fdescfs rw              0       0
After that, mount them using "mount /proc; mount /dev/fd". Let me know if that fixes this, please.

What version of FreeBSD are you using and what version of Java, please?

Your problem also exposed a small bug in the Java-monitor probe. It should have caught this error and not dump it into your log file as it did. I have updated the probe to deal with this situation properly.

Can you please download the Java-monitor probe again? That should give you the fixed version and it should allow you to monitor your machine whether or not the file descriptor handling works or not.

Kees Jan
Reply With Quote
  #3  
Old 30-12-2011, 21:51
martinezwanda66 martinezwanda66 is offline
Junior Member
 
Join Date: Dec 2011
Posts: 1
Default error on /proc/self/fd

Perhaps the issue occurs because Java is started as one user then drops privileges and then later an attempt is made to access /proc/self/fd where self refers to root but as the lower privilege user it cannot read this path?
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump