LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (http://www.linuxquestions.org/questions/linux-server-73/)
-   -   Errors on tomcat Server startup and shutdown log (http://www.linuxquestions.org/questions/linux-server-73/errors-on-tomcat-server-startup-and-shutdown-log-656050/)

tanveer 07-16-2008 01:14 AM

Errors on tomcat Server startup and shutdown log
 
Hi all,
I have installed jdk1.6.0_06 in /usr/java and tomcat-6.0.16 on /usr/local/apache-tomcat. Now when I run (as user 'tomcat' not root) the tomcat startup script then it gives the below output. Can you please tell why the blue colored lines appearing? Is it for the developers web applications fault or mine on configuration?
Resolved the first bold one by commenting the below line in server.xml

<!-- <Listener className="org.apache.catalina.core.AprLifecycleListener" SSLEngine="on" /> -->


PHP Code:

Jul 162008 9:58:23 AM org.apache.catalina.core.AprLifecycleListener init


[COLOR="Blue"]INFOThe APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: /usr/java/jdk1.6.0_06/jre/lib/amd64/server:/usr/java/jdk1.6.0_06/jre/lib/amd64:/usr/java/jdk1.6.0_06/jre/../lib/amd64:/usr/java/packages/lib/amd64:/lib:/usr/lib
[/COLOR]

Jul 162008 9:58:24 AM org.apache.coyote.http11.Http11Protocol init
INFO
Initializing Coyote HTTP/1.1 on http-8080
Jul 16
2008 9:58:24 AM org.apache.catalina.startup.Catalina load
INFO
Initialization processed in 983 ms
Jul 16
2008 9:58:24 AM org.apache.catalina.core.StandardService start
INFO
Starting service Catalina
Jul 16
2008 9:58:24 AM org.apache.catalina.core.StandardEngine start
INFO
Starting Servlet EngineApache Tomcat/6.0.16


[COLOR="Blue"]Jul 162008 9:58:24 AM org.apache.catalina.core.StandardContext addApplicationListener
INFO
The listener "listeners.ContextListener" is already configured for this contextThe duplicate definition has been ignored.
Jul 162008 9:58:24 AM org.apache.catalina.core.StandardContext addApplicationListener
INFO
The listener "listeners.SessionListener" is already configured for this contextThe duplicate definition has been ignored.
Jul 162008 9:58:25 AM org.apache.catalina.loader.WebappClassLoader validateJarFile
INFO
validateJarFile(/usr/local/apache-tomcat/webapps/sso/WEB-INF/lib/servlet-api-2.3.jar) - jar not loadedSee Servlet Spec 2.3section 9.7.2Offending class: javax/servlet/Servlet.class
[/
COLOR]

Jul 162008 9:58:25 AM org.apache.coyote.http11.Http11Protocol start
INFO
Starting Coyote HTTP/1.1 on http-8080
Jul 16
2008 9:58:25 AM org.apache.jk.common.ChannelSocket init
INFO
JKajp13 listening on /0.0.0.0:8009
Jul 16
2008 9:58:25 AM org.apache.jk.server.JkMain start
INFO
Jk running ID=0 time=0/20  config=null
Jul 16
2008 9:58:25 AM org.apache.catalina.startup.Catalina start
INFO
Server startup in 1372 ms 


And at shutdown of tomcat server what the the bold lines means? What driver its asking about?

PHP Code:

Jul 162008 10:32:09 AM org.apache.coyote.http11.Http11Protocol pause
INFO
Pausing Coyote HTTP/1.1 on http-8080
Jul 16
2008 10:32:10 AM org.apache.catalina.core.StandardService stop
INFO
Stopping service Catalina
[COLOR="Blue"]
Error in driver loading.
Error in driver loading.
[/
COLOR]
Jul 162008 10:32:10 AM org.apache.coyote.http11.Http11Protocol destroy
INFO
Stopping Coyote HTTP/1.1 on http-9090 


williebens 07-16-2008 01:26 AM

You can ignore the part about Tomcat Native library. Believe me. Just work on the second one.

Thanks.
--Willie

williebens 07-16-2008 01:39 AM

Check this out:

Installing tomcat 6.0.16:

In the /usr/local directory unzip the tomcat package:

[root@box local]# pwd
/usr/local
[root@box local]# unzip apache-tomcat-6.0.16.zip
.
.
.
inflating: apache-tomcat-6.0.16/webapps/manager/sessionsList.jsp
inflating: apache-tomcat-6.0.16/webapps/manager/status.xsd
inflating: apache-tomcat-6.0.16/webapps/manager/xform.xsl


Go into the apache-tomcat-6.0.16 that got created after unzipping the tomcat package:

[root@box local]# cd apache-tomcat-6.0.16/
[root@box apache-tomcat-6.0.16]# ls -l
total 132
drwxr-xr-x 2 root root 4096 Jan 28 23:39 bin
drwxr-xr-x 2 root root 4096 Jan 28 23:39 conf
drwxr-xr-x 2 root root 4096 Jan 28 23:39 lib
-rw-r--r-- 1 root root 38656 Jan 28 23:39 LICENSE
drwxr-xr-x 2 root root 4096 Jan 28 23:39 logs
-rw-r--r-- 1 root root 572 Jan 28 23:39 NOTICE
-rw-r--r-- 1 root root 7508 Jan 28 23:39 RELEASE-NOTES
-rw-r--r-- 1 root root 6847 Jan 28 23:39 RUNNING.txt
drwxr-xr-x 2 root root 4096 Jan 28 23:39 temp
drwxr-xr-x 7 root root 4096 Jan 28 23:39 webapps
drwxr-xr-x 2 root root 4096 Jan 28 23:39 work
[root@box apache-tomcat-6.0.16]#


Now go into the bin directory:

[root@box apache-tomcat-6.0.16]# cd bin
[root@box bin]# ll
total 672
-rw-r--r-- 1 root root 17530 Jan 28 23:39 bootstrap.jar
-rw-r--r-- 1 root root 9918 Jan 28 23:39 catalina.bat
-rw-r--r-- 1 root root 12785 Jan 28 23:39 catalina.sh
-rw-r--r-- 1 root root 2432 Jan 28 23:39 catalina-tasks.xml
-rw-r--r-- 1 root root 9341 Jan 28 23:39 commons-daemon.jar
-rw-r--r-- 1 root root 1342 Jan 28 23:39 cpappend.bat
-rw-r--r-- 1 root root 2104 Jan 28 23:39 digest.bat
-rw-r--r-- 1 root root 1624 Jan 28 23:39 digest.sh

-rw-r--r-- 1 root root 74398 Jan 28 23:39 jsvc.tar.gz
-rw-r--r-- 1 root root 4947 Jan 28 23:39 service.bat
-rw-r--r-- 1 root root 3307 Jan 28 23:39 setclasspath.bat
-rw-r--r-- 1 root root 4447 Jan 28 23:39 setclasspath.sh
-rw-r--r-- 1 root root 2096 Jan 28 23:39 shutdown.bat
-rw-r--r-- 1 root root 1563 Jan 28 23:39 shutdown.sh
-rw-r--r-- 1 root root 2097 Jan 28 23:39 startup.bat
-rw-r--r-- 1 root root 1956 Jan 28 23:39 startup.sh
-rw-r--r-- 1 root root 57344 Jan 28 23:39 tomcat6.exe
-rw-r--r-- 1 root root 98304 Jan 28 23:39 tomcat6w.exe
-rw-r--r-- 1 root root 18980 Jan 28 23:39 tomcat-juli.jar
-rw-r--r-- 1 root root 187968 Jan 28 23:39 tomcat-native.tar.gz
-rw-r--r-- 1 root root 3189 Jan 28 23:39 tool-wrapper.bat
-rw-r--r-- 1 root root 3291 Jan 28 23:39 tool-wrapper.sh
-rw-r--r-- 1 root root 2101 Jan 28 23:39 version.bat
-rw-r--r-- 1 root root 1567 Jan 28 23:39 version.sh
[root@box bin]#


Make all files whose extension is .sh executable, and verify they are executable by
running the commands chmod +x *.sh and ls –l *.sh respectively:

[root@box bin]# chmod +x *.sh
[root@box bin]# ls -l *sh
-rwxr-xr-x 1 root root 12785 Jan 28 23:39 catalina.sh
-rwxr-xr-x 1 root root 1624 Jan 28 23:39 digest.sh
-rwxr-xr-x 1 root root 4447 Jan 28 23:39 setclasspath.sh
-rwxr-xr-x 1 root root 1563 Jan 28 23:39 shutdown.sh
-rwxr-xr-x 1 root root 1956 Jan 28 23:39 startup.sh
-rwxr-xr-x 1 root root 3291 Jan 28 23:39 tool-wrapper.sh
-rwxr-xr-x 1 root root 1567 Jan 28 23:39 version.sh
[root@box bin]#

Before starting Tomcat, make sure that the box you are installing Tomcat on is not
running another process on TCP port 8080, which is the default Tomcat HTTP server
socket port. Also, check that nothing is running on TCP port 8005, which is the default
Tomcat shutdown server socket port. To check on these, run:

[root@box bin]# netstat -an | grep 8080
[root@box bin]# netstat -an | grep 8005
tcp 0 0 0.0.0.0:8005 0.0.0.0:* LISTEN
[root@box bin]#

If you do not get a response, I like did not get on netstat –an | grep 8080, then it is good.
However, if you get an output like I did on netstat -an | grep 8005, then that means that
another program is listening on port 8005. I need to solve this issue now.

Running:
[root@box bin]# netstat -A inet –lnp
shows that:
tcp 0 0 0.0.0.0:8005 0.0.0.0:* LISTEN 4509/php
a php process is listening on port 8005
Solution:
After talking with the appropriate people responsible for this process, the suggested to
change the tomcat port 8005 to any other port that is free.
After modifying the server.xml file with the new and free port, you are now ready to start
tomcat:

[root@box bin]# ./startup.sh
Using CATALINA_BASE: /usr/local/apache-tomcat-6.0.16
Using CATALINA_HOME: /usr/local/apache-tomcat-6.0.16
Using CATALINA_TMPDIR: /usr/local/apache-tomcat-6.0.16/temp
Using JRE_HOME: /usr/java/jdk1.6.0_06
[root@box bin]#

To verify it is running, you should get these outputs after running the following
commands:

[root@box bin]# netstat -an | grep 8080
tcp 0 0 :::8080 :::* LISTEN
[root@box bin]# ps auwwx | grep "apache-tomcat*"
root 13336 1.0 2.1 674344 43476 pts/0 Sl 15:31 0:02
/usr/java/jdk1.6.0_06/bin/java -
Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -
Djava.util.logging.config.file=/usr/local/apache-tomcat-
6.0.16/conf/logging.properties -Djava.endorsed.dirs=/usr/local/apache-tomcat-
6.0.16/endorsed -classpath :/usr/local/apache-tomcat-6.0.16/bin/bootstrap.jar -
Dcatalina.base=/usr/local/apache-tomcat-6.0.16 -Dcatalina.home=/usr/local/apachetomcat-
6.0.16 -Djava.io.tmpdir=/usr/local/apache-tomcat-6.0.16/temp
org.apache.catalina.startup.Bootstrap start
root 13373 0.0 0.0 51104 684 pts/0 S+ 15:35 0:00 grep apache-tomcat*
[root@box bin]#

Now point to your browser to see the tomcat page displayed:

http://yourIP:8080

To stop tomcat, run:
[root@box bin]# ./shutdown.sh
Using CATALINA_BASE: /usr/local/apache-tomcat-6.0.16
Using CATALINA_HOME: /usr/local/apache-tomcat-6.0.16
Using CATALINA_TMPDIR: /usr/local/apache
Using JRE_HOME: /usr/java/jdk1.6.0_06
[root@box bin]#

I hope this helps.

Thanks.
--Willie

tanveer 07-16-2008 02:07 AM

Thanks for the replies.

I found a bug report for the first part that is at startup time

https://issues.apache.org/bugzilla/s...g.cgi?id=44423.


All times are GMT -5. The time now is 08:21 AM.