title: Tornado secure websocket timeout
body: <p>My server got 2 Ip's (<strong>ip1 &amp; ip2</strong>) i recently added ip2. When i try to open my tornado websocketserver on ip1 (where <code>apache2</code> is running) everything is fine, i specify a port e.g. 22000 and can connect to my <code>socket</code> via <code>wss://domain.tld:22000/sub</code></p>
  
  <p>However as soon as i configured tornado to listen on <strong>ip2</strong> (where apache is not running), because i have to use the port 443, which is blocked by apache on ip1, I can't connect to it via <code>wss://sockets.domain.tld:443/sub</code>. The <code>DNS</code> A record points to ip2. </p>
  
  <blockquote>
    <p>The connection times out. No matter which port or protocol (wss / ws) i use.</p>
  </blockquote>
  
  <p><br />
  My python code:</p>
  
  <pre><code>from tornado import web
  from tornado import ioloop
  from tornado import websocket
  from tornado import httpserver
  import ssl
  import json
  import random
  import re
  import os
  
  application = web.Application([(r"/sub", Client)])
  http_server = httpserver.HTTPServer(application,  ssl_options = {
      "certfile": os.path.join(LIB_DIR, "certificate.crt"),
      "keyfile": os.path.join(LIB_DIR, "certificate.key"),
  })
  http_server.bind(443, address = "ip2")
  print("Listening to ip2:443")
  ioloop.IOLoop.current().start()
  </code></pre>
  
  <p>My Server is running on <code>Ubuntu 12.2</code>, I opened the ports and checked with an external tool if they are open. </p>
  
  <p><a href="https://i.stack.imgur.com/OORrE.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/OORrE.png" alt="enter image description here"></a></p>
  
  <p>How can i fix this? Has it something to do with my server?</p>
  
  <p><strong>UPDATE</strong>
  I'm quite sure it has to do with <code>http_server.bind(...)</code>, the code does work with <code>.listen(port)</code>, but ip1 and bind does also not work.</p>