Merge pull request #1479 from myENA/9285_exception_log

Cloudstack-9285 exception log additionAfter discussion with @miguelaferreira on the previous PR related to Cloudstack-9285, we decided on adding additional exception logging for this issue.

After adding it, the logs look like this in our lab:

2016-04-07 15:44:03,298 WARN  [cloud.agent.Agent] (Agent-Handler-1:null) (logid:7225632a) NIO Connection Exception com.cloud.utils.exception.NioConnectionException: Connection closed with -1 on reading size.  <<-- new exception logging
2016-04-07 15:44:03,298 INFO  [cloud.agent.Agent] (Agent-Handler-1:null) (logid:7225632a) Attempted to connect to the server, but received an unexpected exception, trying again... << --original logging from previous PR.

* pr/1479:
  Additional exception logging for Cloudstack-9285

Signed-off-by: Will Stevens <williamstevens@gmail.com>
This commit is contained in:
Will Stevens 2016-04-12 08:56:35 -04:00
commit 8e3d7ee41c
1 changed files with 3 additions and 0 deletions

View File

@ -227,6 +227,7 @@ public class Agent implements HandlerFactory, IAgentControl {
try {
_connection.start();
} catch (final NioConnectionException e) {
s_logger.warn("NIO Connection Exception " + e);
s_logger.info("Attempted to connect to the server, but received an unexpected exception, trying again...");
}
while (!_connection.isStartup()) {
@ -235,6 +236,7 @@ public class Agent implements HandlerFactory, IAgentControl {
try {
_connection.start();
} catch (final NioConnectionException e) {
s_logger.warn("NIO Connection Exception " + e);
s_logger.info("Attempted to connect to the server, but received an unexpected exception, trying again...");
}
}
@ -412,6 +414,7 @@ public class Agent implements HandlerFactory, IAgentControl {
try {
_connection.start();
} catch (final NioConnectionException e) {
s_logger.warn("NIO Connection Exception " + e);
s_logger.info("Attempted to connect to the server, but received an unexpected exception, trying again...");
}
_shell.getBackoffAlgorithm().waitBeforeRetry();