mirror of https://github.com/OpenVidu/openvidu.git
openvidu-server: improve logging on Media Node reconnection method
parent
022a692735
commit
a74decb540
|
@ -218,8 +218,9 @@ public abstract class KmsManager {
|
||||||
if (iteration.decrementAndGet() < 0) {
|
if (iteration.decrementAndGet() < 0) {
|
||||||
|
|
||||||
log.error(
|
log.error(
|
||||||
"KurentoClient [{}] could not reconnect to KMS with uri {} in {} seconds. Media Node crashed",
|
"OpenVidu Server [{}] could not reconnect to Media Node {} with IP {} in {} seconds. Media Node crashed",
|
||||||
kms.getKurentoClient().toString(), kms.getUri(), (intervalWaitMs * loops / 1000));
|
kms.getKurentoClient().toString(), kms.getId(), kms.getIp(),
|
||||||
|
(intervalWaitMs * loops / 1000));
|
||||||
kms.getKurentoClientReconnectTimer().cancelTimer();
|
kms.getKurentoClientReconnectTimer().cancelTimer();
|
||||||
|
|
||||||
final long timeOfKurentoDisconnection = kms.getTimeOfKurentoClientDisconnection();
|
final long timeOfKurentoDisconnection = kms.getTimeOfKurentoClientDisconnection();
|
||||||
|
@ -229,7 +230,7 @@ public abstract class KmsManager {
|
||||||
.map(entry -> entry.getKey()).collect(Collectors.toUnmodifiableList());
|
.map(entry -> entry.getKey()).collect(Collectors.toUnmodifiableList());
|
||||||
|
|
||||||
// 1. Remove Media Node from cluster
|
// 1. Remove Media Node from cluster
|
||||||
log.warn("Removing Media Node {} after crash", kms.getId());
|
log.warn("Removing Media Node {} with IP {} after crash", kms.getId(), kms.getIp());
|
||||||
String environmentId = removeMediaNodeUponCrash(kms.getId());
|
String environmentId = removeMediaNodeUponCrash(kms.getId());
|
||||||
|
|
||||||
// 2. Send nodeCrashed webhook event
|
// 2. Send nodeCrashed webhook event
|
||||||
|
@ -237,8 +238,9 @@ public abstract class KmsManager {
|
||||||
affectedSessionIds, affectedRecordingIds);
|
affectedSessionIds, affectedRecordingIds);
|
||||||
|
|
||||||
// 3. Close all sessions and recordings with reason "nodeCrashed"
|
// 3. Close all sessions and recordings with reason "nodeCrashed"
|
||||||
log.warn("Closing {} sessions hosted by KMS with uri {}: {}", kms.getKurentoSessions().size(),
|
log.warn("Closing {} sessions hosted by Media Node {} with IP {}: {}",
|
||||||
kms.getUri(), kms.getKurentoSessions().stream().map(s -> s.getSessionId())
|
kms.getKurentoSessions().size(), kms.getId(), kms.getIp(),
|
||||||
|
kms.getKurentoSessions().stream().map(s -> s.getSessionId())
|
||||||
.collect(Collectors.joining(",", "[", "]")));
|
.collect(Collectors.joining(",", "[", "]")));
|
||||||
try {
|
try {
|
||||||
// Flag the thread to skip remote operations to KMS
|
// Flag the thread to skip remote operations to KMS
|
||||||
|
@ -249,6 +251,7 @@ public abstract class KmsManager {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (infiniteRetry()) {
|
if (infiniteRetry()) {
|
||||||
|
log.info("Retrying reconnection to Media Node {} with IP {}", kms.getId(), kms.getIp());
|
||||||
disconnected();
|
disconnected();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue