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

Client doesn't pick up IP address change in GELF server domain name #25

Closed
cjmamo opened this issue Oct 27, 2016 · 1 comment
Closed

Comments

@cjmamo
Copy link

cjmamo commented Oct 27, 2016

The IP address for the GELF server's domain name was changed but the client didn't pick up the new IP address when using the UDP transport. Instead, it keeps trying to send logs to the old unreachable IP address. I believe the problem is coming from the following line of code:

ch.pipeline().addLast(new GelfMessageUdpEncoder(config.getRemoteAddress()));
.

InetSocketAddress only performs resolution at construction time, and since createBootstrap(...) is just called during initialisation, IP address changes aren't picked up. The current solution is to restart the application but of course this isn't ideal. GelfMessageUdpEncoder's constructor should be changed to take in the hostname and port instead of InetSocketAddress so that they can be used to create an InetSocketAddress object in the encode(...) method.

@joschi
Copy link
Contributor

joschi commented Oct 27, 2016

Duplicate of #5.

@joschi joschi closed this as completed Oct 27, 2016
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