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

connection exception logged after client disconnects in ClientListenerSupport #9709

dsukhoroslov opened this issue Jan 20, 2017 · 2 comments


None yet
2 participants
Copy link

commented Jan 20, 2017

The class has the following method:

    public void connectionRemoved(Connection connection) {
        if (connection.getEndPoint().equals(ownerConnectionAddress)) {
            if (client.getLifecycleService().isRunning()) {

                clusterExecutor.execute(new Runnable() {
                    public void run() {
                        try {
                        } catch (Exception e) {
                            logger.warning("Could not re-connect to cluster shutting down the client", e);

what the reason to log error stack in the exception catch section? It is expected that client will not able to reconnect, right? Is it possible to change it to:

                  "Could not re-connect to cluster shutting down the client");

, just to prevent unnecessary error logs on the client side?

Thanks, Denis.

@sancar sancar self-assigned this Jan 20, 2017

@sancar sancar added the Team: Client label Jan 20, 2017

@sancar sancar added this to the 3.7.6 milestone Jan 20, 2017


This comment has been minimized.

Copy link

commented Jan 20, 2017

If client is shutdown by user with clientInstance.shutdown() then this code path will never run. And it will never be logged.

When client itself could not connect and give up, it should be a warning, because it is not intentional. The cluster that expected to be there is gone.

Although I agree with stacktrace is not giving extra inside, exception message has information about tried addresses. So we can convert to following to get rid of stacktrace , but I think warning should stay.

   logger.warning("Could not re-connect to cluster shutting down the client " + e.getMessage() ); 

This comment has been minimized.

Copy link
Contributor Author

commented Jan 20, 2017

Ok, I agree

@sancar sancar closed this in 3ffff1b Jan 23, 2017

sancar added a commit that referenced this issue Jan 23, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.