title: My tomcat is running but I can't connect to http://localhost:8080
body: <p>Tomcat suddenly stopped connecting to <a href="http://localhost:8080" rel="nofollow">http://localhost:8080</a> today. It was working until yesterday, and I didn't change anything. Windows - Windows 7 64 bit. Tomcat - 7.0.59. Can anyone please help.</p>
  
  <p>Following is my server.xml</p>
  
  <pre><code>&lt;Connector port="8080" protocol="HTTP/1.1"
             connectionTimeout="20000"
             redirectPort="8443" /&gt;
  &lt;!-- A "Connector" using the shared thread pool--&gt;
  &lt;!--
  &lt;Connector executor="tomcatThreadPool"
             port="8080" protocol="HTTP/1.1"
             connectionTimeout="20000"
             redirectPort="8443" /&gt;
  --&gt;
  &lt;!-- Define a SSL HTTP/1.1 Connector on port 8443
       This connector uses the BIO implementation that requires the JSSE
       style configuration. When using the APR/native implementation, the
       OpenSSL style configuration is required as described in the APR/native
       documentation --&gt;
  &lt;!--
  &lt;Connector port="8443" protocol="org.apache.coyote.http11.Http11Protocol"
             maxThreads="150" SSLEnabled="true" scheme="https" secure="true"
             clientAuth="false" sslProtocol="TLS" /&gt;
  --&gt;
  
  &lt;!-- Define an AJP 1.3 Connector on port 8009 --&gt;
  &lt;Connector port="8009" protocol="AJP/1.3" redirectPort="8443" /&gt;
  </code></pre>
  
  <p>"</p>
  
  <pre><code>Jul 2, 2015 12:13:05 PM org.apache.catalina.startup.VersionLoggerListener log
  INFO: Server version:        Apache Tomcat/7.0.59
  Jul 2, 2015 12:13:05 PM org.apache.catalina.startup.VersionLoggerListener log
  INFO: Server built:          Jan 28 2015 15:51:10 UTC
  Jul 2, 2015 12:13:05 PM org.apache.catalina.startup.VersionLoggerListener log
  INFO: Server number:         7.0.59.0
  Jul 2, 2015 12:13:05 PM org.apache.catalina.startup.VersionLoggerListener log
  INFO: OS Name:               Windows 7
  Jul 2, 2015 12:13:05 PM org.apache.catalina.startup.VersionLoggerListener log
  INFO: OS Version:            6.1
  Jul 2, 2015 12:13:05 PM org.apache.catalina.startup.VersionLoggerListener log
  INFO: Architecture:          x86
  Jul 2, 2015 12:13:05 PM org.apache.catalina.startup.VersionLoggerListener log
  INFO: Java Home:             C:\gagan_backup\Java1\Java\jdk1.6.0_17\jre
  Jul 2, 2015 12:13:05 PM org.apache.catalina.startup.VersionLoggerListener log
  INFO: JVM Version:           1.6.0_17-b04
  Jul 2, 2015 12:13:05 PM org.apache.catalina.startup.VersionLoggerListener log
  INFO: JVM Vendor:            Sun Microsystems Inc.
  Jul 2, 2015 12:13:05 PM org.apache.catalina.startup.VersionLoggerListener log
  INFO: CATALINA_BASE:         C:\Tomcat\apache-tomcat-7.0.59
  Jul 2, 2015 12:13:05 PM org.apache.catalina.startup.VersionLoggerListener log
  INFO: CATALINA_HOME:         C:\Tomcat\apache-tomcat-7.0.59
  Jul 2, 2015 12:13:05 PM org.apache.catalina.startup.VersionLoggerListener log
  INFO: Command line argument: -Djava.util.logging.config.file=C:\Tomcat\apache-tomcat-7.0.59\conf\logging.properties
  Jul 2, 2015 12:13:05 PM org.apache.catalina.startup.VersionLoggerListener log
  INFO: Command line argument: -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
  Jul 2, 2015 12:13:05 PM org.apache.catalina.startup.VersionLoggerListener log
  INFO: Command line argument: -Djava.endorsed.dirs=C:\Tomcat\apache-tomcat-7.0.59\endorsed
  Jul 2, 2015 12:13:05 PM org.apache.catalina.startup.VersionLoggerListener log
  INFO: Command line argument: -Dcatalina.base=C:\Tomcat\apache-tomcat-7.0.59
  Jul 2, 2015 12:13:05 PM org.apache.catalina.startup.VersionLoggerListener log
  INFO: Command line argument: -Dcatalina.home=C:\Tomcat\apache-tomcat-7.0.59
  Jul 2, 2015 12:13:05 PM org.apache.catalina.startup.VersionLoggerListener log
  INFO: Command line argument: -Djava.io.tmpdir=C:\Tomcat\apache-tomcat-7.0.59\temp
  Jul 2, 2015 12:13:05 PM org.apache.catalina.core.AprLifecycleListener lifecycleEvent
  INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: C:\gagan_backup\Java1\Java\jdk1.6.0_17\bin;.;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;C:\ora11g\client_1\bin;C:\Program Files\IBM\RationalSDLC\common;C:\Program Files (x86)\AMD APP\bin\x86_64;C:\Program Files (x86)\AMD APP\bin\x86;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Program Files (x86)\ATI Technologies\ATI.ACE\Core-Static;C:\Program Files\Microsoft\Web Platform Installer\;c:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\;c:\Program Files\Microsoft SQL Server\100\Tools\Binn\;c:\Program Files\Microsoft SQL Server\100\DTS\Binn\;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\IBM\RationalSDLC\ClearCase\bin;C:\Program Files (x86)\IBM\gsk8\lib;C:\Program Files (x86)\IBM\gsk8\bin;C:\Program Files (x86)\MIT\Kerberos\bin;C:\Program Files\Microsoft SQL Server\110\Tools\Binn\;C:\Program Files\Microsoft SQL Server\120\Tools\Binn\;C:\Program Files (x86)\Microsoft SDKs\TypeScript\1.0\;C:\gagan_backup\Java1\Java\jdk1.6.0_17\bin;C:\ora11g\client_1\bin;C:\Program Files\IBM\RationalSDLC\common;C:\Program Files (x86)\AMD APP\bin\x86_64;C:\Program Files (x86)\AMD APP\bin\x86;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Program Files (x86)\ATI Technologies\ATI.ACE\Core-Static;C:\Program Files\Microsoft\Web Platform Installer\;c:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\;c:\Program Files\Microsoft SQL Server\100\Tools\Binn\;c:\Program Files\Microsoft SQL Server\100\DTS\Binn\;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\IBM\RationalSDLC\ClearCase\bin;C:\Program Files (x86)\IBM\gsk8\lib;C:\Program Files (x86)\IBM\gsk8\bin;C:\Program Files (x86)\MIT\Kerberos\bin;C:\Program Files\Microsoft SQL Server\110\Tools\Binn\;C:\Program Files\Microsoft SQL Server\120\Tools\Binn\;C:\Program Files (x86)\Microsoft SDKs\TypeScript\1.0\;C:\Users\gthapar\Desktop\jar\sqljdbc_4.0\enu\auth\x86
  Jul 2, 2015 12:13:05 PM org.apache.coyote.AbstractProtocol init
  INFO: Initializing ProtocolHandler ["http-bio-8080"]
  Jul 2, 2015 12:13:05 PM org.apache.coyote.AbstractProtocol init
  INFO: Initializing ProtocolHandler ["ajp-bio-8009"]
  Jul 2, 2015 12:13:05 PM org.apache.catalina.startup.Catalina load
  INFO: Initialization processed in 343 ms
  Jul 2, 2015 12:13:06 PM org.apache.catalina.core.StandardService startInternal
  INFO: Starting service Catalina
  Jul 2, 2015 12:13:06 PM org.apache.catalina.core.StandardEngine startInternal
  INFO: Starting Servlet Engine: Apache Tomcat/7.0.59
  Jul 2, 2015 12:13:06 PM org.apache.catalina.startup.HostConfig deployDirectory
  INFO: Deploying web application directory C:\Tomcat\apache-tomcat-7.0.59\webapps\docs
  Jul 2, 2015 12:13:06 PM org.apache.tomcat.websocket.server.WsSci onStartup
  INFO: JSR 356 WebSocket (Java WebSocket 1.1) support is not available when running on Java 6. To suppress this message, run Tomcat on Java 7, remove the WebSocket JARs from $CATALINA_HOME/lib or add the WebSocket JARs to the tomcat.util.scan.DefaultJarScanner.jarsToSkip property in $CATALINA_BASE/conf/catalina.properties. Note that the deprecated Tomcat 7 WebSocket API will be available. 
  Jul 2, 2015 12:13:06 PM org.apache.catalina.startup.HostConfig deployDirectory
  INFO: Deployment of web application directory C:\Tomcat\apache-tomcat-7.0.59\webapps\docs has finished in 181 ms
  Jul 2, 2015 12:13:06 PM org.apache.catalina.startup.HostConfig deployDirectory
  INFO: Deploying web application directory C:\Tomcat\apache-tomcat-7.0.59\webapps\examples
  Jul 2, 2015 12:13:06 PM org.apache.catalina.startup.HostConfig deployDirectory
  INFO: Deployment of web application directory C:\Tomcat\apache-tomcat-7.0.59\webapps\examples has finished in 261 ms
  Jul 2, 2015 12:13:06 PM org.apache.catalina.startup.HostConfig deployDirectory
  INFO: Deploying web application directory C:\Tomcat\apache-tomcat-7.0.59\webapps\host-manager
  Jul 2, 2015 12:13:06 PM org.apache.catalina.startup.HostConfig deployDirectory
  INFO: Deployment of web application directory C:\Tomcat\apache-tomcat-7.0.59\webapps\host-manager has finished in 46 ms
  Jul 2, 2015 12:13:06 PM org.apache.catalina.startup.HostConfig deployDirectory
  INFO: Deploying web application directory C:\Tomcat\apache-tomcat-7.0.59\webapps\manager
  Jul 2, 2015 12:13:06 PM org.apache.catalina.startup.HostConfig deployDirectory
  INFO: Deployment of web application directory C:\Tomcat\apache-tomcat-7.0.59\webapps\manager has finished in 71 ms
  Jul 2, 2015 12:13:06 PM org.apache.catalina.startup.HostConfig deployDirectory
  INFO: Deploying web application directory C:\Tomcat\apache-tomcat-7.0.59\webapps\ROOT
  Jul 2, 2015 12:13:06 PM org.apache.catalina.startup.HostConfig deployDirectory
  INFO: Deployment of web application directory C:\Tomcat\apache-tomcat-7.0.59\webapps\ROOT has finished in 35 ms
  Jul 2, 2015 12:13:06 PM org.apache.coyote.AbstractProtocol start
  INFO: Starting ProtocolHandler ["http-bio-8080"]
  Jul 2, 2015 12:13:06 PM org.apache.coyote.AbstractProtocol start
  INFO: Starting ProtocolHandler ["ajp-bio-8009"]
  Jul 2, 2015 12:13:06 PM org.apache.catalina.startup.Catalina start
  INFO: Server startup in 624 ms
  </code></pre>
  
  <p>"</p>
  
  <p>Server is running, but when I try to stop it, I get the following error. Can it provide any hint.</p>
  
  <pre><code>Jul 2, 2015 12:30:51 PM org.apache.catalina.startup.Catalina stopServer
  SEVERE: Could not contact localhost:8005. Tomcat may not be running.
  Jul 2, 2015 12:30:51 PM org.apache.catalina.startup.Catalina stopServer
  SEVERE: Catalina.stop:
  java.net.ConnectException: Connection timed out: connect
          at java.net.PlainSocketImpl.socketConnect(Native Method)
          at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
          at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
          at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
          at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
          at java.net.Socket.connect(Socket.java:525)
          at java.net.Socket.connect(Socket.java:475)
          at java.net.Socket.&lt;init&gt;(Socket.java:372)
          at java.net.Socket.&lt;init&gt;(Socket.java:186)
          at org.apache.catalina.startup.Catalina.stopServer(Catalina.java:498)
          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
          at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
  java:39)
          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
  sorImpl.java:25)
          at java.lang.reflect.Method.invoke(Method.java:597)
          at org.apache.catalina.startup.Bootstrap.stopServer(Bootstrap.java:370)
          at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:457)
  C:\Tomcat\apache-tomcat-7.0.59\bin&gt;
  </code></pre>