LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices



Reply
 
Search this Thread
Old 10-11-2004, 04:10 AM   #1
KaminariJ
LQ Newbie
 
Registered: Oct 2004
Location: Netherlands - Amsterdam
Distribution: Debian Woody
Posts: 4

Rep: Reputation: 0
Unhappy Debian - Problems autostart Tomcat 4.1.30 on boot


I am trying to autostart Tomcat webserver 4.1.30 on boottime (Debian Woody distro), but it just won't start? It does start when I start it manually...

I have created a bootscript 'tomcat4' in /etc/init.d:

Code:
                
# Setup JAVA_HOME
PATH=/usr/java/j2sdk1.4.2_05/bin:$PATH:$HOME/bin:./
export PATH
export JAVA_HOME=/usr/java/j2sdk1.4.2_05
export CLASSPATH=/usr/java/j2sdk1.4.2_05/jdk/lib/tools.jar:/usr/java/j2sdk1.4.2_05/jre/lib/rt.jar:./

# Start Tomcat4
sh /var/tomcat4/bin/startup.sh start
Next, I added the symlinks to rc?.d:

Code:
update-rc.d tomcat4 start 20 2 3 4 5  . stop 20 0 1 6 .
When I reboot, Tomcat doesn't autostart? Can anybody tell me what mistake I make? Do I forget something? Thanks for any help!
 
Old 10-12-2004, 04:15 AM   #2
KaminariJ
LQ Newbie
 
Registered: Oct 2004
Location: Netherlands - Amsterdam
Distribution: Debian Woody
Posts: 4

Original Poster
Rep: Reputation: 0
Is there nobody who can help me...
I've already searched the forums, but I can't find a solution...
Thanks!
 
Old 10-12-2004, 04:47 AM   #3
bathory
Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 10,973

Rep: Reputation: 1343Reputation: 1343Reputation: 1343Reputation: 1343Reputation: 1343Reputation: 1343Reputation: 1343Reputation: 1343Reputation: 1343Reputation: 1343
Quote:
It does start when I start it manually...
Check the environment of the user (root?) that starts the program manually. If I remember well you need to define another env. variable:
CATALINA_HOME=/path/to/tomcat
My guess is that the user has this variable set. Also take a look at /var/log/messages and tomcat logs to find out what the problem is.
Regards
 
Old 10-12-2004, 08:47 AM   #4
KaminariJ
LQ Newbie
 
Registered: Oct 2004
Location: Netherlands - Amsterdam
Distribution: Debian Woody
Posts: 4

Original Poster
Rep: Reputation: 0
Bathory, when I startup Tomcat manually (./startup.sh) the following env. variables will be set automaticly:
Code:
CATALINA_BASE:   /var/tomcat4
CATALINA_HOME:   /var/tomcat4
CATALINA_TMPDIR: /var/tomcat4/temp
JAVA_HOME:       /usr/java/j2sdk1.4.2_05
So, including CATALINA_HOME...

There is nothing I can find in the logs... There are no errors generated? Tomcat simply doesn't do anything on boot?? I think the problem is somewhere in de symlinks or something??
 
Old 10-12-2004, 09:10 AM   #5
bathory
Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 10,973

Rep: Reputation: 1343Reputation: 1343Reputation: 1343Reputation: 1343Reputation: 1343Reputation: 1343Reputation: 1343Reputation: 1343Reputation: 1343Reputation: 1343
What happens when you run the tomcat4 init script manually?
AFAIK it's the catalina.sh script (that is called from startup.sh) that defines those variables. And btw
Quote:
sh /var/tomcat4/bin/startup.sh start
you don't need that last "start" word
 
Old 10-13-2004, 08:25 AM   #6
KaminariJ
LQ Newbie
 
Registered: Oct 2004
Location: Netherlands - Amsterdam
Distribution: Debian Woody
Posts: 4

Original Poster
Rep: Reputation: 0
Bathory, Thanks for your help! I've finally solved the problem!

As you suggested, I run the tomcat4 init script manually and there was the following silly error... permission denied... There were no execute rights assigned to the tomcat4 init file?! Shame on me!! I gave execute rights, rebooted and Tomcat did start perfectly!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
DEbian autostart?? Hargibi Linux - Software 2 04-19-2005 04:09 AM
debian autostart question (rc*) VertX Debian 1 03-11-2005 08:12 AM
Autostart in debian & psmouse VertX Debian 2 02-08-2005 04:24 AM
How to autostart tomcat? azure_ss Linux - Newbie 5 08-29-2002 01:24 PM
How to autostart tomcat? azure_ss Linux - General 1 08-28-2002 12:33 PM


All times are GMT -5. The time now is 10:55 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration