Uploaded image for project: 'JBoss Web Server'
  1. JBoss Web Server
  2. JWS-514

RHEL6 RPM: tomcat wrapper script CLASSPATH error can cause a hang in the annotations scanning of deployments

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Critical
    • JWS 3.1.0 DR3
    • JWS 3.1.0 DR2
    • rpm, tomcat7, tomcat8
    • None
    • Hide

      1) yum install tomcat8-*
      2) echo "org.apache.tomcat.util.scan.StandardJarScanner.level = FINE" >> /usr/share/tomcat8/conf/logging.properties
      2) service tomcat8 start
      3) tail -n2 /var/log/tomcat8/catalina.out

      08-Sep-2016 10:31:44.307 FINE [localhost-startStop-1] org.apache.tomcat.util.scan.StandardJarScanner.scan Scanning JAR [file:/usr/share/java/tomcat8/] from classpath
      08-Sep-2016 10:31:44.312 FINE [localhost-startStop-1] org.apache.tomcat.util.scan.StandardJarScanner.scan Scanning JAR [file:/] from classpath
      

      and it just hangs there indefinitely. A stack trace shows recursion in the following:

      "localhost-startStop-1" #15 daemon prio=5 os_prio=0 tid=0x0000000000ca4000 nid=0x18ea runnable [0x00007f7774a73000]
         java.lang.Thread.State: RUNNABLE
              at java.io.UnixFileSystem.checkAccess(Native Method)
              at java.io.File.canRead(File.java:768)
              at org.apache.catalina.startup.ContextConfig.processAnnotationsFile(ContextConfig.java:1993)
              at org.apache.catalina.startup.ContextConfig.processAnnotationsFile(ContextConfig.java:1989)
              at org.apache.catalina.startup.ContextConfig.processAnnotationsFile(ContextConfig.java:1989)
              at org.apache.catalina.startup.ContextConfig.processAnnotationsFile(ContextConfig.java:1989)
              ....
      

      3) service tomcat8 start
      4) tail -n2 /var/log/tomcat8/catalina.out

      08-Sep-2016 10:31:44.307 FINE [localhost-startStop-1] org.apache.tomcat.util.scan.StandardJarScanner.scan Scanning JAR [file:/usr/share/java/tomcat8/] from classpath
      08-Sep-2016 10:31:44.312 FINE [localhost-startStop-1] org.apache.tomcat.util.scan.StandardJarScanner.scan Scanning JAR [file:/] from classpath
      

      and it just hangs there indefinitely. A stack trace shows recursion in the following:

      "localhost-startStop-1" #15 daemon prio=5 os_prio=0 tid=0x0000000000ca4000 nid=0x18ea runnable [0x00007f7774a73000]
         java.lang.Thread.State: RUNNABLE
              at java.io.UnixFileSystem.checkAccess(Native Method)
              at java.io.File.canRead(File.java:768)
              at org.apache.catalina.startup.ContextConfig.processAnnotationsFile(ContextConfig.java:1993)
              at org.apache.catalina.startup.ContextConfig.processAnnotationsFile(ContextConfig.java:1989)
              at org.apache.catalina.startup.ContextConfig.processAnnotationsFile(ContextConfig.java:1989)
              at org.apache.catalina.startup.ContextConfig.processAnnotationsFile(ContextConfig.java:1989)
              ....
      
      Show
      1) yum install tomcat8-* 2) echo "org.apache.tomcat.util.scan.StandardJarScanner.level = FINE" >> /usr/share/tomcat8/conf/logging.properties 2) service tomcat8 start 3) tail -n2 /var/log/tomcat8/catalina.out 08-Sep-2016 10:31:44.307 FINE [localhost-startStop-1] org.apache.tomcat.util.scan.StandardJarScanner.scan Scanning JAR [file:/usr/share/java/tomcat8/] from classpath 08-Sep-2016 10:31:44.312 FINE [localhost-startStop-1] org.apache.tomcat.util.scan.StandardJarScanner.scan Scanning JAR [file:/] from classpath and it just hangs there indefinitely. A stack trace shows recursion in the following: "localhost-startStop-1" #15 daemon prio=5 os_prio=0 tid=0x0000000000ca4000 nid=0x18ea runnable [0x00007f7774a73000] java.lang.Thread.State: RUNNABLE at java.io.UnixFileSystem.checkAccess(Native Method) at java.io.File.canRead(File.java:768) at org.apache.catalina.startup.ContextConfig.processAnnotationsFile(ContextConfig.java:1993) at org.apache.catalina.startup.ContextConfig.processAnnotationsFile(ContextConfig.java:1989) at org.apache.catalina.startup.ContextConfig.processAnnotationsFile(ContextConfig.java:1989) at org.apache.catalina.startup.ContextConfig.processAnnotationsFile(ContextConfig.java:1989) .... 3) service tomcat8 start 4) tail -n2 /var/log/tomcat8/catalina.out 08-Sep-2016 10:31:44.307 FINE [localhost-startStop-1] org.apache.tomcat.util.scan.StandardJarScanner.scan Scanning JAR [file:/usr/share/java/tomcat8/] from classpath 08-Sep-2016 10:31:44.312 FINE [localhost-startStop-1] org.apache.tomcat.util.scan.StandardJarScanner.scan Scanning JAR [file:/] from classpath and it just hangs there indefinitely. A stack trace shows recursion in the following: "localhost-startStop-1" #15 daemon prio=5 os_prio=0 tid=0x0000000000ca4000 nid=0x18ea runnable [0x00007f7774a73000] java.lang.Thread.State: RUNNABLE at java.io.UnixFileSystem.checkAccess(Native Method) at java.io.File.canRead(File.java:768) at org.apache.catalina.startup.ContextConfig.processAnnotationsFile(ContextConfig.java:1993) at org.apache.catalina.startup.ContextConfig.processAnnotationsFile(ContextConfig.java:1989) at org.apache.catalina.startup.ContextConfig.processAnnotationsFile(ContextConfig.java:1989) at org.apache.catalina.startup.ContextConfig.processAnnotationsFile(ContextConfig.java:1989) ....

    Description

      Starting tomcat in rhel-6 (systemv; this doesn't affect systemd) causes the classpath to have a leading ':':

      -classpath :/usr/share/tomcat7/bin/bootstrap.jar:/usr/share/tomcat7/bin/tomcat-juli.jar:/usr/share/tomcat7/bin/commons-daemon.jar
      

      This may cause an issue with tomcat8 deployment on some rhel systems which results in a hung start while tomcat scans the / directory contents for annotations. Further details can be found here https://bz.apache.org/bugzilla/show_bug.cgi?id=58766#c9.

      Attachments

        Activity

          People

            rhn-support-csutherl Coty Sutherland
            rhn-support-csutherl Coty Sutherland
            Jan Onderka Jan Onderka
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - 1 hour
                1h
                Remaining:
                Remaining Estimate - 1 hour
                1h
                Logged:
                Time Spent - Not Specified
                Not Specified