CentOS installation - just see Tomcat welcome page

Use this forum for questions regarding installation, upgrading and configuration of OpenEMM

Moderator: moderator

nigel
Posts: 2
Joined: Sun Aug 28, 2011 12:27 am

CentOS installation - just see Tomcat welcome page

Post by nigel »

Hello,

I've worked through the latest InstallGuide (which differs a lot from the wiki site, but which seems the authoritative reference). I'm using a virtual private server with a CPanel control panel. It gave me a lot of problems as (I think) it uses a different MySQL (with capitals) to the one in the Yum repository, and so the file dependencies in Yum don't work - I had to manually install and compile mysql-python, but that now seems to work, and openemm starts smoothly with no command line errors.

However once it has started i still just see the Tomcam welcome page in my browser at http://www.mydomain.com:8080

There are errors in the tomcat log at /home/openemm/logs/catalina.out, including:

SEVERE: Error initializing endpoint
java.net.BindException: Address already in use <null>:8080

Here is the full log for a startup from booting the system:

Code: Select all

Aug 27, 2011 10:48:59 PM org.apache.catalina.core.AprLifecycleListener init
INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: /opt/openemm/jdk1.6.0_25/jre/lib/i386/client:/opt/openemm/jdk1.6.0_25/jre/lib/i386:/opt/openemm/jdk1.6.0_25/jre/../lib/i386:/usr/java/packages/lib/i386:/lib:/usr/lib
Aug 27, 2011 10:49:01 PM org.apache.coyote.http11.Http11Protocol init
SEVERE: Error initializing endpoint
java.net.BindException: Address already in use <null>: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:1022)
	at org.apache.catalina.core.StandardService.initialize(StandardService.java:703)
	at org.apache.catalina.core.StandardServer.initialize(StandardServer.java:838)
	at org.apache.catalina.startup.Catalina.load(Catalina.java:538)
	at org.apache.catalina.startup.Catalina.load(Catalina.java:562)
	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.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)
	at java.net.PlainSocketImpl.bind(PlainSocketImpl.java:383)
	at java.net.ServerSocket.bind(ServerSocket.java:328)
	at java.net.ServerSocket.<init>(ServerSocket.java:194)
	at java.net.ServerSocket.<init>(ServerSocket.java:150)
	at org.apache.tomcat.util.net.DefaultServerSocketFactory.createSocket(DefaultServerSocketFactory.java:50)
	at org.apache.tomcat.util.net.JIoEndpoint.init(JIoEndpoint.java:538)
	... 12 more
Aug 27, 2011 10:49:01 PM org.apache.catalina.core.StandardService initialize
SEVERE: Failed to initialize connector [Connector[HTTP/1.1-8080]]
LifecycleException:  Protocol handler initialization failed: java.net.BindException: Address already in use <null>:8080
	at org.apache.catalina.connector.Connector.initialize(Connector.java:1024)
	at org.apache.catalina.core.StandardService.initialize(StandardService.java:703)
	at org.apache.catalina.core.StandardServer.initialize(StandardServer.java:838)
	at org.apache.catalina.startup.Catalina.load(Catalina.java:538)
	at org.apache.catalina.startup.Catalina.load(Catalina.java:562)
	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.catalina.startup.Bootstrap.load(Bootstrap.java:261)
	at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
