Kwok server errors with JAVA
This article deals with java issues and kwok information server, I do not go over installing the kwok server, postgresql, or editing the .xml files in order to get this up and running. I saw the following issue after the install was completed and trying to start Tomcat and the webpage not diplaying correctly. I am running this on Ubuntu 10.10 server 32 bit, with Apache, MySql, Postgresql, Java, Webmin and pgAdmin II installed. I have done the updates to the OS and kernal.
When rebooting the Jabber / Kwok server, there are times that the website for Kwok will not be displayed correctly. This is usually the result of the Tomcat service not starting and listening on port 8080, Java service can also "overtake" this process and "lock" it so that Tomcat for Apache will not start correctly.
The following commands are used within the KB article
cd to "var/log/tomcat6"
command:"ls -al"
to view log file:"tail -f (filename) or "pico (filename)"
"netstat -anp | grep 8080"
"kill (pid of java)"
cd to "usr/kwok/server"
to start tomcat:"sudo ./start_tomcat.sh"
To toubleshoot this:
See if errors are being generated via the Catalina service in Tomcat when this is started. To view this logs navigate to the following directory on the Jabber server.
cd /var/log/tomcat6 there will be log files contained in this directory for the tomcat server. you can do the following command : "ls -al" to see which files contain data in them.
the following command will display the end of the log file> "tail -f catalina.out (file) other wise you can also do the following: sudo pico catalina.out (file), this will display the entire log file. The give-a-way for Tomcat and Java will be the following log message
INFO: Starting Servlet Engine: Apache Tomcat/6.0.28
Mar 21, 2011 5:34:57 PM org.apache.catalina.startup.HostConfig deployDescriptor
INFO: Deploying configuration descriptor ROOT.xml
Mar 21, 2011 5:34:57 PM org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on http-8080
Mar 21, 2011 5:34:57 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 442 ms
Mar 21, 2011 5:40:10 PM org.apache.coyote.http11.Http11Protocol pause
INFO: Pausing Coyote HTTP/1.1 on http-8080
Mar 21, 2011 5:40:11 PM org.apache.catalina.core.StandardService stop
INFO: Stopping service Catalina
Mar 21, 2011 5:40:11 PM org.apache.coyote.http11.Http11Protocol destroy
INFO: Stopping Coyote HTTP/1.1 on http-8080
Mar 31, 2011 5:00:20 PM org.apache.coyote.http11.Http11Protocol init
SEVERE: Error initializing endpoint
java.net.BindException: Address already in use:8080
at org.apache.tomcat.util.net.JIoEndpoint.init(JIoEndpoint.java:549)
at org.apache.coyote.http11.Http11Protocol.init(Http11Protocol.java:176)
at org.apache.catalina.connector.Connector.initialize(Connector.java:1014)
at org.apache.catalina.core.StandardService.initialize(StandardService.java:680)
at org.apache.catalina.core.StandardServer.initialize(StandardServer.java:795)
at org.apache.catalina.startup.Catalina.load(Catalina.java:524)
at org.apache.catalina.startup.Catalina.load(Catalina.java:548)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:$
at java.lang.reflect.Method.invoke(Method.java:616)
at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:261)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
Caused by: java.net.BindException: Address already in use
at java.net.PlainSocketImpl.socketBind(Native Method)
This basically states that Java is listening on port 8080 and this is keeping Tomcat from starting correctly, you will need to kill the JAVA pid and then start Tomcat.
The Following command will display what service is listening on port 8080: "netstat -anp | grep 8080", you will get the PID number and then a simple: kill "pid number" will do.
Then make sure the database for KWOK is running. I do this from pgAdmin II, which is the GUI overlay for postgresql. I will not cover the install here. Once verified, navigate back to the following directoy:
cd /usr/kwok/server and run the following: " ./start_tomcat.sh" you may need to have "sudo" command in front of this to execute. This should resolve any issues with Tomcat not starting or displaying the kwok server webpage correctly.
Thats my story and I'm stickin to it
biz
When rebooting the Jabber / Kwok server, there are times that the website for Kwok will not be displayed correctly. This is usually the result of the Tomcat service not starting and listening on port 8080, Java service can also "overtake" this process and "lock" it so that Tomcat for Apache will not start correctly.
The following commands are used within the KB article
cd to "var/log/tomcat6"
command:"ls -al"
to view log file:"tail -f (filename) or "pico (filename)"
"netstat -anp | grep 8080"
"kill (pid of java)"
cd to "usr/kwok/server"
to start tomcat:"sudo ./start_tomcat.sh"
To toubleshoot this:
See if errors are being generated via the Catalina service in Tomcat when this is started. To view this logs navigate to the following directory on the Jabber server.
cd /var/log/tomcat6 there will be log files contained in this directory for the tomcat server. you can do the following command : "ls -al" to see which files contain data in them.
the following command will display the end of the log file> "tail -f catalina.out (file) other wise you can also do the following: sudo pico catalina.out (file), this will display the entire log file. The give-a-way for Tomcat and Java will be the following log message
INFO: Starting Servlet Engine: Apache Tomcat/6.0.28
Mar 21, 2011 5:34:57 PM org.apache.catalina.startup.HostConfig deployDescriptor
INFO: Deploying configuration descriptor ROOT.xml
Mar 21, 2011 5:34:57 PM org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on http-8080
Mar 21, 2011 5:34:57 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 442 ms
Mar 21, 2011 5:40:10 PM org.apache.coyote.http11.Http11Protocol pause
INFO: Pausing Coyote HTTP/1.1 on http-8080
Mar 21, 2011 5:40:11 PM org.apache.catalina.core.StandardService stop
INFO: Stopping service Catalina
Mar 21, 2011 5:40:11 PM org.apache.coyote.http11.Http11Protocol destroy
INFO: Stopping Coyote HTTP/1.1 on http-8080
Mar 31, 2011 5:00:20 PM org.apache.coyote.http11.Http11Protocol init
SEVERE: Error initializing endpoint
java.net.BindException: Address already in use
at org.apache.tomcat.util.net.JIoEndpoint.init(JIoEndpoint.java:549)
at org.apache.coyote.http11.Http11Protocol.init(Http11Protocol.java:176)
at org.apache.catalina.connector.Connector.initialize(Connector.java:1014)
at org.apache.catalina.core.StandardService.initialize(StandardService.java:680)
at org.apache.catalina.core.StandardServer.initialize(StandardServer.java:795)
at org.apache.catalina.startup.Catalina.load(Catalina.java:524)
at org.apache.catalina.startup.Catalina.load(Catalina.java:548)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:$
at java.lang.reflect.Method.invoke(Method.java:616)
at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:261)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
Caused by: java.net.BindException: Address already in use
at java.net.PlainSocketImpl.socketBind(Native Method)
This basically states that Java is listening on port 8080 and this is keeping Tomcat from starting correctly, you will need to kill the JAVA pid and then start Tomcat.
The Following command will display what service is listening on port 8080: "netstat -anp | grep 8080", you will get the PID number and then a simple: kill "pid number" will do.
Then make sure the database for KWOK is running. I do this from pgAdmin II, which is the GUI overlay for postgresql. I will not cover the install here. Once verified, navigate back to the following directoy:
cd /usr/kwok/server and run the following: " ./start_tomcat.sh" you may need to have "sudo" command in front of this to execute. This should resolve any issues with Tomcat not starting or displaying the kwok server webpage correctly.
Thats my story and I'm stickin to it
biz

0 Comments:
Post a Comment
<< Home