Results 1 to 4 of 4

Thread: Tomcat fails to start

  1. #1

    Default Tomcat fails to start

    I installed tomcat. It's installed in /usr/share/tomcat directory. I am unable to start the tomcat server.
    on entering :
    "rctomcat start"
    i get the message :
    "redirecting to systemctl start tomcat"

    on checking the status ("rctomcat status")
    i get the following message :

    Checking for Tomcat (/usr/share/tomcat) unused
    tomcat.service - Apache Tomcat Web Application Container
    Loaded: loaded (/usr/lib/systemd/system/tomcat.service; disabled)
    Active: failed (Result: exit-code) since Wed, 2013-06-19 02:01:35 IST; 6s ago
    Process: 10538 ExecStop=/usr/sbin/tomcat-sysd stop (code=exited, status=1/FAILURE)
    Process: 10509 ExecStart=/usr/sbin/tomcat-sysd start (code=exited, status=1/FAILURE)
    CGroup: name=systemd:/system/tomcat.service

    Jun 19 02:01:35 Aditya.PC tomcat-sysd[10538]: at java.net.Socket.<init>(Unknown Source)
    Jun 19 02:01:35 Aditya.PC tomcat-sysd[10538]: at java.net.Socket.<init>(Unknown Source)
    Jun 19 02:01:35 Aditya.PC tomcat-sysd[10538]: at org.apache.catalina.startup.Catalin...9)
    Jun 19 02:01:35 Aditya.PC tomcat-sysd[10538]: at sun.reflect.NativeMethodAccessorImp...d)
    Jun 19 02:01:35 Aditya.PC tomcat-sysd[10538]: at sun.reflect.NativeMethodAccessorImp...e)
    Jun 19 02:01:35 Aditya.PC tomcat-sysd[10538]: at sun.reflect.DelegatingMethodAccesso...e)
    Jun 19 02:01:35 Aditya.PC tomcat-sysd[10538]: at java.lang.reflect.Method.invoke(Unk...e)
    Jun 19 02:01:35 Aditya.PC tomcat-sysd[10538]: at org.apache.catalina.startup.Bootstr...1)
    Jun 19 02:01:35 Aditya.PC tomcat-sysd[10538]: at org.apache.catalina.startup.Bootstr...8)
    Jun 19 02:01:35 Aditya.PC systemd[1]: Unit tomcat.service entered failed state

    i entered the command : "tomcat-sysd start"
    and i got the message :
    ERROR: one of CATALINA_BASE, CATALINA_HOME or CATALINA_TMPDIR is not defined
    use proper EnvironmentFile= in your .service file

    Where is this .service file present ? I checked the tomcat.conf file, but there all the three variables are defined as :
    # Where your tomcat installation lives
    CATALINA_HOME="/usr/share/tomcat"
    # where the given instance lives
    CATALINA_BASE="/usr/share/tomcat"
    # the temp dir of the instance
    CATALINA_TMPDIR="/var/cache/tomcat/temp"

    all have the correct path. Any suggestions ?

  2. #2
    Join Date
    Mar 2010
    Location
    Austin - Texas
    Posts
    10,140
    Blog Entries
    48

    Smile Re: Tomcat fails to start

    Sounds like a systemd thing. Why not learn more about working with systemd?

    SysdCmd - systemd Command Help/Config Editor - Blogs - openSUSE Forums

    To start with systemd, you would use this command (user the proper service file name):

    Code:
    systemctl start tomcat
    Thank You,
    My Blog: https://forums.opensuse.org/blogs/jdmcdaniel3/

    Software efficiency halves every 18 months, thus compensating for Moore's Law

    Its James again from Austin, Texas

  3. #3

    Default Re: Tomcat fails to start

    Quote Originally Posted by jdmcdaniel3 View Post
    Sounds like a systemd thing. Why not learn more about working with systemd?

    SysdCmd - systemd Command Help/Config Editor - Blogs - openSUSE Forums

    To start with systemd, you would use this command (user the proper service file name):

    Code:
    systemctl start tomcat
    Thank You,
    Thank you for replying
    I used "systemctl start tomcat" command
    but i got no output message.
    localhost still isn't working
    and on typing rctomcat status, i still get the above stated error message
    i checked the tomcat.service file (in /usr/lib/systemd/system)
    in that the EnvironmentFile has correct path in which the Catalina variables are defined and for execution it uses the same thing : tomcat-sysd start.

    i opened the tomcat-sysd file and defined the CATALINA variables in the file

    now, tomcat-sysd start doesn't give any error. But no output is show and localhost still doesn't work

  4. #4
    Join Date
    Mar 2010
    Location
    Austin - Texas
    Posts
    10,140
    Blog Entries
    48

    Smile Re: Tomcat fails to start

    Quote Originally Posted by adityap174 View Post
    Thank you for replying
    I used "systemctl start tomcat" command
    but i got no output message.
    localhost still isn't working
    and on typing rctomcat status, i still get the above stated error message
    i checked the tomcat.service file (in /usr/lib/systemd/system)
    in that the EnvironmentFile has correct path in which the Catalina variables are defined and for execution it uses the same thing : tomcat-sysd start.

    i opened the tomcat-sysd file and defined the CATALINA variables in the file

    now, tomcat-sysd start doesn't give any error. But no output is show and localhost still doesn't work
    I can only say I am not using tomcat and can't help much, but I have had other issues with systemd and some applications that have not been modified to work properly with systemd. For instance, the dkms package as installed from Packman repo does not work without creating a service file. Here is one such way I made an application work:

    DKMS & systemd - How to get Dynamic Kernel Module Support to work in openSUSE 12.1 - Blogs - openSUSE Forums

    It basically meant I moved the startup bash script from /etc/init.d and created a proper service file for it and it then worked OK. One could take the same approach with tomcat, to see if it would help.

    Thank You,
    My Blog: https://forums.opensuse.org/blogs/jdmcdaniel3/

    Software efficiency halves every 18 months, thus compensating for Moore's Law

    Its James again from Austin, Texas

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •