Automatic shutdown and startup of Tomcat in Solaris


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Automatic shutdown and startup of Tomcat in Solaris
# 1  
Old 11-10-2012
Automatic shutdown and startup of Tomcat in Solaris

Dear Experts ,

I want to stop and Start tomcat at the time of shutdown and startup of our server . I was trying to stop tomcat with following command

Code:
# su - dm -c "/export/home/Finder/FinderWeb/jakarta-tomcat-3.3.1a/bin/shutdown.sh"

but i am getting following error. Please suggest .
Code:
Oracle Corporation      SunOS 5.10      Generic Patch   January 2005
Erase is Backspace
Using classpath: /export/home/Finder/FinderWeb/jakarta-tomcat-3.3.1a/bin/../lib/tomcat.jar
Using JAVA_HOME: /usr/bin/..
Using TOMCAT_HOME: .
Stopping Tomcat.
Stopping tomcat on null:-1 null
Guessed home=/export/home/Finder/FinderWeb/jakarta-tomcat-3.3.1a
Exception: java.lang.reflect.InvocationTargetException
java.lang.reflect.InvocationTargetException
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.apache.tomcat.util.IntrospectionUtils.execute(IntrospectionUtils.java:87)
        at org.apache.tomcat.startup.Main.execute(Main.java:313)
        at org.apache.tomcat.startup.Main.main(Main.java:140)
Caused by: java.lang.IllegalArgumentException: port out of range:-1
        at java.net.InetSocketAddress.<init>(InetSocketAddress.java:83)
        at java.net.Socket.<init>(Socket.java:218)
        at org.apache.tomcat.startup.StopTomcat.stopTomcat(StopTomcat.java:351)
        at org.apache.tomcat.startup.StopTomcat.stopTomcat(StopTomcat.java:321)
        at org.apache.tomcat.startup.StopTomcat.execute(StopTomcat.java:199)
        ... 7 more
Root Exception: java.lang.IllegalArgumentException: port out of range:-1
java.lang.IllegalArgumentException: port out of range:-1
        at java.net.InetSocketAddress.<init>(InetSocketAddress.java:83)
        at java.net.Socket.<init>(Socket.java:218)
        at org.apache.tomcat.startup.StopTomcat.stopTomcat(StopTomcat.java:351)
        at org.apache.tomcat.startup.StopTomcat.stopTomcat(StopTomcat.java:321)
        at org.apache.tomcat.startup.StopTomcat.execute(StopTomcat.java:199)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.apache.tomcat.util.IntrospectionUtils.execute(IntrospectionUtils.java:87)
        at org.apache.tomcat.startup.Main.execute(Main.java:313)
        at org.apache.tomcat.startup.Main.main(Main.java:140)


Last edited by Scrutinizer; 11-10-2012 at 05:34 AM.. Reason: code tags
# 2  
Old 11-10-2012
check the directories that are used by the Tomcat classloader, make sure they exist and are accessible (read, write if needed) to the Tomcat start/stop service.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Apache tomcat startup script not booting at startup.

I copied the script from an AskUbuntu post - #!/bin/bash ### BEGIN INIT INFO # Provides: tomcat7 # Required-Start: $network # Required-Stop: $network # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 # Short-Description: Start/Stop Tomcat server ### END INIT INFO ... (14 Replies)
Discussion started by: Hijanoqu
14 Replies

2. Shell Programming and Scripting

Startup and shutdown script

Hi all, I'm writing a script to stop & start oracle: su - oracle -c "sqlplus / as sysdba" -c "shutdown immediate">> ${log} 2>&1 The {log} refers to the log file. The part in bold gives error: /usr/sbin/shutdown: Only root can run /usr/sbin/shutdown Pls suggest how to correct this. ... (5 Replies)
Discussion started by: frum
5 Replies

3. Web Development

Tomcat shutdown error

not sure if this is the right forum but im having problem with tomcat restart. i have a regular user that when he login it will go directly to a menu options (a. stop tomcat, start tomcat,). if he selects start it would should show that tomcat has been restarted. if the user press X, he will... (2 Replies)
Discussion started by: lhareigh890
2 Replies

4. UNIX for Dummies Questions & Answers

Automatic login at startup

Hi, how can I set my linux server that it logs in the main user at startup? I would like to be able to make a restart remotely and be able to connect to the server again afterwards. The problem is that the server waits for a login and than connects to the network. So at the beginning at... (5 Replies)
Discussion started by: borobudur
5 Replies

5. Programming

Tomcat crashes after Xvfb shutdown

Hello, I'm running tomcat on linux and using Xvfb as a X server for creating the pdf's (gui components). I'm running the Xvfb in a different proccess than the tomcat. If the Xvfb is shutdown and no pdf was yet created then everything is ok. but if i create a pdf and then shutdown the Xvfb... (0 Replies)
Discussion started by: omerc85
0 Replies

6. Solaris

Startup and shutdown a server

Are rc scripts executed serially or all at the same time. Is there a way to see this happen? A log file or the syslogd? This is Solaris 10. (2 Replies)
Discussion started by: djehresmann
2 Replies

7. UNIX for Dummies Questions & Answers

Where is the shutdown/startup log?

Having difficulty trying to locate startup and shutdown messages. I had a bunch of servers shutdown over the weekend (due to a scheduled power outage) and upon reboot a lot of the filesystems weren't mounted and several processes weren't started... I checked /var/adm/messages and can't locate... (2 Replies)
Discussion started by: jamie_collins
2 Replies

8. AIX

Startup/Shutdown scripts

I understand that by putting in entries into the /etc/inittab file. We can actually call the our scripts during startup. mkitab "start_server:2:once:sh /scripts/startserver.sh" Would the system wait for startserver.sh finish executing before it goes to another entry? and how long would it... (1 Reply)
Discussion started by: vincente
1 Replies

9. SCO

SCO 5.06 :automatic shutdown on the job?

Hi Guys I have got a problem and I would really be grateful if some1 could sort out the problem. The problem is that there are a few computers based on SCO 5.0.6 automatic shutdown on the job.and I am anxious to konw the reasons. Looking forward to seeing some messiah helping me out.... (1 Reply)
Discussion started by: rendechen
1 Replies

10. UNIX for Dummies Questions & Answers

Run tomcat at startup

Is it possible to run tomcat automatically when Linux boots without having to log in? (4 Replies)
Discussion started by: Spetnik
4 Replies
Login or Register to Ask a Question