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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
 |
|
08-10-2010, 11:01 AM
|
#17
|
|
LQ Newbie
Registered: Aug 2010
Posts: 24
Original Poster
Rep:
|
Start Tomcat Server Remotely
I tried, but getting same thing..
Tomcat is not starting
|
|
|
|
08-10-2010, 12:34 PM
|
#18
|
|
Guru
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 10,357
|
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.
|
|
|
|
08-10-2010, 01:05 PM
|
#19
|
|
LQ Newbie
Registered: Aug 2010
Posts: 24
Original Poster
Rep:
|
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
|
|
|
|
08-10-2010, 03:05 PM
|
#20
|
|
Guru
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 10,357
|
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.
|
|
|
|
08-11-2010, 12:10 AM
|
#21
|
|
Member
Registered: Sep 2009
Posts: 673
Rep:
|
Quote:
Originally Posted by bhaumik
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.
|
|
|
|
08-12-2010, 11:16 AM
|
#22
|
|
LQ Newbie
Registered: Aug 2010
Posts: 24
Original Poster
Rep:
|
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....
|
|
|
|
08-12-2010, 12:44 PM
|
#23
|
|
Guru
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 10,357
|
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.
|
|
|
|
08-13-2010, 02:36 AM
|
#24
|
|
Member
Registered: Sep 2009
Posts: 673
Rep:
|
Quote:
Originally Posted by bhaumik
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.
|
|
|
|
09-07-2010, 05:52 PM
|
#25
|
|
LQ Newbie
Registered: Aug 2010
Posts: 24
Original Poster
Rep:
|
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 &
|
|
|
|
09-07-2010, 05:53 PM
|
#26
|
|
LQ Newbie
Registered: Aug 2010
Posts: 24
Original Poster
Rep:
|
I also want to mansion that..catalina run command is working fine
|
|
|
|
09-07-2010, 06:37 PM
|
#27
|
|
Member
Registered: Sep 2009
Location: Houston Tx
Posts: 89
Rep:
|
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
|
|
|
|
09-19-2010, 01:50 PM
|
#28
|
|
LQ Newbie
Registered: Aug 2010
Posts: 24
Original Poster
Rep:
|
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
|
|
|
|
09-21-2010, 02:39 AM
|
#29
|
|
Member
Registered: Sep 2009
Posts: 673
Rep:
|
Nice to see your problem is solved.
|
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 02:16 PM.
|
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|