LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
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-10-2010, 12:52 AM   #16
pinga123
Member
 
Registered: Sep 2009
Posts: 676
Blog Entries: 2

Rep: Reputation: 36

End to End Installation of Tomcat is given in following blog.

Its better to use a service to start and stop the tomcat.

http://learnlinuxwithrohan.blogspot....h/label/Tomcat
 
Old 08-10-2010, 11:01 AM   #17
bhaumik
LQ Newbie
 
Registered: Aug 2010
Posts: 24

Original Poster
Rep: Reputation: 0
Start Tomcat Server Remotely

I tried, but getting same thing..

Tomcat is not starting
 
Old 08-10-2010, 12:34 PM   #18
bathory
Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 10,907

Rep: Reputation: 1326Reputation: 1326Reputation: 1326Reputation: 1326Reputation: 1326Reputation: 1326Reputation: 1326Reputation: 1326Reputation: 1326Reputation: 1326
What distro are you using?
Can you run other commands via ssh on the remote server? Like:
Code:
ssh -t remoteserver sudo ifconfig
Does the script works when run directly on the server? Make it executable and try to run it, to see what happens:
Code:
sudo chmod +x /opt/tomcat/6.0.29/apache-tomcat/bin/remote.sh
sudo /opt/tomcat/6.0.29/apache-tomcat/bin/remote.sh
If it runs locally, it should also run remotely.
 
Old 08-10-2010, 01:05 PM   #19
bhaumik
LQ Newbie
 
Registered: Aug 2010
Posts: 24

Original Poster
Rep: Reputation: 0
Start Tomcat Server Remotely

Hi..i tried

ssh -t remote server sudo if config is not working.

ssh -t remote server sudo ls -l it's working fine.

I think there is firewall or some other issue...i don't know..

But thanks a lot for helping me.... Let me know..is there any other i debug the problem
 
Old 08-10-2010, 03:05 PM   #20
bathory
Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 10,907

Rep: Reputation: 1326Reputation: 1326Reputation: 1326Reputation: 1326Reputation: 1326Reputation: 1326Reputation: 1326Reputation: 1326Reputation: 1326Reputation: 1326
It's not a firewall problem.
Quote:
ssh -t remote server sudo if config is not working.
ifconfig is one word not two (if config)

You didn't answer about your distro. If it's a Debian/Ubuntu could be Apparmor, if it's RHEL/Centos/Fedora could be SELinux
Looking at the logs in /var/log could give you a hist of what's happening.
Also you didn't answer if the script works locally, but I guess it does.
 
Old 08-11-2010, 12:10 AM   #21
pinga123
Member
 
Registered: Sep 2009
Posts: 676
Blog Entries: 2

Rep: Reputation: 36
Quote:
Originally Posted by bhaumik View Post
I tried, but getting same thing..

Tomcat is not starting
did you make a service named tomcat using the link i shared with you. I m pretty sure if you follow the step you will end up with Tomcat working remotely.
 
Old 08-12-2010, 11:16 AM   #22
bhaumik
LQ Newbie
 
Registered: Aug 2010
Posts: 24

Original Poster
Rep: Reputation: 0
Hi Bathory,

Local script is working fine. when I run ifconfig It's not working. I have linux box and I am not able to see log in server log file..like catalina.log

-Pingal123.... Can you please share link..I am not seeing any link here....
 
Old 08-12-2010, 12:44 PM   #23
bathory
Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 10,907

Rep: Reputation: 1326Reputation: 1326Reputation: 1326Reputation: 1326Reputation: 1326Reputation: 1326Reputation: 1326Reputation: 1326Reputation: 1326Reputation: 1326
Quote:
Local script is working fine. when I run ifconfig It's not working
What you mean that ifconfig is not working? You get an error from sudo, or what? Please try to be more specific, so we can help you.
Also you didn't mention the Linux distribution you're using.
Re: pinga's link, it's 4-5 posts before.

Anyway you can try to run tomcat using your username, so you won't need sudo. Log-in the server, become root and run:
Code:
chown -R bhaumik /opt/tomcat/6.0.29/apache-tomcat
Then logout and run from your host the ssh command without the sudo
Code:
ssh remoteserver /opt/tomcat/6.0.29/apache-tomcat/bin/remote.sh
and see if it works.
 
Old 08-13-2010, 02:36 AM   #24
pinga123
Member
 
Registered: Sep 2009
Posts: 676
Blog Entries: 2

Rep: Reputation: 36
Quote:
Originally Posted by bhaumik View Post
Hi Bathory,

