Google Cloud Compute 인스턴스에 neo4j 데이터베이스를 설치했으며 랩톱에서 데이터베이스에 연결하려고합니다.DB 서버에 대한 외부 액세스를 허용하도록 Google Cloud Compute 방화벽 구성
[1] 나는 neo4j Google 클라우드에서 실행 한
● neo4j.service - Neo4j Graph Database
Loaded: loaded (/lib/systemd/system/neo4j.service; disabled; vendor preset: enabled)
Active: active (running) since Sat 2017-09-30 09:33:39 UTC; 1h 3min ago
Main PID: 2099 (java)
Tasks: 41
Memory: 504.5M
CPU: 18.652s
CGroup: /system.slice/neo4j.service
└─2099 /usr/bin/java -cp /var/lib/neo4j/plugins:/etc/neo4j:/usr/share/neo4j/lib/*:/var/lib/neo4j/plugins/* -server -XX:+UseG1GC -XX:-OmitStackTraceInFastThrow -XX:+AlwaysPreTouch -XX:+U
nlockExperimentalVMOptions -XX:+TrustFinalNonStaticFields -XX:+DisableExplicitGC -Djdk.tls.ephemeralDHKeySize=2048 -Dunsupported.dbms.udc.source=debian -Dfile.encoding=UTF-8 org.neo4j.server.Commu
nityEntryPoint --home-dir=/var/lib/neo4j --config-dir=/etc/neo4j
Sep 30 09:33:40 neo4j-graphdb-server neo4j[2099]: certificates: /var/lib/neo4j/certificates
Sep 30 09:33:40 neo4j-graphdb-server neo4j[2099]: run: /var/run/neo4j
Sep 30 09:33:40 neo4j-graphdb-server neo4j[2099]: Starting Neo4j.
Sep 30 09:33:42 neo4j-graphdb-server neo4j[2099]: 2017-09-30 09:33:42.948+0000 INFO ======== Neo4j 3.2.5 ========
Sep 30 09:33:42 neo4j-graphdb-server neo4j[2099]: 2017-09-30 09:33:42.988+0000 INFO Starting...
Sep 30 09:33:44 neo4j-graphdb-server neo4j[2099]: 2017-09-30 09:33:44.308+0000 INFO Bolt enabled on 127.0.0.1:7687.
Sep 30 09:33:47 neo4j-graphdb-server neo4j[2099]: 2017-09-30 09:33:47.043+0000 INFO Started.
Sep 30 09:33:48 neo4j-graphdb-server neo4j[2099]: 2017-09-30 09:33:48.160+0000 INFO Remote interface available at http://localhost:7474/
Sep 30 09:39:17 neo4j-graphdb-server neo4j[2099]: 2017-09-30 09:39:17.918+0000 WARN badMessage: 400 No URI for [email protected]{r=0,c=false,a=IDLE,uri=-}
Sep 30 09:46:18 neo4j-graphdb-server neo4j[2099]: 2017-09-30 09:46:18.374+0000 WARN badMessage: 400 for [email protected]{r=0,c=false,a=IDLE,uri=-}
나는 DB 서버
에 대한 외부 액세스를 허용하도록 Google 클라우드에 방화벽 규칙을 만들었습니다 [2] "google-db-server"네트워크 태그가 Google Cloud Compute 서버에 추가되었습니다.
는 내 기대 규칙이 아래에 외부 기기가 Google 클라우드 컴퓨팅 인스턴스의 포트 7474에 연결할 수 있도록하는 것입니다 는[email protected]:~/home$ gcloud compute firewall-rules create custom-allow-neo4j --action ALLOW --rules tcp:7474 --description "Enable access to the neo4j database" --direction IN --target-tags google-db-server
[email protected]:~/home$ gcloud compute firewall-rules list --format json
[
{
"allowed": [
{
"IPProtocol": "tcp",
"ports": [
"7474"
]
}
],
"creationTimestamp": "2017-09-30T00:25:51.220-07:00",
"description": "Enable access to the neo4j database",
"direction": "INGRESS",
"id": "5767618134171383824",
"kind": "compute#firewall",
"name": "custom-allow-neo4j",
"network": "https://www.googleapis.com/compute/v1/projects/graphdb-experiment/global/networks/default",
"priority": 1000,
"selfLink": "https://www.googleapis.com/compute/v1/projects/graphdb-experiment/global/firewalls/custom-allow-neo4j",
"sourceRanges": [
"0.0.0.0/0"
],
"targetTags": [
"google-db-server"
]
},
는 는 [3] Google 클라우드 서버 인스턴스에서 실행중인 nmap을 해당 포트를 보여줍니다
7474 로컬로 사용할 수 있으며, 그 포트에 텔넷 수있는 로컬
[email protected]:~$ nmap -p 22,80,443,7474 localhost
Starting Nmap 7.01 (https://nmap.org) at 2017-09-30 10:46 UTC
Nmap scan report for localhost (127.0.0.1)
Host is up (0.000081s latency).
PORT STATE SERVICE
22/tcp open ssh
80/tcp open http
443/tcp closed https
7474/tcp open unknown
Nmap done: 1 IP address (1 host up) scanned in 0.03 seconds
[email protected]:~$ telnet localhost 7474
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
[4] 나는 내 노트북과 NMA에서 연결할 수 없습니다입니다 그러나 p는 보여줍니다 포트 7474로 사용할 수없는 방화벽 규칙이 모든 IP 주소는 TCP에서 Google 클라우드 컴퓨팅 인스턴스에 연결할 수 있도록하기 위해 만들어에도 불구하고는
[email protected]:~/home$ nmap -p 22,80,443,7474 35.201.26.52
Starting Nmap 7.01 (https://nmap.org) at 2017-09-30 20:50 AEST
Nmap scan report for 52.26.201.35.bc.googleusercontent.com (35.201.26.52)
Host is up (0.28s latency).
PORT STATE SERVICE
22/tcp open ssh
80/tcp open http
443/tcp closed https
7474/tcp closed unknown
Nmap done: 1 IP address (1 host up) scanned in 0.75 seconds
그래서 : 7474을, 나는 아직도에서이 포트에 액세스 할 수 없습니다 해요 내 휴대용 퍼스널 컴퓨터.
일부 추가 단계가 누락 되었습니까?
감사합니다. @ David, 그게 문제였습니다. 내가 처음에 문서를 읽었어야 http://neo4j.com/docs/operations-manual/current/ ... – Skilly
내 의견을 완전히 귀하의 질문에 대답을 느낀다면 [수락] (https : // stackoverflow. co.kr/help/someone-answers) 답변을 질문으로 표시하고 평판 충돌을 조금 줄 수있는 나의 대답. – David