2016-12-12 82 views
1

我試圖連接到我的新設置的Neo4j連接到Neo4j的EC2上

這是我已經配置了我的neo4j.conf文件:

# 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 

(xx.xxx.xxx.xxx作爲當天的IP)

在日誌報告說,遠程接口在端口7474啓用:

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/ 

使用lsof的-i -n-PI可以看到它正在監聽:

java  xxxx root xxxx IPv6 xxxxx  0t0 TCP *:7474 (LISTEN) 

我並建立一個自定義的TCP規則,允許從我的IP地址進行訪問:

自定義TCP規則TCP 7474 xxx.xxx.xxx.xxx/XX

我得到它在我的瀏覽器中顯示和我要求填寫密碼,但是當我做我得到以下信息:

無法連接到Neo4j的。請檢查您的網絡連接。

過了一會出現這一消息,以及:

WebSocket連接失敗。由於您的網絡瀏覽器存在安全限制,此故障原因不適用於此Neo4j驅動程序。請使用您的瀏覽器開發控制檯來確定失敗的根本原因。常見原因包括數據庫不可用,使用錯誤的連接URL或臨時網絡問題。如果您已啓用加密,請確保您的瀏覽器已配置爲信任Neo4j配置爲使用的證書。 WebSocket的readyState是:3

我試過幾個不同的設置,但它們都沒有讓我進一步莫過於此。

我發現的最接近的線程是這一個Neo4j on Amazin EC2 - Not accessible from remote machines,但它沒有答案並且涉及到另一個版本(使用neo4j-server.properties)。

+0

您是否試過在瀏覽器設置(左下角的齒輪圖標)中勾選「在可用時使用BOLT協議」? –

+0

這解決了這個問題。 – oht

回答

0

在設置中選中「不使用螺栓」選項可解決問題。

+0

在Neo4j CE 3.2.1上,我在neo4j瀏覽器設置中使用「使用螺栓+佈線」,並勾選/取消勾選不起作用 – Mahesha999