# Tomcat6 startup errors



## badhat101 (Nov 6, 2011)

I'm trying to use Tomcat to run a media server but I am having some issues. I cannot access the webapp that Tomcat is support to start, but I can access my Tomcat page at localhost:8180.

From the log files I find in /usr/local/apache-tomcat-6.0/logs/catalina.out:


```
INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the
 java.library.path:
 /usr/local/jdk1.6.0/jre/lib/i386/client:/usr/local/jdk1.6.0/jre/lib/i386:/usr/local/jdk1.6.0/jre/../lib/i386:/usr/java/packages/lib/i386:/lib:
/usr/lib:/usr/local/lib
Nov 6, 2011 2:54:46 PM org.apache.coyote.http11.Http11Protocol init
SEVERE: Error initializing endpoint
java.net.BindException: Address already in use <null>:8180
	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:359)
	at java.net.ServerSocket.bind(ServerSocket.java:319)
	at java.net.ServerSocket.<init>(ServerSocket.java:185)
	at java.net.ServerSocket.<init>(ServerSocket.java:141)
	at org.apache.tomcat.util.net.DefaultServerSocketFactory.createSocket(DefaultServerSocketFactory.java:50)
	at org.apache.tomcat.util.net.JIoEndpoint.init(JIoEndpoint.java:538)
	... 12 more
Nov 6, 2011 2:54:46 PM org.apache.catalina.core.StandardService initialize
SEVERE: Failed to initialize connector [Connector[HTTP/1.1-8180]]
LifecycleException:  Protocol handler initialization failed: java.net.BindException: Address already in use <null>:8180
	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)
```

I'm also seeing a line that says:


```
SEVERE: Unable to set localhost. This prevents creation of a GUID. Cause was: mediaserver.badhat.org: mediaserver.badhat.org
java.net.UnknownHostException: mediaserver.badhat.org: mediaserver.badhat.org
	at java.net.InetAddress.getLocalHost(InetAddress.java:1353)
```

Finally, the program I'm using as a media server is called subsonic (www/subsonic) and this shows up in the log as well.


```
SEVERE: The web application [/subsonic] registered the JDBC driver [org.hsqldb.jdbcDriver] but failed to unregister it when the web
 application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.
Nov 6, 2011 2:54:56 PM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
SEVERE: The web application [/subsonic] appears to have started a thread named [HSQLDB Timer @cec78d] but has failed to stop it. This is very
 likely to create a memory leak.
Nov 6, 2011 2:54:56 PM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
SEVERE: The web application [/subsonic] appears to have started a thread named [Timer-0] but has failed to stop it. This is very likely to
 create a memory leak.
Nov 6, 2011 2:54:56 PM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
SEVERE: The web application [/subsonic] appears to have started a thread named [pool-1-thread-1] but has failed to stop it. This is very likely
 to create a memory leak.
Nov 6, 2011 2:54:56 PM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
SEVERE: The web application [/subsonic] appears to have started a thread named [pool-1-thread-2] but has failed to stop it. This is very likely
 to create a memory leak.
Nov 6, 2011 2:54:56 PM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
SEVERE: The web application [/subsonic] appears to have started a thread named [pool-2-thread-1] but has failed to stop it. This is very likely
 to create a memory leak.
Nov 6, 2011 2:54:56 PM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
SEVERE: The web application [/subsonic] appears to have started a thread named [pool-3-thread-1] but has failed to stop it. This is very likely
 to create a memory leak.
Nov 6, 2011 2:54:58 PM org.apache.coyote.http11.Http11Protocol destroy
INFO: Stopping Coyote HTTP/1.1 on http-8180
```

Where do I even begin with fixing this?


----------

