I am trying to run embedded neo4j in HA with spring-data-neo4j. But somehow i get following exception whenever i start the application.
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)
My spring config contains following bean defination
<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>
While the dependencies that i use are as below
<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>
Cannot figure out where does exact problem lies!!!!!