Skip to content

Commit 8e3d7ee

Browse files
committed
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 <[email protected]>
2 parents 2d68893 + 5f062f1 commit 8e3d7ee

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

agent/src/com/cloud/agent/Agent.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -227,6 +227,7 @@ public void start() {
227227
try {
228228
_connection.start();
229229
} catch (final NioConnectionException e) {
230+
s_logger.warn("NIO Connection Exception " + e);
230231
s_logger.info("Attempted to connect to the server, but received an unexpected exception, trying again...");
231232
}
232233
while (!_connection.isStartup()) {
@@ -235,6 +236,7 @@ public void start() {
235236
try {
236237
_connection.start();
237238
} catch (final NioConnectionException e) {
239+
s_logger.warn("NIO Connection Exception " + e);
238240
s_logger.info("Attempted to connect to the server, but received an unexpected exception, trying again...");
239241
}
240242
}
@@ -412,6 +414,7 @@ protected void reconnect(final Link link) {
412414
try {
413415
_connection.start();
414416
} catch (final NioConnectionException e) {
417+
s_logger.warn("NIO Connection Exception " + e);
415418
s_logger.info("Attempted to connect to the server, but received an unexpected exception, trying again...");
416419
}
417420
_shell.getBackoffAlgorithm().waitBeforeRetry();

0 commit comments

Comments
 (0)