Hi,
I spotted the problem.
When tomcat is being started, it is connected to a tty (console at startup)
At the
end of the bootsequence every service connected to the console is being
killed.

When I add an entry to the inittab file, tomcat stays running, but this is
not really the way I want to
solve this. Only when no other option is left.

Does anyone know a way to start Tomcat with no connection to a tty?
Redirection of
I/O doesn't do the trick. I tested with: tomcat.sh start </dev/null >
/dev/null 2>&1

Jan

-----Original Message-----
From: David Bussenschutt [mailto:[EMAIL PROTECTED]]
Sent: dinsdag 12 december 2000 0:50
To: [EMAIL PROTECTED]
Subject: RE: Tomcat Unix autostart


I tried starting tomcat before apache. I see the startupscript
>being executed, but tomcat doesn't start.
>Has anybody working Unix startupscripts for Tomcat?

>Tomcat should start  after Apache during reboot. Also remember to set your 
>classpath in the startup script.

>>I'm trying to start Tomcat whith rebooting a Unix machine.
>>Tomcat seems to start for a moment and then dissappears.
>>I have a startup script in /sbin/rc3.d

My Install on solaris:  (with tomcat installed into /opt/tomcat)

/etc/init.d/tomcat:
-------------8<---------cut-here---------------8<---------------
#!/bin/sh
CLASSPATH=/enter/your/classpath/here
export CLASSPATH
/opt/tomcat/bin/tomcat.sh $@    # run as root
# su nobody -c "/opt/tomcat/bin/tomcat.sh $@"  # or run as nobody
-------------8<---------cut-here---------------8<---------------

and:
cd /etc/rc2.d/
ln -s ../init.d/tomcat S95tomcat
cd /etc/rc1.d/
ln -s ../init.d/tomcat K25tomcat

Note that if you use the auto-include mod_jk or mod_jserv files in the
apache httpd.conf file, then you should start tomcat BEFORE apache,
otherwise
you'll always be reading the old version of the gererated configuration
file, if you don't use the auto-generated one, it doesn't really matter
which order you start them in.

In my case, APACHE is started/stopped with the symbolic links of S99apache
and K25apache, so that (95<99) tomcat always starts first, and (25=25)
always gets stopped at the same time.


Another just as acceptable method would be to just add the tomcat startup
command to the apache start-up script....

edit the /etc/init.d/apache (or equivalent - maybe apache.server or
apachectl)

and right after the line:
        start)
add:
        /opt/tomcat/bin/startup.sh
and right after the line:
        stop)
add:
        /opt/tomcat/bin/shutdown.sh


In both these cases, the script that eventually gets called is always
/opt/tomcat/bin/tomcat.sh , and you need to make sure that when you run
that script manually (with option of 'start') it doesn't actually gererate
any errors.    To be on the safe side, I added two lines to that script (at
the top before any real code) that defined the TOMCAT_HOME and JAVA_HOME
environment variables:

TOMCAT_HOME=/opt/tomcat ; export TOMCAT_HOME
JAVA_HOME=/usr/java ; export JAVA_HOME

Note that in many cases this isn't really necessary as the tomcat.sh script
is fairly good at figuring them out, but I like to play it safe.

Hope this helps someone.

David.



At 10:08 AM 12/11/00 +0100, you wrote:
>Hi,
>>>
>>Regards,
>>Jan Stevens
>>Software Developer
>>CMG Maastricht B.V. -Telecom Products
>>*       Adelbert van Scharnlaan 170A            *       043 - 6018185
>>         6224 JX Maastricht                                      *
>043
>>- 6018169
>>*       mailto:[EMAIL PROTECTED]
>
>

--------------------------------------------------------------------
David Bussenschutt          Email: [EMAIL PROTECTED]
Senior Computing Support Officer & Systems Administrator/Programmer
Location: Griffith University. Information Technology Services
          Brisbane Qld. Aust.  (TEN bldg. rm 1.33) Ph: (07)38757079
--------------------------------------------------------------------

Reply via email to