Tomcat shutdown error


 
Thread Tools Search this Thread
Top Forums Web Development Tomcat shutdown error
# 1  
Old 03-30-2011
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 automatically log out in putty.

Problem is when he logsout , tomcat shutdown as well. See logs below. The error is not happening if i login as root and login as the regular user. I noticed that it only happens when a user is logging in directlty and press X. is this tomcat issue or just a shell issue?

Code:
log4j:ERROR LogMananger.repositorySelector was null likely due to error in class reloading, using NOPLoggerRepository.
log4j:ERROR LogMananger.repositorySelector was null likely due to error in class reloading, using NOPLoggerRepository.
(context.ServletUtil                 151 ) Removing TilesContext for context: org.apache.catalina.core.ApplicationContextFacade
log4j:ERROR LogMananger.repositorySelector was null likely due to error in class reloading, using NOPLoggerRepository.
log4j:ERROR LogMananger.repositorySelector was null likely due to error in class reloading, using NOPLoggerRepository.
log4j:ERROR LogMananger.repositorySelector was null likely due to error in class reloading, using NOPLoggerRepository.

# 2  
Old 03-30-2011
# 3  
Old 03-31-2011
thank you. I tried this but the problem now is i got "/usr/bin/nohup: /usr/bin/nohup: cannot execute binary file". I already changed ownserhips of nohup to root but still the same.

Code:
part of the code
BINDIR=/home/tomcat/apache/bin
HOME=/home/tomcat

stoptom() {
        echo "Stopping Tomcat "
        sudo su - tomcat nohup $BINDIR/shutdown.sh
        echo "Press enter to continue."
        read enterkey
        $HOME/tom_menu.sh
}

ls -al nohup
-r-xr-xr-x 1 bin bin 26264 2008-04-04 22:22 nohup

sudoers file
tomcat ALL=(ALL) ALL

user3 ALL=(tomcat) /home/tomcat5/apache/bin/startup.sh
user3 ALL=(tomcat) /home/tomcat5/apache/bin/shutdown.sh
user3 ALL=(tomcat) /usr/bin/nohup
user3 ALL=(root)   /bin/su

---------- Post updated at 11:02 AM ---------- Previous update was at 10:08 AM ----------

if i will change the code

Quote:
sudo su - tomcat nohup $BINDIR/shutdown.sh
to
sudo -u tomcat nohup $BINDIR/shutdown.sh
the error now is

Neither the JAVA_HOME nor the JRE_HOME environment variable is defined
At least one of these environment variable is needed to run this program

Jre_home is already defined though on tomcat and user
really confused now. thaks

---------- Post updated at 02:52 PM ---------- Previous update was at 11:02 AM ----------

this is now ok. the JRE_HOME should be on ths shutdown/startup.sh instead of the restart script I created.

thank you for the help Smilie
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Solaris

Tomcat..Unable to deploy application remotely in tomcat

Hi, We have upgrade tomcat from 5.0.20 to 7.0.33 and made changes to server.xml file according to newer version.. how ever the upgrade went fine and now i am unable to deploy application remotely.. it is giving 403 access denied error.. we have seperate appbase directory mentioned in server.xml..... (0 Replies)
Discussion started by: phani4u
0 Replies

2. Shell Programming and Scripting

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 # su - dm -c "/export/home/Finder/FinderWeb/jakarta-tomcat-3.3.1a/bin/shutdown.sh" but i am getting following error. Please suggest .... (1 Reply)
Discussion started by: Amit.saini333
1 Replies

3. Web Development

Tomcat - Error Logs

Hi Gurus, Our tomcat server was found hanging and responding to requests although ports 8080 & 8009(AJP) were found in listening state. The catalina.out had the below output: We have JavaMelody(Monitoring tool) packaged along with our application and it seems that monitoring through... (3 Replies)
Discussion started by: Hari_Ganesh
3 Replies

4. Shell Programming and Scripting

[Solved] While tomcat shutting down getting error

While tomcat shutting down getting the below error. Error occurred during initialization of VM Could not reserve enough space for code cache CATALINA_OPTS="-verbose:gc -Xloggc:gc.log -XX:+PrintGCDetails -XX:MaxPermSize=24M -Xms256M -Xmx512M -Djava.awt.headless=true -XX:-UseCompressedOops... (2 Replies)
Discussion started by: tuxslonik
2 Replies

5. UNIX for Dummies Questions & Answers

Script to force Oracle database shutdown when shutdown immediate does not work

I have Oracle 9i R2 on AIX 5.2. My Database is running in shared server mode (MTS). Sometimes when I shutdown the database it shutsdown cleanly in 4-5 mints and sometimes it takes good 15-20 minutes and then I get some ora-600 errors and only way to shutdown is by opening another session and... (7 Replies)
Discussion started by: aixhp
7 Replies

6. 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

7. Solaris

Tomcat Error-HTTP Status code 500

when I typed path http://localhost:8080/MyFirst/HelloWorld in web-browser ,it came up with error HTTP Status 500 - type Exception report message description The server encountered an internal error () that prevented it from fulfilling this request. exception ... (0 Replies)
Discussion started by: srinivas2828
0 Replies

8. UNIX and Linux Applications

Custom error page when tomcat authentication fails

Hi people, i have this problem trying to get a custom error page when client authentication fails: I had configured successfully my tomcat with client authentication using certificates, and now I would like to redirect the user to a custom error page when authentication fails, but I always get a... (0 Replies)
Discussion started by: sebagra
0 Replies

9. UNIX for Advanced & Expert Users

Capturing Oracle Shutdown error

Hi, Iam calling 3 sql scripts through one shell script 'rmia.sh'. Till now this was working fine, but last time while calling the SQL scripts, Oracle was down. But amazingly the exit status was '0' (success)!!! Below is the shell code: #!/usr/bin/ksh -x assign_file asql a.sql 1... (15 Replies)
Discussion started by: ganapati
15 Replies

10. UNIX for Advanced & Expert Users

Error Tomcat + Apache

Hi, I have a machine with Unixware 7.1.3 and Apache 2 and Tomcat 4.0.3 it's works, but in the archive log from mod_jk.log ajp13_process_callback - write failed : Error ajp13_process_callback - write failed : Error ajp13_process_callback - write failed : Error... (1 Reply)
Discussion started by: By_Jam
1 Replies
Login or Register to Ask a Question