title: Tomcat 8 running but refused to connect
body: <p>I am currently running an instance of Tomcat8 on a ubuntu server that I installed using <code>apt-get install tomcat8</code>. I hosted an application  and it was running fine without a SSL certificate. </p>
  
  <p>Recently I bought a SSL certificate from <em>sslcertificate.com</em> and followed <em><a href="https://support.comodo.com/index.php?/Knowledgebase/Article/View/638/0/certificate-installation-java-based-web-servers-tomcat-using-keytool" rel="nofollow noreferrer">https://support.comodo.com/index.php?/Knowledgebase/Article/View/638/0/certificate-installation-java-based-web-servers-tomcat-using-keytool</a></em> to install it. I was able to package it together and configure the <code>server.xml</code> file.</p>
  
  <p>Here is what the <code>server.xml</code> file looks like:</p>
  
  <pre><code>&lt;Connector port="80" protocol="HTTP/1.1"
             connectionTimeout="20000"
             URIEncoding="UTF-8"
             redirectPort="443"
              useIPVHosts="true"/&gt;
  
  &lt;Connector port="443" protocol="org.apache.coyote.http11.Http11NioProtocol"
             maxThreads="150" SSLEnabled="true" scheme="https" secure="true"
             clientAuth="false" sslProtocol="TLS" keyAlias="tomcat" keystoreFile="myfile.jks" keystorePass="my_pass"/&gt;
  </code></pre>
  
  <p>Nothing else was changed and the server suddenly stopped working. When I try to go to my site it says that the server refused to connect.  I tried to remove the changes I made to the <code>server.xml</code> but it's still refusing to connect. </p>
  
  <p>I tried <code>sudo lsof -i -P -n | grep LISTEN</code> and this was the output:</p>
  
  <pre><code>sshd     1018    root    3u  IPv4  13571      0t0  TCP *:22 (LISTEN)
  sshd     1018    root    4u  IPv6  13573      0t0  TCP *:22 (LISTEN)
  mysqld   1083   mysql   19u  IPv4  16958      0t0  TCP 127.0.0.1:3306 
  (LISTEN)
  sshd     1351  ubuntu    9u  IPv6  13938      0t0  TCP [::1]:6010 (LISTEN)
  sshd     1351  ubuntu   10u  IPv4  13939      0t0  TCP 127.0.0.1:6010 
  (LISTEN)
  sshd     2623  ubuntu    9u  IPv6  22382      0t0  TCP [::1]:6011 (LISTEN)
  sshd     2623  ubuntu   10u  IPv4  22383      0t0  TCP 127.0.0.1:6011 
  (LISTEN)
  java     2721 tomcat8   62u  IPv4  21439      0t0  TCP 127.0.0.1:8005 
  (LISTEN)
  </code></pre>
  
  <p>I'm not sure what is wrong. Any help is appreciated!</p>