Uploaded image for project: 'Commons Daemon'
  1. Commons Daemon
  2. DAEMON-120

Unable to open directory /proc/self/fd

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 1.0.1
    • 1.0.2
    • None
    • None

    Description

      Hi,

      I recently switched to using JSVC to run Tomcat and encountered a strange problem. I eventually found a workaround and only just remembered to raise the issue here.

      Everything was working fine until I switched over to JSVC. All the other components mentioned in the environment field above stayed the same, I just introduced JSVC by editing catalina.sh to invoke JSVC like so:

        /usr/local/jsvc/jsvc                                                 \
          -user jira                                                         \
          -cp ./bin/bootstrap.jar                                            \
          -outfile "$CATALINA_BASE/logs/catalina.out"                        \
          -errfile "$CATALINA_BASE/logs/catalina.err"                        \
          $JAVA_OPTS $CATALINA_OPTS                                          \
          -Djava.endorsed.dirs="$JAVA_ENDORSED_DIRS" -classpath "$CLASSPATH" \
          -Dcatalina.base="$CATALINA_BASE"                                   \
          -Dcatalina.home="$CATALINA_HOME"                                   \
          -Djava.io.tmpdir="$CATALINA_TMPDIR"                                \
          org.apache.catalina.startup.Bootstrap "$@" start
      

      Once JIRA was running under JSVC I started seeing lots of these errors in the logs:

      20081103 140454,979 org.kjkoster.zapcat.zabbix.QueryHandler ERROR - dropping exception
      javax.management.RuntimeErrorException: java.lang.InternalError: errno: 13 error: Unable to open directory /proc/self/fd
      
              at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.rethrow(DefaultMBeanServerInterceptor.java:858)
              at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.rethrowMaybeMBeanException(DefaultMBeanServerInterceptor.java:869)
              at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.getAttribute(DefaultMBeanServerInterceptor.java:670)
              at com.sun.jmx.mbeanserver.JmxMBeanServer.getAttribute(JmxMBeanServer.java:638)
              at org.kjkoster.zapcat.zabbix.JMXHelper.query(JMXHelper.java:62)
              at org.kjkoster.zapcat.zabbix.QueryHandler.response(QueryHandler.java:127)
              at org.kjkoster.zapcat.zabbix.QueryHandler.handleQuery(QueryHandler.java:87)
              at org.kjkoster.zapcat.zabbix.QueryHandler.run(QueryHandler.java:70)
              at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
              at java.lang.Thread.run(Thread.java:619)
      

      After much investigation with the Zapcat author Kees Jan Koster we eventually realised I could just work around the problem by disaling this Zapcat provided Zabbix item:

      "jmx[java.lang:type=OperatingSystem][OpenFileDescriptorCount]"

      Any ideas?

      Cheers,

      Ximon

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              ximon.eighteen Ximon Eighteen
              Votes:
              2 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: