Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

if one backend_service the agent may be never reconnect #3366

Closed
1 of 4 tasks
xiongrl opened this issue Aug 29, 2019 · 4 comments
Closed
1 of 4 tasks

if one backend_service the agent may be never reconnect #3366

xiongrl opened this issue Aug 29, 2019 · 4 comments
Labels
duplicate This issue or pull request already exists
Milestone

Comments

@xiongrl
Copy link

xiongrl commented Aug 29, 2019

Please answer these questions before submitting your issue.

  • Why do you submit this issue?
  • Question or discussion
  • Bug
  • Requirement
  • Feature or performance improvement

Question

  • What do you want to know?

Bug

  • Which version of SkyWalking, OS and JRE?
org.apache.skywalking.apm.agent.core.remote.GRPCChannelManager
  @Override
   public void run() {
       logger.debug("Selected collector grpc service running, reconnect:{}.", reconnect);
       if (reconnect) {
           if (grpcServers.size() > 0) {
               String server = "";
               try {
                   int index = Math.abs(random.nextInt()) % grpcServers.size();
                   if (index != selectedIdx) {
                       selectedIdx = index;

only one grpcServer so grpcServers.size() = 1
First reconnection set selectedIdx = 1 if connection fail ;
The second reconnection if 1 !=1 (code if (index != selectedIdx)) never to reconnection

@kezhenxu94
Copy link
Member

The bug should be fixed in 6.3.0, #3181 and #3240 , please try the master branch @xiongrl

@kezhenxu94 kezhenxu94 added this to the 6.4.0 milestone Aug 29, 2019
@kezhenxu94 kezhenxu94 added the duplicate This issue or pull request already exists label Aug 29, 2019
@kezhenxu94
Copy link
Member

@xiongrl #3181 is included in version 6.3.0, while #3240 is not and will be included in next version

@xiongrl
Copy link
Author

xiongrl commented Aug 29, 2019

thx

@kanouken
Copy link

version 7.0.0 + can reproduce this issue again 。。。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

3 participants