Aug 27, 2011 10:49:01 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 2997 ms
Aug 27, 2011 10:49:01 PM org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
Aug 27, 2011 10:49:01 PM org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/6.0.33
Aug 27, 2011 10:49:05 PM org.apache.catalina.core.ApplicationContext log
INFO: Initializing Spring root WebApplicationContext
2011-08-27 22:49:10,067: WARN  [main] net.sf.ehcache.config.Configurator - No configuration found. Configuring ehcache from ehcache-failsafe.xml found in the classpath: jar:file:/home/openemm-2011/webapps/openemm/WEB-INF/lib/ehcache-1.1.jar!/ehcache-failsafe.xml
Aug 27, 2011 10:49:14 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory openemm
Aug 27, 2011 10:49:15 PM org.apache.catalina.core.ApplicationContext log
INFO: Initializing Spring root WebApplicationContext
2011-08-27 22:49:20,358: WARN  [main] net.sf.ehcache.config.Configurator - No configuration found. Configuring ehcache from ehcache-failsafe.xml found in the classpath: jar:file:/home/openemm-2011/webapps/openemm/WEB-INF/lib/ehcache-1.1.jar!/ehcache-failsafe.xml
Aug 27, 2011 10:49:23 PM org.apache.coyote.http11.Http11Protocol start
SEVERE: Error starting endpoint
java.net.BindException: Address already in use <null>:8080
	at org.apache.tomcat.util.net.JIoEndpoint.init(JIoEndpoint.java:549)
	at org.apache.tomcat.util.net.JIoEndpoint.start(JIoEndpoint.java:565)
	at org.apache.coyote.http11.Http11Protocol.start(Http11Protocol.java:203)
	at org.apache.catalina.connector.Connector.start(Connector.java:1095)
	at org.apache.catalina.core.StandardService.start(StandardService.java:540)
	at org.apache.catalina.core.StandardServer.start(StandardServer.java:754)
	at org.apache.catalina.startup.Catalina.start(Catalina.java:595)
	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.catalina.startup.Bootstrap.start(Bootstrap.java:289)
	at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
Caused by: java.net.BindException: Address already in use
	at java.net.PlainSocketImpl.socketBind(Native Method)
	at java.net.PlainSocketImpl.bind(PlainSocketImpl.java:383)
	at java.net.ServerSocket.bind(ServerSocket.java:328)
	at java.net.ServerSocket.<init>(ServerSocket.java:194)
	at java.net.ServerSocket.<init>(ServerSocket.java:150)
	at org.apache.tomcat.util.net.DefaultServerSocketFactory.createSocket(DefaultServerSocketFactory.java:50)
	at org.apache.tomcat.util.net.JIoEndpoint.init(JIoEndpoint.java:538)
	... 12 more
Aug 27, 2011 10:49:23 PM org.apache.catalina.core.StandardService start
SEVERE: Failed to start connector [Connector[HTTP/1.1-8080]]
LifecycleException:  service.getName(): "Catalina";  Protocol handler start failed: java.net.BindException: Address already in use <null>:8080
	at org.apache.catalina.connector.Connector.start(Connector.java:1102)
	at org.apache.catalina.core.StandardService.start(StandardService.java:540)
	at org.apache.catalina.core.StandardServer.start(StandardServer.java:754)
	at org.apache.catalina.startup.Catalina.start(Catalina.java:595)
	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.catalina.startup.Bootstrap.start(Bootstrap.java:289)
	at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
Aug 27, 2011 10:49:23 PM org.apache.jk.common.ChannelSocket init
INFO: Port busy 8009 java.net.BindException: Address already in use
Aug 27, 2011 10:49:23 PM org.apache.jk.common.ChannelSocket init
SEVERE: Can't find free port 8009 8009
Aug 27, 2011 10:49:23 PM org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=0/19  config=null
Aug 27, 2011 10:49:23 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 22559 ms
I'm feeling I have a tomcat problem, and would be grateful for any help please.
maschoff
Site Admin
Posts: 2628
Joined: Thu Aug 03, 2006 10:20 am
Location: Munich, Germany
Contact:

Re: CentOS installation - just see Tomcat welcome page

Post by maschoff »

The error message means that another web container is already running and using port 8080. Could be Resin, or Tomcat was already started before.
OpenEMM Maintainer
nigel
Posts: 2
Joined: Sun Aug 28, 2011 12:27 am

Re: CentOS installation - just see Tomcat welcome page

Post by nigel »

Thank you - that helped, and led me to http://old.nabble.com/Error,-source-unk ... 09858.html which also helped.

Tomcat was already running.

I found a line in /etc/rc.local (which is run on each system startup) and which I imagine Tomcat put there on installation:

/usr/sbin/starttomcat

I have now commented it out (i.e. added a preceding #), and so on entering

su - openemm
openemm.sh start

can see OpenEMM on port 8080. Thanks for your help.
Post Reply