Results 1 to 8 of 8

Thread: Problem with using tomcat startup/shutdown.sh

  1. #1
    Join Date
    Sep 2006
    Location
    England, UK
    Beans
    42
    Distro
    Ubuntu 8.10 Intrepid Ibex

    Angry Problem with using tomcat startup/shutdown.sh

    Hi,
    Is anyone able to offer some help with the following problem please?

    I have installed tomcat6 from synaptic and after viewing http://localhost:8080 it shows the "it works" screen and shows my catalina variables as being...

    CATALINA_HOME=/usr/share/tomcat6
    CATALINA_BASE=/var/lib/tomcat6

    ...however running the shutdown script gives the following error...

    Using CATALINA_BASE: /usr/share/tomcat6
    Using CATALINA_HOME: /usr/share/tomcat6

    Using CATALINA_TMPDIR: /usr/share/tomcat6/temp
    Using JRE_HOME: /usr
    21-Dec-2008 23:24:39 org.apache.catalina.startup.Catalina stopServer
    SEVERE: Catalina.stop:
    java.io.FileNotFoundException: /usr/share/tomcat6/conf/server.xml (No such file or directory)
    at java.io.FileInputStream.open(Native Method)
    at java.io.FileInputStream.<init>(FileInputStream.jav a:137)
    at org.apache.catalina.startup.Catalina.stopServer(Ca talina.java:407)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Native MethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:616)
    at org.apache.catalina.startup.Bootstrap.stopServer(B ootstrap.java:337)
    at org.apache.catalina.startup.Bootstrap.main(Bootstr ap.java:415)


    ...this shows the catalina base and home being the same. I'm not worried whether I have a seperate instance or not but have been unable to either find a way to change the CATALINA_BASE value to be what it should be or to change the installation so that it does not have the seperate instance.

    Any ideas and suggestions or pointers to a solution would be very gratefully received.
    ThinkPad T61

  2. #2
    Join Date
    Jan 2006
    Beans
    201

    Re: Problem with using tomcat startup/shutdown.sh

    Read this error here:

    java.io.FileNotFoundException: /usr/share/tomcat6/conf/server.xml (No such file or directory)
    Thats all you should need

  3. #3
    Join Date
    Sep 2006
    Location
    England, UK
    Beans
    42
    Distro
    Ubuntu 8.10 Intrepid Ibex

    Re: Problem with using tomcat startup/shutdown.sh

    Thankyou for your reply Drezard. Unfortunately I do already have the file and directory structure mentioned by the java exception, but it is present in the previously mentioned CATALINA_BASE=var/lib/tomcat6 directory whereas the actual value for C_BASE in the server instance is the same as CATALINA_HOME which is =usr/share/tomcat6.

    I suspect that your suggestion that I copy the folder/files over from one place to the other may solve this problem but as I don't know what other dependencies I may be affecting if I do this, I was hoping to alter the 'BASE value to be the 'correct' one mentioned by the server on its welcome page, which would presumably do the trick.

    Does anyone know how I can change such a variable please?
    ThinkPad T61

  4. #4
    Join Date
    Apr 2006
    Location
    UK
    Beans
    5
    Distro
    Dapper Drake Testing/

    Re: Problem with using tomcat startup/shutdown.sh

    I had the same problem, but using the new way to start/stop services introduced in Intrepid Ibex works nicely:


    $ sudo service tomcat6 stop
    * Stopping Tomcat servlet engine tomcat6 [ OK ]
    $ sudo service tomcat6 start
    * Starting Tomcat servlet engine tomcat6 [ OK ]
    $


    or of course the more traditional way:


    $ sudo /etc/init.d/tomcat6 stop
    * Stopping Tomcat servlet engine tomcat6 [ OK ]
    $ sudo /etc/init.d/tomcat6 start
    * Starting Tomcat servlet engine tomcat6 [ OK ]
    $

  5. #5
    Join Date
    May 2009
    Location
    New Delhi
    Beans
    372
    Distro
    Ubuntu 9.04 Jaunty Jackalope

    Re: Problem with using tomcat startup/shutdown.sh

    thanks a lot
    the method of starting up services worked for me

  6. #6
    Join Date
    Sep 2009
    Beans
    17

    Re: Problem with using tomcat startup/shutdown.sh

    This worked for me too. Thank you.

  7. #7
    Join Date
    Jan 2008
    Beans
    1

    Re: Problem with using tomcat startup/shutdown.sh

    Quote Originally Posted by wsfulton View Post
    I had the same problem, but using the new way to start/stop services introduced in Intrepid Ibex works nicely:


    $ sudo service tomcat6 stop
    * Stopping Tomcat servlet engine tomcat6 [ OK ]
    $ sudo service tomcat6 start
    * Starting Tomcat servlet engine tomcat6 [ OK ]
    $


    or of course the more traditional way:


    $ sudo /etc/init.d/tomcat6 stop
    * Stopping Tomcat servlet engine tomcat6 [ OK ]
    $ sudo /etc/init.d/tomcat6 start
    * Starting Tomcat servlet engine tomcat6 [ OK ]
    $
    Thanks, this worked.

  8. #8
    Join Date
    Mar 2011
    Beans
    1

    Re: Problem with using tomcat startup/shutdown.sh

    I spent a couple of hours searching for a fix and figure I'll post what I found here.

    Beware... Mgmnt type dusting off nonexistent skill; 6hours into creating a Ubuntu Virtualbox guest for webapp testing... in other words don't trust a thing I type.

    My hack fix was to create a link where tomcat wanted it to the existing server.xml file.
    - create a conf directory in /usr/share/tomcat6
    - create the link server.xml and point it to the existing /etc/tomcat6/server.xml

    That solved my start/stop with:
    - startup.sh
    - shutdown.sh
    - ./catalina.sh [run/stop]

    BUT.. I had a severe cannon find /usr/share/tomcat6/tmp... yup... 2nd manual hack, simply created that directory. All is well so far.
    -Paul

Bookmarks

Posting Permissions

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