连接到EC2上的neo4j [英] Connecting to neo4j on ec2

查看:190
本文介绍了连接到EC2上的neo4j的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试连接到新设置的neo4j

I'm trying to connect to my newly setup neo4j

这是我配置neo4j.conf文件的方式:

This is how I have configured my neo4j.conf file:

# 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)

(xx.xxx.xxx.xxx being the ip of the day)

在日志中说,远程端口已在端口7474上启用:

In the log It says the remote interface is enabled on port 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 -P我可以看到它正在监听:

Using lsof -i -n -P I can see that it is listening:

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

我确实设置了一个自定义tcp规则,以允许从我的IP地址进行访问:

I did set up a custom tcp rule to allow access from my ip address:

自定义TCP规则TCP 7474 xxx.xxx.xxx.xxx/xx

Custom TCP Rule TCP 7474 xxx.xxx.xxx.xxx/xx

我确实将其显示在浏览器中,并要求我输入密码,但是当我这样做时,会收到以下消息:

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:

无法连接到neo4j.请检查您的网络连接.

过一会儿,该消息也会出现:

After a while this one message appears as well:

WebSocket连接失败.由于您的Web浏览器中的安全限制,因此Neo4j驱动程序无法找到失败的原因.请使用浏览器开发控制台确定失败的根本原因.常见原因包括数据库不可用,使用错误的连接URL或临时网络问题.如果启用了加密,请确保将浏览器配置为信任Neo4j配置为使用的证书. WebSocket readyState是:3

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 readyState is: 3

我尝试了几种不同的设置,但没有一个比这更让我印象深刻了.

I've tried several different settings but none of them has got me further than this.

我找到的最接近的线程是这个

The closest thread I've found is this one Neo4j on Amazin EC2 - Not accessible from remote machines but it does not have an answer and concerns another version (using the neo4j-server.properties).

推荐答案

在设置中选中请勿使用螺栓"选项可以解决此问题.

Ticking the "Do not use Bolt" option in settings solved the issue.

这篇关于连接到EC2上的neo4j的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