Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NullPointerException when connecting to multiple hosts #273

Open
emiteze opened this issue Jul 4, 2019 · 1 comment
Open

NullPointerException when connecting to multiple hosts #273

emiteze opened this issue Jul 4, 2019 · 1 comment

Comments

@emiteze
Copy link

emiteze commented Jul 4, 2019

I'm currently testing some behaviors on a local dynomite cluster using Docker and Docker Compose and I'm getting a NullPointer when I try to connect to multiple hosts. When using multiple hosts like this dynomite.cluster.hosts=localhost:8102:dc1-rack1:dc1:2147483647,localhost:8103:dc1-rack1:dc1:4294967294,localhost:8104:dc1-rack2:dc1:4294967295 I get this error when running my test (just test a insertion on dynomite).

Caused by: java.lang.NullPointerException
	at com.netflix.dyno.connectionpool.impl.HostsUpdater.refreshHosts(HostsUpdater.java:111)

The NullPointer comes from this point where hostFromTokenMapSupplier is Null.

hostsUpFromHostSupplier.add(new Host(hostFromHostSupplier.getHostName(), hostFromHostSupplier.getIpAddress(),
hostFromTokenMapSupplier.getPort(), hostFromTokenMapSupplier.getSecurePort(), hostFromTokenMapSupplier.getRack(),
hostFromTokenMapSupplier.getDatacenter(), Host.Status.Up, hostFromTokenMapSupplier.getHashtag(),
hostFromTokenMapSupplier.getPassword()));

@chrisbendel you said on #264 that you had this issue, just clearing hosts solved it to you?

Anyone else has some tips about this?

Thanks in advance :)

@chrisbendel
Copy link

@emiteze It's been a while since I spent some time using this, but from what I remember my workaround was like I said in the issue was clearing the hosts. We've been using it in production since then and no issues have come up.

I'd be interested to get back into it and try debugging it when I have some free time at work to spend on the issue.

If you figure out any new info for debugging purposes, definitely let me know here in this issue thread. I'd be curious what any maintainers might say if they happen to check on the issues here. I'm sure it's something you and I are doing wrong configuration-wise, but you never know if there's a bug somewhere in the source

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants