0

我正在尝试在同一主机上同时启动 2 个 Neo4j 1.9 实例(1 个用于开发,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

我尝试按照Neo4j 官方文档中的说明禁用远程 shell 。通过在neoj-server.properties添加enable_remote_shell = false。但它不起作用。

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

4

3 回答 3

3

我相信你放错地方了。放入enable_remote_shell = false_neo4j.properties

于 2013-06-24T17:29:25.140 回答
0

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

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

于 2013-06-24T16:33:18.527 回答
0

您可以像这样去conf/neo4j-server.properties更改以下属性

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

看@ 在 Webadmin 中禁用控制台类型

于 2013-06-25T09:23:18.080 回答