How to start and stop the tomcat individual application in linux ??
I have tomcat installed in my linux system, I am able to acces it thru web services and can perform both start and stop of tomcat services in web and in my linux machine.
If i need to start and stop individual application in web we have an option and its easy to perform this operation. How to start and stop the tomcat individual application in linux ?? Code:
wget “http://useer_id:passwd@IP_Address:8080/manager/stop?path=/Myapp” -O – -q |
try
wget -O /PATH/TO/OUTPUTFILE http://useer_id:passwd@IP_Address:80...op?path=/Myapp for more detailed help type in bash: man wget you can leave the man page by typing q |
wget -O tt.txt http://user_id:passwd@IP_Address:808...op?path=/Myapp
--2013-04-17 13:45:53-- http://user_id:*password*@IP_Address...op?path=/Myapp Connecting to 10.201.143.73:8181... connected. HTTP request sent, awaiting response... 404 Not Found 2013-04-17 13:45:53 ERROR 404: Not Found. Getting the following error, I am running this command in webapps directory |
For tomcat-6.0.30 and newer you need to use the following URL:
Code:
wget "http://script-manager:password@localhost:8080/manager/text/stop?path=/Myapp" -O - -q Code:
<role rolename="manager-script"/> |
Thanks it works.
Dont we have a command as we do for starting and stopping all services using shell script. ./startup.sh for staring all services and ./shutdown.sh for stopping all srvices in TOMCAT. Basically I was trying to start and stop individual service this way without any authentication or setup. Is there a way something like ./startup.sh Myapp |
Quote:
|
I am trying to start and stop the services from a client linux machine.
The inputs that are available to me will be start script, stop script, location of the script , webapp directory and Application name (war file). In the above case I need to set up this python script in all the remote machine and I should also have userid, passwd too. This is too much task, why cant we start/stop the individual services as we do for the tomcat server using the start/stop script ? |
Quote:
Code:
tomcat-manager --user=adminA --password=passwdA http://lhostA:8080/manager/text stop /MyApp Quote:
|
If your TOMCAT is installed in same linux machine then by using above command we will be calling to the same machine thru http again to start/stop application.
I am looking the easier by making use of start/stop script, I dont think admin will be using wget command to do it. If this how TOMCAT works then there may be some reason apart frm security as we have the scripts that can start and shutdown whole server at one moment. |
Or probably python script is the better solution, if I am starting and stopping individual services frm a single linux box, but setting up these manager user id and passwd is a task.
Thankyou, If you any other solution pls let me knw. |
All times are GMT -5. The time now is 05:14 AM. |