Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

Tomcat failed to start properly

  • 07-11-2019 1:37pm
    #1
    Registered Users, Registered Users 2 Posts: 5,660 ✭✭✭


    Hi have any of you seen tomcat have issues starting up.

    spacewalk-setup
    * Setting up SELinux..
    ** Database: Setting up database connection for PostgreSQL backend.
    Database "rhnschema" already exists
    The embedded database appears to be already installed. Either rerun
    this script with the --skip-db-install option, or use the
    '/usr/bin/spacewalk-setup-postgresql remove --db rhnschema --user rhnuser'
    script to remove the embedded database and try again.
    [root@dub-svrfarm27 ~]# spacewalk-setup --skip-db-install
    * Setting up SELinux..
    ** Database: Setting up database connection for PostgreSQL backend.
    ** Database: Embedded database installation SKIPPED.
    ** Database: Populating database.
    The Database has schema. Would you like to clear the database [Y]? N
    ** Database: The database already has schema. Skipping database population.
    * Configuring tomcat.
    * Setting up users and groups.
    ** GPG: Initializing GPG and importing key.
    * Performing initial configuration.
    * Configuring apache SSL virtual host.
    Should setup configure apache's default ssl server for you (saves original ssl.conf) [Y]? Y
    * Configuring jabberd.
    * Creating SSL certificates.
    CA certificate password?
    You must enter a password.
    CA certificate password?
    Re-enter CA certificate password?
    Cname alias of the machine (comma seperated)?
    -snip-
    City? Dublin
    State? Ireland
    Country code (Examples: "US", "JP", "IN", or type "?" to see a list)? IE
    ** SSL: Generating CA certificate.
    ** SSL: Deploying CA certificate.
    ** SSL: Generating server certificate.
    ** SSL: Storing SSL certificates.
    * Deploying configuration files.
    * Update configuration in database.
    * Setting up Cobbler..
    Cobbler requires tftp and xinetd services be turned on for PXE provisioning functionality. Enable these services [Y]? Y
    * Restarting services.
    Tomcat failed to start properly or the installer ran out of tries. Please check /var/log/tomcat6/catalina.out or /var/log/tomcat/catalina.$(date +%Y-%m-%d).log for errors.


    Error inside logs says

    INFO: Starting service Catalina
    Nov 07, 2019 12:18:08 PM org.apache.catalina.core.StandardEngine startInternal
    INFO: Starting Servlet Engine: Apache Tomcat/7.0.76
    Nov 07, 2019 12:18:08 PM org.apache.catalina.startup.HostConfig deployDescriptor
    INFO: Deploying configuration descriptor /etc/tomcat/Catalina/localhost/rhn.xml
    Nov 07, 2019 12:18:08 PM org.apache.catalina.loader.WebappLoader startInternal
    SEVERE: LifecycleException
    java.io.IOException: Failed to access resource /WEB-INF/lib/mchange-commons.jar
    at org.apache.catalina.loader.WebappLoader.setRepositories(WebappLoader.java:983)
    at org.apache.catalina.loader.WebappLoader.startInternal(WebappLoader.java:606)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
    at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5508)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
    at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:899)
    at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:875)
    at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:652)
    at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:679)
    at org.apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig.java:1966)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    at java.lang.Thread.run(Thread.java:748)
    Caused by: javax.naming.NameNotFoundException: Resource mchange-commons.jar not found
    at org.apache.naming.resources.BaseDirContext.lookup(BaseDirContext.java:481)
    at org.apache.catalina.loader.WebappLoader.setRepositories(WebappLoader.java:981)
    ... 14 more

    Nov 07, 2019 12:18:08 PM org.apache.catalina.core.ContainerBase addChildInternal
    SEVERE: ContainerBase.addChild: start:
    org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/rhn]]
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:162)
    at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:899)
    at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:875)
    at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:652)
    at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:679)
    at org.apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig.java:1966)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    at java.lang.Thread.run(Thread.java:748)
    Caused by: org.apache.catalina.LifecycleException: Failed to start component [WebappLoader[/rhn]]
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:162)
    at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5508)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
    ... 10 more
    Caused by: org.apache.catalina.LifecycleException: start:
    at org.apache.catalina.loader.WebappLoader.startInternal(WebappLoader.java:632)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
    ... 12 more
    Caused by: java.io.IOException: Failed to access resource /WEB-INF/lib/mchange-commons.jar
    at org.apache.catalina.loader.WebappLoader.setRepositories(WebappLoader.java:983)
    at org.apache.catalina.loader.WebappLoader.startInternal(WebappLoader.java:606)
    ... 13 more
    Caused by: javax.naming.NameNotFoundException: Resource mchange-commons.jar not found
    at org.apache.naming.resources.BaseDirContext.lookup(BaseDirContext.java:481)
    at org.apache.catalina.loader.WebappLoader.setRepositories(WebappLoader.java:981)
    ... 14 more

    Nov 07, 2019 12:18:08 PM org.apache.catalina.startup.HostConfig deployDescriptor
    SEVERE: Error deploying configuration descriptor /etc/tomcat/Catalina/localhost/rhn.xml
    java.lang.IllegalStateException: ContainerBase.addChild: start: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/rhn]]
    at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:903)
    at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:875)
    at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:652)
    at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:679)
    at org.apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig.java:1966)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    at java.lang.Thread.run(Thread.java:748)


