LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
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 05-16-2006, 06:07 AM   #1
jbj
LQ Newbie
 
Registered: Nov 2002
Posts: 10

Rep: Reputation: 0
Tomcat boot problem


Hello,

I can't get Tomcat 5.0.30-6 to boot on Suse 10.1. According to /var/log/start.log, it can't find java:


No JAVA_HOME specified in @@@TCCONF@@@/tomcat5.conf and no java found, exiting...

I have created a /etc/profile.local file with

export JAVA_HOME=/usr/lib/jvm/java-1.5.0-sun-1.5.0_06
export PATH=$PATH:$JAVA_HOME/bin/
export TOMCAT_HOME=/usr/share/tomcat5
export CATALINA_HOME=/usr/share/tomcat5

Starting Tomcat manually works, the start.log states:

Using CATALINA_BASE: /usr/share/tomcat5
Using CATALINA_HOME: /usr/share/tomcat5
Using CATALINA_TMPDIR: /usr/share/tomcat5/temp
Using JAVA_HOME: /usr/lib/jvm/java-1.5.0-sun-1.5.0_06
/usr/share/tomcat5/bin/catalina.sh: line 284: /var/run/tomcat5.pid: Permission denied

The tomcat-admin application seems to have problems in the 5.0.30 distribution - it threw an exception on startup.

My Linux setup is very standard - a fresh install with only a few standard packages added.

Jonas
 
Old 05-16-2006, 06:57 AM   #2
gilead
Senior Member
 
Registered: Dec 2005
Location: Brisbane, Australia
Distribution: Slackware64 14.0
Posts: 4,141

Rep: Reputation: 168Reputation: 168
The environment used when running scripts at startup does not have the same environment variables available that your user account does when you log in. I use a wrapper script for starting Tomcat (/usr/local/bin/start-tomcat.sh) with the following contents:
Code:
#!/bin/bash

export CATALINA_BASE=/usr/local/jakarta-tomcat
export CATALINA_HOME=/usr/local/jakarta-tomcat
export JAVA_HOME=/usr/local/jdk

/usr/local/jakarta-tomcat/bin/startup.sh
That script is called by the startup script /etc/rc.d/rc.tomcat with:
Code:
/bin/su - jakarta -c /usr/local/bin/start-tomcat.sh
Hope that helps...
 
Old 05-16-2006, 10:53 AM   #3
jbj
LQ Newbie
 
Registered: Nov 2002
Posts: 10

Original Poster
Rep: Reputation: 0
nope, didn't work

Thanks for the reply,

Unfortunately your suggestion did not work. From what I understand, creating a profile.local should work, since it is the first user-editable configuration file in the boot sequence.

Jonas
 
Old 05-16-2006, 02:57 PM   #4
gilead
Senior Member
 
Registered: Dec 2005
Location: Brisbane, Australia
Distribution: Slackware64 14.0
Posts: 4,141

Rep: Reputation: 168Reputation: 168
That's odd, since it's the other way around. That setup does work on both of the boxes I have running Tomcat and the /etc/profile files should only be read during login (not bootup). Can you tell me what error you get and how you invoked the /bin/su - jakarta -c /usr/local/bin/start-tomcat.sh command? Do you have a jakarta user as that command implies?
 
Old 05-16-2006, 03:10 PM   #5
LanRx
Member
 
Registered: Jul 2004
Posts: 85

Rep: Reputation: 15
Looks to me like you're attempting to write the pid file to a location that the user doesn't have appropriate file permissions to.

Quote:
/usr/share/tomcat5/bin/catalina.sh: line 284: /var/run/tomcat5.pid: Permission denied
 
Old 05-16-2006, 06:48 PM   #6
jbj
LQ Newbie
 
Registered: Nov 2002
Posts: 10

Original Poster
Rep: Reputation: 0
everything fails

Thanks for the suggestions,

Tomcat works when I start it manually getting only the "/var/run/tomcat5.pid: Permission denied" problem. It is caused by /var/run being owned by root rather than the 'tomcat' user that the SuSE rpm (downloaded from SUSE) uses.

I tried putting the JAVA_HOME in a .profile file in the 'tomcat' users home directory without success.

I have to give up on this now after wasting too many hours in installation hell. Thanks anyhow.

Jonas
 
  


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
How To Boot Tomcat After Apache maxhugen Linux - General 6 12-04-2005 09:16 PM
tomcat startup on boot malbery Linux - Software 3 01-27-2005 05:10 PM
Getting Tomcat to start on Boot Greenman Red Hat 5 11-22-2004 10:41 AM
Tomcat 4.1.30 boot init problem on 2.4.18-18 kernal - zeta111 Linux - Software 0 03-29-2004 11:55 AM
To have 'tomcat' up upon system boot up ... t0dd Linux - Software 1 03-10-2002 02:33 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 05:30 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
Open Source Consulting | Domain Registration