Merge pull request #16276 from akka/wip-15530-remote-log-cause-patrikwn
+rem #15530 Include cause in some remote log messages
This commit is contained in:
commit
4c7adf919f
3 changed files with 9 additions and 6 deletions
|
|
@ -548,7 +548,7 @@ class TcpExt(system: ExtendedActorSystem) extends IO.Extension {
|
||||||
|
|
||||||
val WindowsConnectionAbortWorkaroundEnabled: Boolean = getString("windows-connection-abort-workaround-enabled") match {
|
val WindowsConnectionAbortWorkaroundEnabled: Boolean = getString("windows-connection-abort-workaround-enabled") match {
|
||||||
case "auto" ⇒ Helpers.isWindows
|
case "auto" ⇒ Helpers.isWindows
|
||||||
case _ => getBoolean("windows-connection-abort-workaround-enabled")
|
case _ ⇒ getBoolean("windows-connection-abort-workaround-enabled")
|
||||||
}
|
}
|
||||||
|
|
||||||
private[this] def getIntBytes(path: String): Int = {
|
private[this] def getIntBytes(path: String): Int = {
|
||||||
|
|
|
||||||
|
|
@ -210,8 +210,9 @@ private[remote] class ReliableDeliverySupervisor(
|
||||||
override val supervisorStrategy = OneForOneStrategy(loggingEnabled = false) {
|
override val supervisorStrategy = OneForOneStrategy(loggingEnabled = false) {
|
||||||
case e @ (_: AssociationProblem) ⇒ Escalate
|
case e @ (_: AssociationProblem) ⇒ Escalate
|
||||||
case NonFatal(e) ⇒
|
case NonFatal(e) ⇒
|
||||||
log.warning("Association with remote system [{}] has failed, address is now gated for [{}] ms. Reason is: [{}].",
|
val causedBy = if (e.getCause == null) "" else s"Caused by: [${e.getCause.getMessage}]"
|
||||||
remoteAddress, settings.RetryGateClosedFor.toMillis, e.getMessage)
|
log.warning("Association with remote system [{}] has failed, address is now gated for [{}] ms. Reason: [{}] {}",
|
||||||
|
remoteAddress, settings.RetryGateClosedFor.toMillis, e.getMessage, causedBy)
|
||||||
uidConfirmed = false // Need confirmation of UID again
|
uidConfirmed = false // Need confirmation of UID again
|
||||||
context.become(gated)
|
context.become(gated)
|
||||||
currentHandle = None
|
currentHandle = None
|
||||||
|
|
|
||||||
|
|
@ -439,9 +439,11 @@ private[remote] class EndpointManager(conf: Config, log: LoggingAdapter) extends
|
||||||
OneForOneStrategy(loggingEnabled = false) {
|
OneForOneStrategy(loggingEnabled = false) {
|
||||||
case e @ InvalidAssociation(localAddress, remoteAddress, reason) ⇒
|
case e @ InvalidAssociation(localAddress, remoteAddress, reason) ⇒
|
||||||
keepQuarantinedOr(remoteAddress) {
|
keepQuarantinedOr(remoteAddress) {
|
||||||
|
val causedBy = if (reason.getCause == null) "" else s"Caused by: [${reason.getCause.getMessage}]"
|
||||||
log.warning("Tried to associate with unreachable remote address [{}]. " +
|
log.warning("Tried to associate with unreachable remote address [{}]. " +
|
||||||
"Address is now gated for {} ms, all messages to this address will be delivered to dead letters. Reason: {}",
|
"Address is now gated for {} ms, all messages to this address will be delivered to dead letters. " +
|
||||||
remoteAddress, settings.RetryGateClosedFor.toMillis, reason.getMessage)
|
"Reason: [{}] {}",
|
||||||
|
remoteAddress, settings.RetryGateClosedFor.toMillis, reason.getMessage, causedBy)
|
||||||
endpoints.markAsFailed(sender(), Deadline.now + settings.RetryGateClosedFor)
|
endpoints.markAsFailed(sender(), Deadline.now + settings.RetryGateClosedFor)
|
||||||
}
|
}
|
||||||
AddressTerminatedTopic(context.system).publish(AddressTerminated(remoteAddress))
|
AddressTerminatedTopic(context.system).publish(AddressTerminated(remoteAddress))
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue