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

Heal-Session-Thread stops if UnresolvedAddressException occurs #53

Closed
srpgers opened this issue Feb 22, 2017 · 3 comments
Closed

Heal-Session-Thread stops if UnresolvedAddressException occurs #53

srpgers opened this issue Feb 22, 2017 · 3 comments

Comments

@srpgers
Copy link

srpgers commented Feb 22, 2017

If a network issue occurs and hostnames cannot be resolved, then the SessionMonitor throws an exception (in rescheduleConnectRequest in the log line) and so the thread stops.
After that the XMemcachedClient becomes unusable an never re-connects.

Exception in thread "Heal-Session-Thread" java.lang.NullPointerException at net.rubyeye.xmemcached.impl.MemcachedConnector$SessionMonitor.rescheduleConnectRequest(MemcachedConnector.java:166) at net.rubyeye.xmemcached.impl.MemcachedConnector$SessionMonitor.run(MemcachedConnector.java:152)
After earlier exception
[13:43:40,544][] [ERROR]xmemcached.impl.MemcachedConnector$SessionMonitor:151 - SessionMonitor connect error java.nio.channels.UnresolvedAddressException at sun.nio.ch.Net.checkAddress(Net.java:123) at sun.nio.ch.SocketChannelImpl.connect(SocketChannelImpl.java:622) at net.rubyeye.xmemcached.impl.MemcachedConnector.connect(MemcachedConnector.java:468) at net.rubyeye.xmemcached.impl.MemcachedConnector$SessionMonitor.run(MemcachedConnector.java:118)

With the code
log.error("Reconnect to " + address.getAddress().getHostAddress() + ":" + address.getPort() + " fail");
Because address.getAddress() returns null as host not resolvable.

@killme2008
Copy link
Owner

Thanks, it's a serious issue, i should fix it and release a new version ASAP.

@srpgers
Copy link
Author

srpgers commented Feb 22, 2017

FYI - Changed locally to be
log.error("Reconnect to " + address + " fail");
And works a treat.

@killme2008 killme2008 added this to the 2.3.0 milestone Feb 23, 2017
@killme2008
Copy link
Owner

Released 2.3.0, but it may take sometime to be synchronized to maven central repository.

https://github.com/killme2008/xmemcached/releases/tag/xmemcached-2.3.0

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

No branches or pull requests

2 participants