mirror of https://github.com/apache/activemq.git
AMQ-7301 - TransportConnector errors should log the root cause
(cherry picked from commit 57a1a77abb
)
This commit is contained in:
parent
6355f507c3
commit
ee61ed69f8
|
@ -26,6 +26,7 @@ import java.util.regex.Pattern;
|
||||||
|
|
||||||
import javax.management.ObjectName;
|
import javax.management.ObjectName;
|
||||||
|
|
||||||
|
import com.google.common.base.Throwables;
|
||||||
import org.apache.activemq.broker.jmx.ManagedTransportConnector;
|
import org.apache.activemq.broker.jmx.ManagedTransportConnector;
|
||||||
import org.apache.activemq.broker.jmx.ManagementContext;
|
import org.apache.activemq.broker.jmx.ManagementContext;
|
||||||
import org.apache.activemq.broker.region.ConnectorStatistics;
|
import org.apache.activemq.broker.region.ConnectorStatistics;
|
||||||
|
@ -241,11 +242,9 @@ public class TransportConnector implements Connector, BrokerServiceAware {
|
||||||
if (brokerService != null && brokerService.isStopping()) {
|
if (brokerService != null && brokerService.isStopping()) {
|
||||||
LOG.info("Could not accept connection during shutdown {} : {}", (remoteHost == null ? "" : "from " + remoteHost), error.getLocalizedMessage());
|
LOG.info("Could not accept connection during shutdown {} : {}", (remoteHost == null ? "" : "from " + remoteHost), error.getLocalizedMessage());
|
||||||
} else {
|
} else {
|
||||||
LOG.debug("Could not accept connection from {}: {}", remoteHost, error.getMessage());
|
LOG.warn("Could not accept connection from {}: {}", (remoteHost == null ? "" : "from " + remoteHost), error.getMessage());
|
||||||
|
LOG.warn("Root cause of connection error: {}", Throwables.getRootCause(error).getMessage());
|
||||||
LOG.debug("Reason: " + error.getMessage(), error);
|
LOG.debug("Reason: " + error.getMessage(), error);
|
||||||
if (error != null && error.getMessage() != null && remoteHost != null) {
|
|
||||||
LOG.warn("Could not accept connection from {}: {}", remoteHost, error.toString());
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue