cancel
Showing results for 
Search instead for 
Did you mean: 

HTTP 404 Error - Catalina won't start

d_clark
Champ in-the-making
Champ in-the-making
Hello,

I'm currently having trouble getting Tomcat/Catalina to start. I was making a startup script simply calling ../alfresco.sh start, however, now I can't get Catalina to start, resulting in HTTP 404 errors when browsing to the alfresco web client. The default Tomcat homepage DOES load, however. It says port 8080 is in use, however, I don't have any services using that port already. Any thoughts? Logs below.
More details…

Mac OS X 10.4.11, JRE 1.5, Tomcat 5.5.23

I've checked and killed any extra java processes before starting with no avail.

Thank you.

Jan 26, 2009 1:33:13 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 1690 ms
Jan 26, 2009 1:33:14 PM org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
Jan 26, 2009 1:33:14 PM org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/5.5.23
Jan 26, 2009 1:33:14 PM org.apache.catalina.core.StandardHost start
INFO: XML validation disabled
Jan 26, 2009 1:33:15 PM org.apache.catalina.startup.HostConfig deployWAR
INFO: Deploying web application archive alfresco.war
Jan 26, 2009 1:33:52 PM org.apache.catalina.core.StandardContext start
SEVERE: Error listenerStart
Jan 26, 2009 1:33:52 PM org.apache.catalina.core.StandardContext start
SEVERE: Context [/alfresco] startup failed due to previous errors
Jan 26, 2009 1:33:55 PM org.apache.coyote.http11.Http11BaseProtocol start
SEVERE: Error starting endpoint
java.net.BindException: Address already in use:8080
   at org.apache.tomcat.util.net.PoolTcpEndpoint.initEndpoint(PoolTcpEndpoint.java:298)
   at org.apache.tomcat.util.net.PoolTcpEndpoint.startEndpoint(PoolTcpEndpoint.java:313)
   at org.apache.coyote.http11.Http11BaseProtocol.start(Http11BaseProtocol.java:151)
   at org.apache.coyote.http11.Http11Protocol.start(Http11Protocol.java:76)
   at org.apache.catalina.connector.Connector.start(Connector.java:1090)
   at org.apache.catalina.core.StandardService.start(StandardService.java:457)
   at org.apache.catalina.core.StandardServer.start(StandardServer.java:700)
   at org.apache.catalina.startup.Catalina.start(Catalina.java:552)
   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:585)
   at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:295)
   at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:433)
Jan 26, 2009 1:33:55 PM org.apache.catalina.startup.Catalina start
SEVERE: Catalina.start:
LifecycleException:  service.getName(): "Catalina";  Protocol handler start failed: java.net.BindException: Address already in use:8080
   at org.apache.catalina.connector.Connector.start(Connector.java:1097)
   at org.apache.catalina.core.StandardService.start(StandardService.java:457)
   at org.apache.catalina.core.StandardServer.start(StandardServer.java:700)
   at org.apache.catalina.startup.Catalina.start(Catalina.java:552)
   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:585)
   at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:295)
   at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:433)
Jan 26, 2009 1:33:55 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 41951 ms
Jan 26, 2009 1:33:55 PM org.apache.catalina.core.StandardServer await
SEVERE: StandardServer.await: create[8005]:
java.net.BindException: Address already in use
   at java.net.PlainSocketImpl.socketBind(Native Method)
   at java.net.PlainSocketImpl.bind(PlainSocketImpl.java:359)
   at java.net.ServerSocket.bind(ServerSocket.java:319)
   at java.net.ServerSocket.<init>(ServerSocket.java:185)
   at org.apache.catalina.core.StandardServer.await(StandardServer.java:363)
   at org.apache.catalina.startup.Catalina.await(Catalina.java:616)
   at org.apache.catalina.startup.Catalina.start(Catalina.java:576)
   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:585)
   at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:295)
   at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:433)
Jan 26, 2009 1:33:55 PM org.apache.coyote.http11.Http11BaseProtocol pause
INFO: Pausing Coyote HTTP/1.1 on http-8080
Jan 26, 2009 1:33:56 PM org.apache.catalina.core.StandardService stop
INFO: Stopping service Catalina
Jan 26, 2009 1:33:56 PM org.apache.catalina.connector.MapperListener destroy
WARNING: Error unregistering MBeanServerDelegate
java.lang.NullPointerException
   at org.apache.catalina.connector.MapperListener.destroy(MapperListener.java:162)
   at org.apache.catalina.connector.Connector.stop(Connector.java:1138)
   at org.apache.catalina.core.StandardService.stop(StandardService.java:519)
   at org.apache.catalina.core.StandardServer.stop(StandardServer.java:734)
   at org.apache.catalina.startup.Catalina.stop(Catalina.java:602)
   at org.apache.catalina.startup.Catalina$CatalinaShutdownHook.run(Catalina.java:645)
Jan 26, 2009 1:33:56 PM org.apache.coyote.http11.Http11BaseProtocol destroy
INFO: Stopping Coyote HTTP/1.1 on http-8080
Jan 26, 2009 1:34:29 PM org.apache.coyote.http11.Http11BaseProtocol pause
INFO: Pausing Coyote HTTP/1.1 on http-8080
Jan 26, 2009 1:34:30 PM org.apache.catalina.core.StandardService stop
INFO: Stopping service Catalina
Jan 26, 2009 1:34:30 PM org.apache.coyote.http11.Http11BaseProtocol destroy
INFO: Stopping Coyote HTTP/1.1 on http-8080
Jan 26, 2009 1:35:54 PM org.apache.coyote.http11.Http11BaseProtocol init
INFO: Initializing Coyote HTTP/1.1 on http-8080
Jan 26, 2009 1:35:54 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 1590 ms
Jan 26, 2009 1:35:55 PM org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
Jan 26, 2009 1:35:55 PM org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/5.5.23
Jan 26, 2009 1:35:55 PM org.apache.catalina.core.StandardHost start
INFO: XML validation disabled
Jan 26, 2009 1:35:56 PM org.apache.catalina.startup.HostConfig deployWAR
INFO: Deploying web application archive alfresco.war
Jan 26, 2009 1:36:47 PM org.apache.catalina.core.StandardContext start
SEVERE: Error listenerStart
Jan 26, 2009 1:36:47 PM org.apache.catalina.core.StandardContext start
SEVERE: Context [/alfresco] startup failed due to previous errors
Jan 26, 2009 1:36:51 PM org.apache.coyote.http11.Http11BaseProtocol start
INFO: Starting Coyote HTTP/1.1 on http-8080
Jan 26, 2009 1:36:51 PM org.apache.catalina.storeconfig.StoreLoader load
INFO: Find registry server-registry.xml at classpath resource
Jan 26, 2009 1:36:52 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 57685 ms
11 REPLIES 11

mikeh
Star Contributor
Star Contributor
java.net.BindException: Address already in use:8080
*Something* is still listening on port 8080, so you need to track that down before trying to start Tomcat.

Thanks,
Mike

d_clark
Champ in-the-making
Champ in-the-making
Mike,

Thanks for the reply. I've checked with netstat and some GUI utilities and 8080 isn't being used or responding to requests at all…this one is stumping me.

Is there a way to change the port Tomcat and Alfresco listens on?

norgan
Champ in-the-making
Champ in-the-making
Hi there,
I am just guessing here, but try those :
0) check alfresco/tomcat/conf/server.xml for no of connectors with "8080" (Watch out for stray or double
<!–
1) killall java and do a telnet localhost 8080 and see if anybody answers
2) change alfresco/tomcat/conf/server.xml -> port=8080 to port=8081 (this will work with alfresco explorer, but not with share !)
3) download alfresco.war and deploy alfresco.war new
4) killall java and install alfresco into a second directory, using a different dabase to safeguard your current system. Start the 2nd system and watch
5) change the used JDK/JRE

God luck hunting

d_clark
Champ in-the-making
Champ in-the-making
Norgan,

Thanks for the tips. I checked the server config, it's ok - and also tried a different port with the same error (below, as the java breakout doesn't log now).

I guess next is to try a new install on the box.

Jan 26, 2009 3:30:08 PM org.apache.coyote.http11.Http11BaseProtocol init
INFO: Initializing Coyote HTTP/1.1 on http-8081
Jan 26, 2009 3:30:08 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 2533 ms
Jan 26, 2009 3:30:09 PM org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
Jan 26, 2009 3:30:09 PM org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/5.5.23
Jan 26, 2009 3:30:09 PM org.apache.catalina.core.StandardHost start
INFO: XML validation disabled
Jan 26, 2009 3:30:10 PM org.apache.catalina.startup.HostConfig deployWAR
INFO: Deploying web application archive alfresco.war
Jan 26, 2009 3:30:42 PM org.apache.catalina.core.StandardContext start
SEVERE: Error listenerStart
Jan 26, 2009 3:30:42 PM org.apache.catalina.core.StandardContext start
SEVERE: Context [/alfresco] startup failed due to previous errors
Jan 26, 2009 3:30:46 PM org.apache.coyote.http11.Http11BaseProtocol start
INFO: Starting Coyote HTTP/1.1 on http-8081
Jan 26, 2009 3:30:46 PM org.apache.catalina.storeconfig.StoreLoader load
INFO: Find registry server-registry.xml at classpath resource
Jan 26, 2009 3:30:46 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 37688 ms

nadaoneal
Champ in-the-making
Champ in-the-making
Before you do a new install on the box, try a ps auwwx | grep java to see if there are any stray alfresco/tomcat processes running. Kill them, if so, then try again.

d_clark
Champ in-the-making
Champ in-the-making
Upon trying this, I found three processes - two I could kill, the other, posted below, the PID keeps changing…my unix knowledge is fair at best, so I may be interpreting wrong:

root       411   0.0  0.0    27812      4  p1  R+    4:31PM   0:00.00 grep java

kill 411 returns "no such process"

Edit: I'm guessing this is the actual process I ran to find the java processes…

Edit: Installing to a new directory/new dbase returned the same error as well Smiley Sad. Thanks for your suggestions so far, though…

nadaoneal
Champ in-the-making
Champ in-the-making
1. Yep, "grep java" is indeed your own process to list the processes and grep for java. You can't kill it because it finished, and it has a new process id each time because it's a new process each time you do it. This makes me want to warn you - be careful when you're killing processes, check the words at the end of the line to make sure the process you're killing is alfresco-related.

2. So, you kill all the processes, then start up a fresh copy of the server, and you're still getting "java.net.BindException: Address already in use:8080"? Do you… do you have multiple copies of tomcat running on this machine? Are you starting something else up before you run the alfresco.sh startup?

d_clark
Champ in-the-making
Champ in-the-making
The error log has changed a bit now - I don't get the java details, just what is below:

Jan 26, 2009 3:30:08 PM org.apache.coyote.http11.Http11BaseProtocol init
INFO: Initializing Coyote HTTP/1.1 on http-8080
Jan 26, 2009 3:30:08 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 2533 ms
Jan 26, 2009 3:30:09 PM org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
Jan 26, 2009 3:30:09 PM org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/5.5.23
Jan 26, 2009 3:30:09 PM org.apache.catalina.core.StandardHost start
INFO: XML validation disabled
Jan 26, 2009 3:30:10 PM org.apache.catalina.startup.HostConfig deployWAR
INFO: Deploying web application archive alfresco.war
Jan 26, 2009 3:30:42 PM org.apache.catalina.core.StandardContext start
SEVERE: Error listenerStart
Jan 26, 2009 3:30:42 PM org.apache.catalina.core.StandardContext start
SEVERE: Context [/alfresco] startup failed due to previous errors
Jan 26, 2009 3:30:46 PM org.apache.coyote.http11.Http11BaseProtocol start
INFO: Starting Coyote HTTP/1.1 on http-8080
Jan 26, 2009 3:30:46 PM org.apache.catalina.storeconfig.StoreLoader load
INFO: Find registry server-registry.xml at classpath resource
Jan 26, 2009 3:30:46 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 37688 ms

Apache is listening on port 80, other than that - there's nothing else running or being started. Even with Apache shutdown, it throws the same error. I can get to the generic Tomcat home page (http://myserver.com:8080), but alfresco doesn't fire up.

norgan
Champ in-the-making
Champ in-the-making
Hi there,
when you reach the tomcat startpage, call up the /manager and check, which applications are installed. It sounds, as if there is some tomcat running at a different place as well. Because according to the log, the tomcat connector cannot start due to an used port - but is reachable throught he browser. Correct ?

Norgan