嵌入式neo4j中的zookeeper ConnectException

时间:2013-08-24 06:17:05

标签: java spring neo4j spring-data-neo4j

我正在尝试使用spring-data-neo4j在HA中运行嵌入式neo4j。但不知怎的,每当我启动应用程序时,我都会遇到异常。

WARN : org.apache.zookeeper.ClientCnxn - Session 0x0 for server null, unexpected error, closing socket connection and attempting reconnect
java.net.ConnectException: Connection refused: no further information
    at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
    at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:567)
    at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1119)

我的春季配置包含以下bean定义

<bean id="haDatabase" class="org.neo4j.kernel.HighlyAvailableGraphDatabase"
           destroy-method="shutdown" scope="singleton" >
           <constructor-arg index="0" value="target/config-test"/>
           <constructor-arg index="1">
               <map>
                   <entry key="ha.server_id" value="1"/>
                   <entry key="ha.server" value="localhost:6001"/>
                   <entry key="ha.coordinators" value="localhost:2181,localhost:2182,localhost:2183"/>
                   <entry key="enable_remote_shell" value="port=1331"/>         
               </map>
           </constructor-arg>
        </bean>

虽然我使用的依赖项如下

<dependency>
            <groupId>org.neo4j</groupId>
            <artifactId>neo4j</artifactId>
            <version>${neo4j-version}</version>
        </dependency>
        <dependency>
            <groupId>org.neo4j.app</groupId>
            <artifactId>neo4j-server</artifactId>
            <version>${neo4j-version}</version>
        </dependency>
        <dependency>
            <groupId>org.neo4j.app</groupId>
            <artifactId>neo4j-server</artifactId>
            <classifier>static-web</classifier>
            <scope>provided</scope>
            <version>${neo4j-version}</version>
        </dependency>
        <dependency>
            <groupId>org.springframework.data</groupId>
            <artifactId>spring-data-neo4j-aspects</artifactId>
            <version>2.1.0.RELEASE</version>
        </dependency>       

        <dependency>
           <groupId>org.neo4j</groupId>
           <artifactId>neo4j-ha</artifactId>
           <version>${neo4j-version}</version>
        </dependency>

无法弄清楚确切问题在哪里!!!!!

0 个答案:

没有答案