Skip to Main Content

NoSQL Database

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

java -jar lib/kvstore.jar ping - ConnectException when using IPAddress

714047Oct 21 2016 — edited Oct 26 2016

0down votefavori

I created a Oracle Linux VM (ipAddr 192.168.10.2) on my windows machine.

On this VM I further created a kvlite docker container.

In Dockerfile following is CMD issued:

CMD ["java", "-jar", "lib/kvstore.jar", "kvlite"] 

Once kvlite docker container was created I ran following commands on my VM:

$ docker run --name nosql-container -d kvlite:latest

$ docker exec -it nosql-container bash

On the container bash prompt I try to ping my client using following command (but using VM IpAddress and not localhost):

# java -jar lib/kvstore.jar ping -port 5000 -host 192.168.10.2 

This however throws an exception

Picked up _JAVA_OPTIONS: -Djava.security.egd=file:/dev/./urandom

Could not connect to registry at 192.168.10.2:5000 Unable to connect to the storage node agent at host 192.168.10.2, port 5000, which may not be running; nested exception is:

java.rmi.ConnectException: Connection refused to host: 192.168.10.2; nested exception is:

java.net.ConnectException: Connection refused

Can't find store topology: Could not contact any RepNode at: [192.168.10.2:5000]

But, things works fine when I use -host as localhost instead i.e.,

# java -jar lib/kvstore.jar ping -port 5000 -host localhost 

To resolve this issue I tried following:

  • I stopped my kvlite docker container
  • Changed config.xml ($KVROOT/config.xml) for value hostname to IpAddress
  • Re-Started my kvlite docker container, but this didn't helped, container couldn't start

Next I tried to re-create a new docker image for kvlite issuing below CMD:

CMD ["java", "-jar", "lib/kvstore.jar", "kvlite", "-host", "192.168.10.2", "-port", "5000"] 

But here also when I tried starting kvlite docker container, it didn't start.

I even verified my /etc/hosts file for entry of IpAddress-192.168.10.2.

Any help appreciated in advance.

This post has been answered by 714047 on Oct 26 2016
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 23 2016
Added on Oct 21 2016
5 comments
1,256 views