Local script is working fine. when I run ifconfig It's not working. I have linux box and I am not able to see log in server log file..like catalina.log

-Pingal123.... Can you please share link..I am not seeing any link here....
http://learnlinuxwithrohan.blogspot....h/label/Tomcat
just copy paste it on browser.
 
Old 09-07-2010, 05:52 PM   #25
bhaumik
LQ Newbie
 
Registered: Aug 2010
Posts: 24

Original Poster
Rep: Reputation: 0
Hi

I tried to start tomcat remotely, It's not coming up. Locally it's seems working fine.

I tried command ssh remoteserver sh catalina.sh start and startup.sh

but It's not working.

Using CATALINA_BASE: /opt/tomcat/6.0.29/apache-tomcat-6.0.29
Using CATALINA_HOME: /opt/tomcat/6.0.29/apache-tomcat-6.0.29
Using CATALINA_TMPDIR: /opt/tomcat/6.0.29/apache-tomcat-6.0.29/temp
Using CATALINA_OUT: /opt/tomcat/6.0.29/apache-tomcat-6.0.29
Using JRE_HOME: /usr/java/jre-1.6.0-sun
Using CLASSPATH: /opt/tomcat/6.0.29/apache-tomcat-6.0.29/bin/bootstrap.jar

I am preassume when it's writing to catalina.log file it's creating some problem

"$_RUNJAVA" "$LOGGING_CONFIG" $JAVA_OPTS $CATALINA_OPTS \
-Djava.endorsed.dirs="$JAVA_ENDORSED_DIRS" -classpath "$CLASSPATH" \
-Djava.security.manager \
-Djava.security.policy=="$CATALINA_BASE"/conf/catalina.policy \
-Dcatalina.base="$CATALINA_BASE" \
-Dcatalina.home="$CATALINA_HOME" \
-Djava.io.tmpdir="$CATALINA_TMPDIR" \
org.apache.catalina.startup.Bootstrap "$@" start \
>> "$CATALINA_OUT" 2>&1 &
 
Old 09-07-2010, 05:53 PM   #26
bhaumik
LQ Newbie
 
Registered: Aug 2010
Posts: 24

Original Poster
Rep: Reputation: 0
I also want to mansion that..catalina run command is working fine
 
Old 09-07-2010, 06:37 PM   #27
joec@home
Member
 
Registered: Sep 2009
Location: Houston Tx
Posts: 89

Rep: Reputation: 29
You may have to install sshpass as it is not all too common to be installed by default.

Code:
PASSWORD="put root password here"

SERVER="put server address here"

echo "put what ever command you want to run remotely here" | sshpass -p`echo $PASSWORD` ssh root@$SERVER bash
 
Old 09-19-2010, 01:50 PM   #28
bhaumik
LQ Newbie
 
Registered: Aug 2010
Posts: 24

Original Poster
Rep: Reputation: 0
Wink Start Tomcat Server Remotely

I applied no hub command in catalina.sh ..start...now it's working fine

that's thread issue..when thread try to write in file...at there is some issue...

Thanks a lot for your help

Regards,
Bhaumik
 
Old 09-21-2010, 02:39 AM   #29
pinga123
Member
 
Registered: Sep 2009
Posts: 676
Blog Entries: 2

Rep: Reputation: 36
Nice to see your problem is solved.
 
Old 06-26-2014, 11:01 AM   #30
prassawant
LQ Newbie
 
Registered: Jun 2014
Posts: 2

Rep: Reputation: Disabled
catlina.sh

Quote:
Originally Posted by bhaumik View Post
I applied no hub command in catalina.sh ..start...now it's working fine

that's thread issue..when thread try to write in file...at there is some issue...

Thanks a lot for your help

Regards,
Bhaumik
Hi Bhaumik
can you please give me exact syntax which you added in catalina.sh , I am facing same issue
 
  


Reply

Tags
remote, start, tomcat6


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
tomcat hang when start with "service tomcat start" zcwlinux Linux - Server 2 07-03-2009 10:45 AM
How to make Tomcat 4.0.1 and Tomcat 5.0.28 coexist in one server? g18397 Linux - Software 0 05-16-2006 03:16 AM
start X remotely blas Linux - General 1 09-21-2005 05:14 AM
How can I start X remotely? kleptophobiac Linux - Software 1 08-06-2003 09:16 PM
tomcat on start up mikeshn Linux - Software 1 09-02-2002 11:35 AM


All times are GMT -5. The time now is 06:48 PM.

Main Menu
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