juzibot / wechaty-puppet-macpro

One puppet based on Mac WeChat for Wechaty.
Apache License 2.0
38 stars 10 forks source link

Not all network could access to macpro grpc server. #44

Open su-chang opened 4 years ago

su-chang commented 4 years ago

Important:Please file the issue follow the template, or we won't help you to solve the problem.

0. Report Issue Guide

  1. Please run the following command and check whether the problem has been fixed:
npm install wechaty-puppet-macpro
  1. Please search in the issue first, and make sure your problem had not been reported before

1. Versions

2. Describe the bug

If you see some logs like this:

==============================================
  try to reconnect grpc server, waiting...
==============================================

It tips you that you can not reconnect macpro grpc server, if it sustains more than 3 mins, maybe your network can not access to macpro grpc server.

It's a real bug which need to be fixed.

3. To Reproduce

This part is very important: if you can not provide any reproduce steps, then the problem will be very hard to be recognized.

Steps to reproduce the behavior:

  1. run '...'
  2. ...
  3. ...

4. Expected behavior

Give a clear and concise description of what you expected to happen.

5. Actual behavior

If applicable, add screenshots to help explain your problem. But do not paste log screenshots here.

6. Full Output Logs

Set env WECHATY_LOG=silly in order to set log level to silly, then we can get the full log (If you dosen't set log env, log level is info as default, we cannot get the full log)

We need full log instead of log screenshot or log fragments!

Show Logs ```shell $ WECHATY_LOG=silly node yourbot.js Question: Paste your FULL(DO NOT ONLY PROVIDE FRAGMENTS) log messages Answer: ```

7. Additional context

Add any other context about the problem here.

[bug]

hzzzzzz commented 4 years ago

Same issue when connecting from an AliYun ECS.

silly Logs ```log 12:24:29 SILL GrpcGateway notify(getLoginUserInfo, undefined) 12:24:34 INFO start grpc gateway failed for reason: Error: Try to connect to server timeout., retry start in 5 seconds. 12:24:39 SILL PuppetMacpro start() 12:24:39 SILL StateSwitch on() is pending 12:24:39 VERB StateSwitch on(pending) <- (pending) 12:24:39 SILL GrpcGateway notify(getLoginUserInfo, undefined) 12:24:44 INFO start grpc gateway failed for reason: Error: Try to connect to server timeout., retry start in 5 seconds. 12:24:49 SILL PuppetMacpro start() 12:24:49 SILL StateSwitch on() is pending 12:24:49 VERB StateSwitch on(pending) <- (pending) 12:24:49 SILL GrpcGateway notify(getLoginUserInfo, undefined) 12:24:49 INFO start grpc gateway failed for reason: Error: Failed to connect to server, state changed to 1, retry start in 5 seconds. 12:24:54 SILL PuppetMacpro start() 12:24:54 SILL StateSwitch on() is pending 12:24:54 VERB StateSwitch on(pending) <- (pending) 12:24:54 SILL GrpcGateway notify(getLoginUserInfo, undefined) 12:24:59 INFO start grpc gateway failed for reason: Error: Try to connect to server timeout., retry start in 5 seconds. 12:25:04 SILL PuppetMacpro start() 12:25:04 SILL StateSwitch on() is pending 12:25:04 VERB StateSwitch on(pending) <- (pending) 12:25:04 SILL GrpcGateway notify(getLoginUserInfo, undefined) ```
traceroute ``` shell traceroute to macpro.juzibot.com (52.83.249.3), 30 hops max, 60 byte packets 1 * * * 2 * * * 3 11.220.31.29 (11.220.31.29) 6.962 ms 11.220.31.65 (11.220.31.65) 7.185 ms 11.220.31.81 (11.220.31.81) 7.175 ms 4 11.220.31.130 (11.220.31.130) 0.592 ms 11.220.31.138 (11.220.31.138) 0.670 ms 11.220.30.146 (11.220.30.146) 0.682 ms 5 * 10.54.143.37 (10.54.143.37) 1.103 ms * 6 116.251.118.50 (116.251.118.50) 2.156 ms 116.251.104.205 (116.251.104.205) 1.811 ms 116.251.105.113 (116.251.105.113) 1.707 ms 7 116.251.112.209 (116.251.112.209) 2.357 ms 101.200.109.130 (101.200.109.130) 2.087 ms 45.112.223.250 (45.112.223.250) 2.315 ms 8 * * * 9 125.33.184.125 (125.33.184.125) 2.780 ms 125.33.185.117 (125.33.185.117) 3.164 ms 4.167 ms 10 125.33.186.81 (125.33.186.81) 5.395 ms 124.65.194.29 (124.65.194.29) 3.097 ms 61.49.214.13 (61.49.214.13) 3.346 ms 11 219.158.18.158 (219.158.18.158) 13.169 ms 219.158.11.114 (219.158.11.114) 10.623 ms 9.781 ms 12 103.251.240.34 (103.251.240.34) 23.739 ms 25.746 ms 23.942 ms 13 103.251.241.2 (103.251.241.2) 21.475 ms 23.112 ms 22.210 ms 14 52.82.194.222 (52.82.194.222) 28.903 ms 52.82.195.22 (52.82.195.22) 33.423 ms 52.82.195.8 (52.82.195.8) 27.425 ms 15 52.82.195.17 (52.82.195.17) 27.680 ms 30.298 ms 52.82.194.217 (52.82.194.217) 23.569 ms 16 52.82.194.38 (52.82.194.38) 23.748 ms 23.451 ms 24.107 ms 17 * * * 18 * * * 19 * * * 20 * * * 21 * * * 22 * * * 23 * * * 24 * * * 25 * * * 26 * * * 27 * * * 28 * * * 29 * * * 30 * * * ```