LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 08-17-2004, 01:09 PM   #1
Greenman
Member
 
Registered: Jan 2003
Posts: 34

Rep: Reputation: 15
Question rc.local not starting my application


Hi,

I am trying to startup tomcat automatically by placing in my rc.local but it is not running.

I have tried the following to no avail.

./var/www/jakarta-tomcat-5.0.27/bin/startup.sh
/var/www/jakarta-tomcat-5.0.27/bin/./startup.sh


Any ideas folks?



G
 
Old 08-17-2004, 02:06 PM   #2
trey85stang
Senior Member
 
Registered: Sep 2003
Posts: 1,091

Rep: Reputation: 41
Re: rc.local not starting my application

Quote:
Originally posted by Greenman
Hi,

I am trying to startup tomcat automatically by placing in my rc.local but it is not running.

I have tried the following to no avail.

./var/www/jakarta-tomcat-5.0.27/bin/startup.sh
/var/www/jakarta-tomcat-5.0.27/bin/./startup.sh


Any ideas folks?



G
try


sh /var/www/jakarta-tomcat-5.0.27/bin/startup.sh
 
Old 08-17-2004, 02:21 PM   #3
masand
LQ Guru
 
Registered: May 2003
Location: INDIA
Distribution: Ubuntu, Solaris,CentOS
Posts: 5,522

Rep: Reputation: 58
hi

could u post up ur script here which u put in rc.local
also is ur script executable

regards
gaurav
 
Old 08-17-2004, 02:49 PM   #4
Greenman
Member
 
Registered: Jan 2003
Posts: 34

Original Poster
Rep: Reputation: 15
Hi Guys,

Here you go, the cat is not purring yet


Ta


G

#!/bin/sh
#
# This script will be executed *after* all the other init scripts.
# You can put your own initialization stuff in here if you don't
# want to do the full Sys V style init stuff.

touch /var/lock/subsys/local

#echo "Starting up Tomcat"
#/var/www/jakarta-tomcat-5.0.27/bin/./startup.sh
sh /var/www/jakarta-tomcat-5.0.27/bin/startup.sh

(it will run either of these commands fine if I type it in manually?)

Last edited by Greenman; 08-17-2004 at 02:51 PM.
 
Old 08-17-2004, 02:52 PM   #5
stickman
Senior Member
 
Registered: Sep 2002
Location: Nashville, TN
Posts: 1,552

Rep: Reputation: 53
Do you happen to have all of your environment variables set like JAVA_HOME? You'll need to set them in your script.

Last edited by stickman; 08-17-2004 at 02:54 PM.
 
Old 08-17-2004, 03:02 PM   #6
Greenman
Member
 
Registered: Jan 2003
Posts: 34

Original Poster
Rep: Reputation: 15
Hi stickman

Yeah I have all the exports set once the Server boots up I can run

/var/www/jakarta-tomcat-5.0.27/bin/./startup.sh

And tomcat starts up fine, it just wont start automatically form rc.local very strange?

I have inserted a line
touch /var/www/testing123 and it did create my testing123 file so it is running

can I put a pause in this script so I can see what is happening on boot?

Thanks for you help

G
 
Old 08-17-2004, 03:13 PM   #7
masand
LQ Guru
 
Registered: May 2003
Location: INDIA
Distribution: Ubuntu, Solaris,CentOS
Posts: 5,522

Rep: Reputation: 58
hi

is ur script executable

see the attributes asociated with it
with
ls -la

see if it has 'x' attribute

regards
gaurav
 
Old 08-17-2004, 03:36 PM   #8
trey85stang
Senior Member
 
Registered: Sep 2003
Posts: 1,091

Rep: Reputation: 41
try this and see if you get any errors....

sh /var/www/jakarta-tomcat-5.0.27/bin/startup.sh > /root/tomcatoutput.txt

This will put the output into the tomcatoutput.txt file..you can look at it after you boot....
 
Old 08-17-2004, 03:43 PM   #9
stickman
Senior Member
 
Registered: Sep 2002
Location: Nashville, TN
Posts: 1,552

Rep: Reputation: 53
Quote:
Originally posted by Greenman
Hi stickman
Yeah I have all the exports set once the Server boots up I can run
/var/www/jakarta-tomcat-5.0.27/bin/./startup.sh
And tomcat starts up fine, it just wont start automatically form rc.local very strange?
Yes, I realize that you can run them manually after the server is started, but do you have JAVA_HOME defined in the scripts? rc.local doesn't know anything about your login environment and what variables are set, and the default startup.sh makes guesses about where java is. Your script is running, but it's probably dying because it needs a full path to something (probably java). Put something like the following in your startup.sh:
echo $JAVA_HOME
which java

When you restart your system, you should see the JAVA_HOME and the java path scroll by.

Last edited by stickman; 08-17-2004 at 03:47 PM.
 
Old 08-17-2004, 04:17 PM   #10
marsques
Member
 
Registered: Jan 2004
Location: Manchester
Distribution: slackware...
Posts: 344

Rep: Reputation: 31
how would i make a program auto start in x-windows?

thanks...
 
Old 08-17-2004, 04:31 PM   #11
masand
LQ Guru
 
Registered: May 2003
Location: INDIA
Distribution: Ubuntu, Solaris,CentOS
Posts: 5,522

Rep: Reputation: 58
Quote:
Originally posted by marsques
how would i make a program auto start in x-windows?

thanks...

when do u want to start the program automatically in X windows
pls elaborate

regards
 
Old 08-17-2004, 04:35 PM   #12
marsques
Member
 
Registered: Jan 2004
Location: Manchester
Distribution: slackware...
Posts: 344

Rep: Reputation: 31
after X-windows has stopped loading what ever it loads by default...
 
  


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
starting X application remotely spidy_123 Linux - Networking 2 10-19-2005 06:45 AM
Starting an application on X by console tiagomadeira Programming 1 01-09-2005 08:20 AM
Starting an application on X by console tiagomadeira Linux - Software 4 01-09-2005 07:53 AM
Starting an application at boot ftwomey Linux - Newbie 3 04-25-2004 08:07 AM
kde starting application !!! Juventino Programming 14 03-09-2004 05:09 PM


All times are GMT -5. The time now is 10:36 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration