博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
Neo4j下执行cypher-shell时,Connection refused问题解决?
阅读量:7096 次
发布时间:2019-06-28

本文共 2640 字,大约阅读时间需要 8 分钟。

 

 

 

  不多说,直接上干货!

 

 

 问题现象

root@zhouls-virtual-machine:/usr/local/app/neo4j-community-3.2.0/bin# lscypher-shell  neo4j  neo4j-admin  neo4j-import  neo4j-shell  toolsroot@zhouls-virtual-machine:/usr/local/app/neo4j-community-3.2.0/bin# ./neo4j startActive database: graph.dbDirectories in use:  home:         /usr/local/app/neo4j  config:       /usr/local/app/neo4j/conf  logs:         /usr/local/app/neo4j/logs  plugins:      /usr/local/app/neo4j/plugins  import:       /usr/local/app/neo4j/import  data:         /usr/local/app/neo4j/data  certificates: /usr/local/app/neo4j/certificates  run:          /usr/local/app/neo4j/runStarting Neo4j.WARNING: Max 1024 open files allowed, minimum of 40000 recommended. See the Neo4j manual.Started neo4j (pid 58377). It is available at http://0.0.0.0:7474/There may be a short delay until the server is ready.See /usr/local/app/neo4j/logs/neo4j.log for current status.root@zhouls-virtual-machine:/usr/local/app/neo4j-community-3.2.0/bin# ./cypher-shell Connection refusedroot@zhouls-virtual-machine:/usr/local/app/neo4j-community-3.2.0/bin#

 

 

 

 

 

 

 

 

问题分析

  (1)配置文件里的关于shell的配置打开了吗

    (2)为了更好的远程访问

 

 

解决办法一

# Enable a remote shell server which Neo4j Shell clients can log in to.#dbms.shell.enabled=true# The network interface IP the shell will listen on (use 0.0.0.0 for all interfaces).#dbms.shell.host=127.0.0.1# The port the shell will listen on, default is 1337.#dbms.shell.port=1337

 

   必须启动neo4j,其实是可以不需执行bin/neo4j start的。

 

root@zhouls-virtual-machine:/usr/local/app/neo4j-community-3.2.0/bin# lscypher-shell  neo4j  neo4j-admin  neo4j-import  neo4j-shell  toolsroot@zhouls-virtual-machine:/usr/local/app/neo4j-community-3.2.0/bin# ./cypher-shellusername: neo4jpassword: ******Connected to Neo4j 3.2.0 at bolt://localhost:7687 as user neo4j.Type :help for a list of available commands or :exit to exit the shell.Note that Cypher queries must end with a semicolon.neo4j>

 

 

 

 

 

解决办法二(推荐)

 

# Enable a remote shell server which Neo4j Shell clients can log in to.dbms.shell.enabled=true# The network interface IP the shell will listen on (use 0.0.0.0 for all interfaces).dbms.shell.host=0.0.0.0# The port the shell will listen on, default is 1337.dbms.shell.port=1337

 

 

 

root@zhouls-virtual-machine:/usr/local/app/neo4j-community-3.2.0/bin# lscypher-shell  neo4j  neo4j-admin  neo4j-import  neo4j-shell  toolsroot@zhouls-virtual-machine:/usr/local/app/neo4j-community-3.2.0/bin# ./cypher-shellusername: neo4jpassword: ******Connected to Neo4j 3.2.0 at bolt://localhost:7687 as user neo4j.Type :help for a list of available commands or :exit to exit the shell.Note that Cypher queries must end with a semicolon.neo4j>

   成功!

 

 

 

   退出,是如下的操作

 

转载地址:http://tshql.baihongyu.com/

你可能感兴趣的文章
笔记—TCP有限状态机分析
查看>>
网络发现自动关闭不能启用、无法启用文件和打印共享的解决办法
查看>>
SSMA迁移本地的MY SQL到本地SQL server及windows azure SQL Databaase
查看>>
分享Silverlight/WPF/Windows Phone一周学习导读(06月06日-06月11日)
查看>>
Django进阶之中间件
查看>>
angularjs 过滤器filter
查看>>
puppet之文件管理
查看>>
Wi-Fi搞不清?五问五答一看就明
查看>>
配置Configuration Manager站点和层次架构(2)
查看>>
Cognos Schedule stops working
查看>>
键盘谍影 键盘监视器的原理和防范
查看>>
配置交换机etherchannel
查看>>
活力四射的Windows Embedded Standard 7
查看>>
了解区块链,从挖矿开始
查看>>
【Java学习笔记】java.lang包学习
查看>>
配套自测连载(四)
查看>>
iOS网络编程-解决iCloud文档存储过程中文档冲突问题
查看>>
Java5 并发学习
查看>>
传输信道加密Stunnel配置
查看>>
DHCP服务器如何检测穿过中继代理的IP地址冲突(gratuitous ARP肯定是不行的)
查看>>