# Installed on an AWS server, but unable to access Neo4j from another machine

**URL:** <https://community.neo4j.com/t/installed-on-an-aws-server-but-unable-to-access-neo4j-from-another-machine/40859>\
**Category:** Installation\
**Tags:** aws, operations, ubuntu\
**Created:** [July 4, 2021, 10:30am UTC](https://community.neo4j.com/t/installed-on-an-aws-server-but-unable-to-access-neo4j-from-another-machine/40859 "2021-07-04T10:30:28Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![p.dipietro](https://sea1.discourse-cdn.com/flex021/user_avatar/community.neo4j.com/p.dipietro/32/19019_2.png) [@p.dipietro](https://community.neo4j.com/u/p.dipietro)\
**Post date:** [July 4, 2021, 10:30am UTC](https://community.neo4j.com/t/installed-on-an-aws-server-but-unable-to-access-neo4j-from-another-machine/40859/1 "2021-07-04T10:30:28Z")

</div>

Hi all!

- OS: Ubuntu 20.04 server installed on an Amazon ec2 machine
- neo4j version: 4.0.1

I'm trying to install neo4j communiti server into an Ubuntu machine running on AWS.

I cannot successfully run neo4j. There is a real mess with the ports.

First: The machine starts on port 7474:  
**Started neo4j (pid 35722). It is available at [http://localhost:7474](http://localhost:7474).**

**The following ports are opened on aws**

| Type | Protocol | Port range | Source | Description - optional |
| --- | --- | --- | --- | --- |
| HTTP | TCP | 80 | 0.0.0.0/0 | – |
| SSH | TCP | 22 | 0.0.0.0/0 | – |
| Custom TCP | TCP | 7474 | 0.0.0.0/0 | – |
| Custom TCP | TCP | 7687 | 0.0.0.0/0 | – |

I have the following config files:

**neo4j.conf**  
dbms.connector.bolt.listen\_address=7687  
dbms.connector.http.listen\_address=7474

dbms.default\_listen\_address=0.0.0.0  
dbms.default\_advertised\_address=0.0.0.0

**The following test looks correct (for me!)**  
curl localhost:7474

{  
"bolt\_routing" : "neo4j://0.0.0.0:7687",  
"transaction" : "[http://localhost:7474/db/{databaseName}/tx](http://localhost:7474/db/%7BdatabaseName%7D/tx)",  
"bolt\_direct" : "bolt://0.0.0.0:7687",  
"neo4j\_version" : "4.0.11",  
"neo4j\_edition" : "community"  
}

Finally, when I try to connect it give me the login screen for neo4j, but when I insert the username and password it returns the following two errors:

**Could not connect with the "neo4j://" scheme to this Neoj server. Automatic retry using the "bolt://" scheme in a moment...**

And the bolt scheme fails too, with the following message:

\*\*ServiceUnavailable: WebSocket connection failure. Due to security constraints in your web browser, the reason for the failure is not available to this Neo4j Driver. \*\*

Any help will be highly apppreciated!

---

<div class="post-metadata">

**Author:** ![michael.hunger](https://sea1.discourse-cdn.com/flex021/user_avatar/community.neo4j.com/michael.hunger/32/27377_2.png) [@michael.hunger](https://community.neo4j.com/u/michael.hunger)\
**Post date:** [July 5, 2021, 8:53am UTC](https://community.neo4j.com/t/installed-on-an-aws-server-but-unable-to-access-neo4j-from-another-machine/40859/2 "2021-07-05T08:53:30Z")

</div>

I don't think you should change the advertised address to 0.0.0.0 rather use your public ip address there. Otherwise the clients try to find your database under the 0.0.0.0 address.

---

<div class="post-metadata">

**Author:** ![p.dipietro](https://sea1.discourse-cdn.com/flex021/user_avatar/community.neo4j.com/p.dipietro/32/19019_2.png) [@p.dipietro](https://community.neo4j.com/u/p.dipietro)\
**Post date:** [July 10, 2021, 3:16pm UTC](https://community.neo4j.com/t/installed-on-an-aws-server-but-unable-to-access-neo4j-from-another-machine/40859/3 "2021-07-10T15:16:21Z")

</div>

Hi Michael, I'll be very happy if you could help me to connect my DB.  
At the moment, I reinstalled everything and I'm in my intranet.  
I'm using neo4jrb, community edition 4.0.11 running on Ubuntu 20.04

Neo4j is running on a machine with ip address 192.168.1.104  
I have changed the

- dbms.default\_listen\_address=0.0.0.0
- default\_advertised\_address is commented

With this configuration I can access the DB from localhost, but not from another machine on the network.

I tryed to change the default\_advertised\_address to the ip address of the server

- dbms.default\_advertised\_address to 192.168.1.104

Now, I cannot connect anymore: if I try to connect to locahost on the server machine, it present the server connect page, but returns a websocket connection failure.

If I try to connect to 192.168.1.104 it refuses the connection.

Have you any idea of how to solve this problem?

Thank you  
Paolo

---

<div class="post-metadata">

**Author:** ![michael.hunger](https://sea1.discourse-cdn.com/flex021/user_avatar/community.neo4j.com/michael.hunger/32/27377_2.png) [@michael.hunger](https://community.neo4j.com/u/michael.hunger)\
**Post date:** [July 11, 2021, 10:13pm UTC](https://community.neo4j.com/t/installed-on-an-aws-server-but-unable-to-access-neo4j-from-another-machine/40859/4 "2021-07-11T22:13:40Z")

</div>

The 192 ip is a private ip you need to use the public ip of your aws instance

You should also use a more recent version of neo4j

---

<div class="post-metadata">

**Author:** ![p.dipietro](https://sea1.discourse-cdn.com/flex021/user_avatar/community.neo4j.com/p.dipietro/32/19019_2.png) [@p.dipietro](https://community.neo4j.com/u/p.dipietro)\
**Post date:** [July 12, 2021, 7:55am UTC](https://community.neo4j.com/t/installed-on-an-aws-server-but-unable-to-access-neo4j-from-another-machine/40859/5 "2021-07-12T07:55:19Z")

</div>

Well, about the private IP, I just reinstalled everything on my local server, with the same result.

About your suggestion to use a newer version, I ma horrified: I'm trying to ise the neo4jrb support and the 4.0.1 is the latest version supported.

I was very disappointed when and how neo4j abandoned the official support to ruby!!!  
So, just now, I have been forced to abandone ruby too.

Now I'm trying to use node with express. When I'll have an installed version on my local server, I'll will return to you to solve the access problem.
