title: neo4j-shell can not connect to neo4j Server
body: <p>I'm using docker version of neo4j (v3.1.0) and I'm having difficulties connecting to neo4j server using neo4j-shell.</p>
  
  <p>After running an instance of <code>neo4r:3.1.0</code> <a href="https://hub.docker.com/_/neo4j/" rel="noreferrer">docker</a>, I run a bash inside the container:</p>
  
  <pre><code>$ docker exec -it neo4j /bin/bash
  </code></pre>
  
  <p>And from there I try to run the <code>neo4j-shell</code> like this:</p>
  
  <pre><code>/var/lib/neo4j/bin/neo4j-shell
  </code></pre>
  
  <p>But it errors:</p>
  
  <pre><code>$ /var/lib/neo4j/bin/neo4j-shell 
  ERROR (-v for expanded information):
      Connection refused
  
   -host      Domain name or IP of host to connect to (default: localhost)
   -port      Port of host to connect to (default: 1337)
   -name      RMI name, i.e. rmi://&lt;host&gt;:&lt;port&gt;/&lt;name&gt; (default: shell)
   -pid       Process ID to connect to
   -c         Command line to execute. After executing it the shell exits
   -file      File containing commands to execute, or '-' to read from stdin. After executing it the shell exits
   -readonly  Connect in readonly mode (only for connecting with -path)
   -path      Points to a neo4j db path so that a local server can be started there
   -config    Points to a config file when starting a local server
  
  Example arguments for remote:
      -port 1337
      -host 192.168.1.234 -port 1337 -name shell
      -host localhost -readonly
      ...or no arguments for default values
  Example arguments for local:
      -path /path/to/db
      -path /path/to/db -config /path/to/neo4j.config
      -path /path/to/db -readonly
  </code></pre>
  
  <p>I also tried other hosts like: <code>localhost</code>, <code>127.0.0.1</code> and <code>172.17.0.6</code> (the container IP). Since it didn't work I tried to list open ports on my container:</p>
  
  <pre><code>$ netstat -l
  Active Internet connections (only servers)
  Proto Recv-Q Send-Q Local Address           Foreign Address         State       
  tcp        0      0 :::7687                 :::*                    LISTEN      
  tcp        0      0 :::7473                 :::*                    LISTEN      
  tcp        0      0 :::7474                 :::*                    LISTEN      
  Active UNIX domain sockets (only servers)
  Proto RefCnt Flags       Type       State         I-Node Path
  </code></pre>
  
  <p>As you can see there's no <code>1337</code> open! I've looked into the config file and the line for specifying port is commented out which means it should be set to its default value (1337).</p>
  
  <p>Can anyone help me connect to neo4j using neo4j-shell?</p>
  
  <p>BTW, the neo4j server is up and running and I can use its web access through port :7474.</p>