如何实际禁用远程shell?

时间:2013-06-24 16:23:12

标签: shell neo4j

我正在尝试在同一主机上同时启动2个Neo4j 1.9实例(1个用于dev,1个用于测试)。我已经意识到改变HTTP和HTTPS端口是不够的,因为远程shell有自己的端口(默认为1337)。

第二个实例无法启动,因为它无法绑定。

Caused by: java.rmi.server.ExportException: Port already in use: 1337; nested exception is: 
    java.net.BindException: Address already in use
    at sun.rmi.transport.tcp.TCPTransport.listen(TCPTransport.java:328)
    at sun.rmi.transport.tcp.TCPTransport.exportObject(TCPTransport.java:236)
    at sun.rmi.transport.tcp.TCPEndpoint.exportObject(TCPEndpoint.java:411)
    at sun.rmi.transport.LiveRef.exportObject(LiveRef.java:147)
    at sun.rmi.server.UnicastServerRef.exportObject(UnicastServerRef.java:207)
    at sun.rmi.registry.RegistryImpl.setup(RegistryImpl.java:122)
    at sun.rmi.registry.RegistryImpl.<init>(RegistryImpl.java:108)
    at java.rmi.registry.LocateRegistry.createRegistry(LocateRegistry.java:203)
    at org.neo4j.shell.impl.RmiLocation.ensureRegistryCreated(RmiLocation.java:180)
    at org.neo4j.shell.impl.RmiLocation.bind(RmiLocation.java:195)
    at org.neo4j.shell.impl.RemotelyAvailableServer.makeRemotelyAvailable(RemotelyAvailableServer.java:99)
    at org.neo4j.shell.impl.AbstractServer.makeRemotelyAvailable(AbstractServer.java:156)
    at org.neo4j.shell.impl.ShellBootstrap.enable(ShellBootstrap.java:122)
    at org.neo4j.shell.impl.ShellBootstrap.load(ShellBootstrap.java:112)
    at org.neo4j.shell.impl.ShellServerKernelExtension.start(ShellServerKernelExtension.java:47)
    at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSupport.java:492)
    ... 12 more

Caused by: java.net.BindException: Address already in use
    at java.net.PlainSocketImpl.socketBind(Native Method)
    at java.net.AbstractPlainSocketImpl.bind(AbstractPlainSocketImpl.java:376)
    at java.net.ServerSocket.bind(ServerSocket.java:376)
    at java.net.ServerSocket.<init>(ServerSocket.java:237)
    at java.net.ServerSocket.<init>(ServerSocket.java:128)
    at sun.rmi.transport.proxy.RMIDirectSocketFactory.createServerSocket(RMIDirectSocketFactory.java:45)
    at sun.rmi.transport.proxy.RMIMasterSocketFactory.createServerSocket(RMIMasterSocketFactory.java:349)
    at sun.rmi.transport.tcp.TCPEndpoint.newServerSocket(TCPEndpoint.java:667)
    at sun.rmi.transport.tcp.TCPTransport.listen(TCPTransport.java:317)
    ... 27 more

我尝试按the official Neo4j documentation中的说明禁用远程shell。在 neoj-server.properties 中添加 enable_remote_shell = false 。但它不起作用。

什么是禁用此功能的正确方法(可选?)Neo4j服务?

3 个答案:

答案 0 :(得分:3)

我相信你把它放在了错误的地方。将enable_remote_shell = false放入neo4j.properties

答案 1 :(得分:0)

为什么不给它不同的端口?

http://docs.neo4j.org/chunked/stable/shell-starting.html

答案 2 :(得分:0)

您可以转到conf/neo4j-server.properties并更改以下属性

# To disable all shells:
org.neo4j.server.manage.console_engines=

看@ Disabling console types in Webadmin