title: Connecting to neo4j on ec2
body: <p>I'm trying to connect to my newly setup neo4j </p>
  
  <p>This is how I have configured my neo4j.conf file:</p>
  
  <pre><code># With default configuration Neo4j only accepts local connections.
  # To accept non-local connections, uncomment this line:
  dbms.connectors.default_listen_address=0.0.0.0
  
  # You can also choose a specific network interface, and configure a non-default
  # port for each connector, by setting their individual listen_address.
  
  # The address at which this server can be reached by its clients. This may be the server's IP address or DNS name, or
  # it may be the address of a reverse proxy which sits in front of the server. This setting may be overridden for
  # individual connectors below.
  #dbms.connectors.default_advertised_address=localhost
  dbms.connectors.default_advertised_address=xx.xxx.xxx.xxx
  
  # You can also choose a specific advertised hostname or IP address, and
  # configure an advertised port for each connector, by setting their
  # individual advertised_address.
  
  # Bolt connector
  dbms.connector.bolt.enabled=true
  #dbms.connector.bolt.tls_level=OPTIONAL
  #dbms.connector.bolt.listen_address=:7687
  
  # HTTP Connector. There must be exactly one HTTP connector.
  dbms.connector.http.enabled=true
  #dbms.connector.http.listen_address=:7474
  
  # HTTPS Connector. There can be zero or one HTTPS connectors.
  dbms.connector.https.enabled=true
  #dbms.connector.https.listen_address=:7473
  </code></pre>
  
  <p>(xx.xxx.xxx.xxx being the ip of the day)</p>
  
  <p>In the log It says the remote interface is enabled on port 7474: </p>
  
  <pre><code>2016-12-12 21:17:06.845+0000 INFO  Starting...
  2016-12-12 21:17:07.860+0000 INFO  Bolt enabled on 0.0.0.0:7687.
  2016-12-12 21:17:10.666+0000 INFO  Started.
  2016-12-12 21:17:12.234+0000 INFO  Remote interface available at http://xx.xxx.xxx.xxx:7474/
  </code></pre>
  
  <p>Using lsof -i -n -P I can see that it is listening:</p>
  
  <pre><code>java     xxxx    root  xxxx  IPv6  xxxxx      0t0  TCP *:7474 (LISTEN)
  </code></pre>
  
  <p>I did set up a custom tcp rule to allow access from my ip address:</p>
  
  <p>Custom TCP Rule TCP 7474 xxx.xxx.xxx.xxx/xx</p>
  
  <p>I do get it to display in my browser and I get asked to fill in password but when I do I get the following message:</p>
  
  <blockquote>
    <p><em>Can not connect to neo4j. Please check your Network Connection.</em></p>
  </blockquote>
  
  <p>After a while this one message appears as well:</p>
  
  <blockquote>
    <p><em>WebSocket connection failure. Due to security constraints in your web browser, the reason for the failure is not available to this Neo4j Driver. Please use your browsers development console to determine the root cause of the failure. Common reasons include the database being unavailable, using the wrong connection URL or temporary network problems. If you have enabled encryption, ensure your browser is configured to trust the certificate Neo4j is configured to use. WebSocket <code>readyState</code> is: 3</em></p>
  </blockquote>
  
  <p>I've tried several different settings but none of them has got me further than this.</p>
  
  <p>The closest thread I've found is this one <a href="https://stackoverflow.com/questions/21998745/neo4j-on-amazin-ec2-not-accessible-from-remote-machines?rq=1">Neo4j on Amazin EC2 - Not accessible from remote machines</a> but it does not have an answer and concerns another version (using the neo4j-server.properties).</p>