title: H2 database tcp remote via Shell: SQL Exception: Connection is broken: "java.net.SocketTimeoutException: connect timed out"
body: <p>Java (Servlet 3.1 webapp in Tomcat 8.5):</p>
  <pre><code>org.h2.tools.Server web = Server.createWebServer(&quot;-ifExists&quot;, &quot;-webSSL&quot;, &quot;-webPort&quot;, &quot;8085&quot;, &quot;-webAllowOthers&quot;).start();
  org.h2.tools.Server tcp = Server.createTcpServer(&quot;-ifExists&quot;, &quot;-tcpSSL&quot;, &quot;-tcpPort&quot;, &quot;8089&quot;, &quot;-tcpAllowOthers&quot;).start();
  </code></pre>
  <p>The H2 Console runs fine over the web after making adjustment in the properties file.<br />
  Running Shell from command line in a <strong>different machine</strong>:</p>
  <pre><code>$ java -cp h2-2.1.210.jar org.h2.tools.Shell
  </code></pre>
  <p>URLs I've tried (all failed):</p>
  <pre><code>jdbc:h2:tcp://mySite.net//Users/xyz/tomcat/webapps/ROOT/WEB-INF/database/myh2db;IFEXISTS=TRUE;MODE=MySQL;CASE_INSENSITIVE_IDENTIFIERS=TRUE
  jdbc:h2:tcp://mySite.net/Users/xyz/tomcat/webapps/ROOT/WEB-INF/database/myh2db;IFEXISTS=TRUE;MODE=MySQL;CASE_INSENSITIVE_IDENTIFIERS=TRUE
  jdbc:h2:tcp://mySite.net:8089/Users/xyz/tomcat/webapps/ROOT/WEB-INF/database/myh2db;IFEXISTS=TRUE;MODE=MySQL;CASE_INSENSITIVE_IDENTIFIERS=TRUE
  jdbc:h2:tcp://mySite.net:8089/file:/Users/xyz/tomcat/webapps/ROOT/WEB-INF/database/myh2db;IFEXISTS=TRUE;MODE=MySQL;CASE_INSENSITIVE_IDENTIFIERS=TRUE
  jdbc:h2:tcp://mySite.net:8089//file:Users/xyz/tomcat/webapps/ROOT/WEB-INF/database/myh2db;IFEXISTS=TRUE;MODE=MySQL;CASE_INSENSITIVE_IDENTIFIERS=TRUE
  jdbc:h2:ssl://mySite.net//Users/xyz/tomcat/webapps/ROOT/WEB-INF/database/myh2db;IFEXISTS=TRUE;MODE=MySQL;CASE_INSENSITIVE_IDENTIFIERS=TRUE
  jdbc:h2:ssl://mySite.net/Users/xyz/tomcat/webapps/ROOT/WEB-INF/database/myh2db;IFEXISTS=TRUE;MODE=MySQL;CASE_INSENSITIVE_IDENTIFIERS=TRUE
  jdbc:h2:ssl://mySite.net:8089/Users/xyz/tomcat/webapps/ROOT/WEB-INF/database/myh2db;IFEXISTS=TRUE;MODE=MySQL;CASE_INSENSITIVE_IDENTIFIERS=TRUE
  jdbc:h2:ssl://mySite.net:8089/file:/Users/xyz/tomcat/webapps/ROOT/WEB-INF/database/myh2db;IFEXISTS=TRUE;MODE=MySQL;CASE_INSENSITIVE_IDENTIFIERS=TRUE
  jdbc:h2:ssl://mySite.net:8089//file:Users/xyz/tomcat/webapps/ROOT/WEB-INF/database/myh2db;IFEXISTS=TRUE;MODE=MySQL;CASE_INSENSITIVE_IDENTIFIERS=TRUE
  </code></pre>
  <p>Shell gives same result every time (no log elsewhere to be found):</p>
  <pre><code>SQL Exception: Connection is broken: &quot;java.net.SocketTimeoutException: connect timed out&quot;
  </code></pre>
  <p>No lock on the db was seen.<br />
  What am I missing?</p>
  <p><strong>UPDATE</strong><br />
  After opening port 8089 on router, the following formats work:</p>
  <pre><code>jdbc:h2:tcp://mySite.net:8089/file:/Users/xyz/tomcat/webapps/ROOT/WEB-INF/database/myh2db;IFEXISTS=TRUE;MODE=MySQL;CASE_INSENSITIVE_IDENTIFIERS=TRUE
  jdbc:h2:tcp://mySite.net:8089//Users/xyz/tomcat/webapps/ROOT/WEB-INF/database/myh2db;IFEXISTS=TRUE;MODE=MySQL;CASE_INSENSITIVE_IDENTIFIERS=TRUE
  </code></pre>
  <p>Any URL using ssl fails with:</p>
  <pre><code>SQL Exception: Connection is broken: &quot;javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
  </code></pre>
  <p>Since port 8443 is already in use, I am unable to bind it to the TcpServer for ssl. I need to learn to open up another SSL/HTTPS port on Tomcat for H2 tcpSSL.</p>