Comments

  • Moderators, Computer Games Moderators Posts: 4,282 Mod ✭✭✭✭deconduo


    You'll need to look at those log files for the actual error messages:
    /var/log/tomcat6/catalina.out 
    /var/log/tomcat/catalina.*.log
    


  • Registered Users, Registered Users 2 Posts: 5,660 ✭✭✭veryangryman


    Apologies i meant to paste that prior. Ive edited post


  • Moderators, Technology & Internet Moderators Posts: 1,336 Mod ✭✭✭✭croo


    Was it running and just stopped or are you doing the initial install?
    If it was a new install I was going to say check permissions ... they might explain why it can't see the files it requires.

    Then I noticed "Setting up SELinux.." - unless it's a production machine I always disabled SELinux - it caused me no end of problems over the years! My lack of understanding of SElinux I'm sure but if it a dev setup then I just disabled it all!


  • Registered Users, Registered Users 2 Posts: 5,660 ✭✭✭veryangryman


    croo wrote: »
    Was it running and just stopped or are you doing the initial install?
    If it was a new install I was going to say check permissions ... they might explain why it can't see the files it requires.

    Then I noticed "Setting up SELinux.." - unless it's a production machine I always disabled SELinux - it caused me no end of problems over the years! My lack of understanding of SElinux I'm sure but if it a dev setup then I just disabled it all!

    Thanks for reply. Since its a system command as such, the "Setting up SELinux" i dont think can be skipped.

    Dont worry, i dont understand it either haha


  • Moderators, Sports Moderators, Regional Abroad Moderators Posts: 2,666 Mod ✭✭✭✭TrueDub


    java.io.IOException: Failed to access resource /WEB-INF/lib/mchange-commons.jar
    

    Looks like you're missing this required jar file.

    This isn't a Tomcat issue, as far as I can see - you're deploying something onto Tomcat, which is failing, or more likely you're deploying something that uses Tomcat to provide it's web interface.


  • Advertisement
  • Moderators, Technology & Internet Moderators Posts: 1,336 Mod ✭✭✭✭croo


    Thanks for reply. Since its a system command as such, the "Setting up SELinux" i dont think can be skipped.

    Dont worry, i dont understand it either haha
    No. I meant. Some distros like redhat/centos are SELinux compliant at install. But my preference was to disable it. Looks like Tomcat is seeing that SELinux is enabled and so setting up for that. Assuming the missing files are actually there [though TruDub is assuming nothing! :)], then it might be a permissions issue. that is, they files are there when "you" look but the tomcat server with its user/usergroup permissions cannot see them. Again if it's nota production machine I would disable SELinux!


  • Registered Users, Registered Users 2 Posts: 5,660 ✭✭✭veryangryman


    Gave the disable a try using steps from here

    No joy, still the Tomcat error message regarding restart.


  • Registered Users, Registered Users 2 Posts: 6,262 ✭✭✭Buford T Justice


    Like TrueDub Says, this appears to be the root of the issue - looks like some jar files are missing

    java.io.IOException: Failed to access resource /WEB-INF/lib/mchange-commons.jar
    ......
    Caused by: javax.naming.NameNotFoundException: Resource mchange-commons.jar not found


  • Registered Users, Registered Users 2 Posts: 5,660 ✭✭✭veryangryman


    Giving this another bump

    https://stackoverflow.com/questions/59029461/severe-error-deploying-configuration-descriptor-etc-tomcat-catalina-localhost

    Just a thought.... the way it is mentioning the rnh file, here is its content
    cat /etc/tomcat/Catalina/localhost/rhn.xml
    <!--
      This is a Tomcat 5.5 Context file.  For more information see:
        http://jakarta.apache.org/tomcat/tomcat-5.5-doc/config/context.html
    
      path - is the url path you specify after http://hostname:8080/.  To
        take over the root, you leave it empty.
    
      docBase - should the fully qualified path where your
        rhnwebapp is located.
        i.e. /home/devel/username/rhn-java/rhnwebapp
    
      reloadable - indicates to Tomcat that the webapp should be reloaded
        when a change occurs.
    
      allowLinking - true to allow Tomcat to follow symlinks.
    -->
    
    <Context path="/rhn" reloadable="false" override="true" allowLinking="true">
    </Context>
    


Advertisement