You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Please answer these questions before submitting your issue.
Why do you submit this issue?
Question or discussion
Bug
Requirement
Feature or performance improvement
Bug
Which version of SkyWalking, OS and JRE?
version: v6.3.0
Which company or project?
hualala.com
What happen?
agent can not reconnect to the collector when the oap server only one instance and has been restarted.
source code in class org.apache.skywalking.apm.agent.core.remote.GRPCChannelManager:
try {
int index = Math.abs(random.nextInt()) % grpcServers.size();
if (index != selectedIdx) {
selectedIdx = index;
server = grpcServers.get(index);
String[] ipAndPort = server.split(":");if (managedChannel != null) {
managedChannel.shutdownNow();
}
managedChannel = GRPCChannel.newBuilder(ipAndPort[0], Integer.parseInt(ipAndPort[1]))
.addManagedChannelBuilder(new StandardChannelBuilder())
.addManagedChannelBuilder(new TLSChannelBuilder())
.addChannelDecorator(new AgentIDDecorator())
.addChannelDecorator(new AuthenticationDecorator())
.build();
notify(GRPCChannelStatus.CONNECTED);
reconnect = false;
} elseif (managedChannel.isConnected()) {
// Reconnect to the same server is automatically done by GRPC,
// therefore we are responsible to check the connectivity and
// set the state and notify listeners
notify(GRPCChannelStatus.CONNECTED);
reconnect = false;
}
return;
} catch (Throwable t) {
logger.error(t, "Create channel to {} fail.", server);
}
the line 102 in class org.apache.skywalking.apm.agent.core.remote.GRPCChannelManager should be channge to :
if (index != selectedIdx ||!managedChannel.isConnected())
The text was updated successfully, but these errors were encountered:
yefei14131
changed the title
gent can not reconnect to the collector when the oap server have only one instance and has been restarted
agent can not reconnect to the collector when the oap server have only one instance and has been restarted
Sep 12, 2019
Please answer these questions before submitting your issue.
Bug
version: v6.3.0
hualala.com
agent can not reconnect to the collector when the oap server only one instance and has been restarted.
source code in class org.apache.skywalking.apm.agent.core.remote.GRPCChannelManager:
the line 102 in class org.apache.skywalking.apm.agent.core.remote.GRPCChannelManager should be channge to :
The text was updated successfully, but these errors were encountered: