You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@servicecomb.apache.org by GitBox <gi...@apache.org> on 2021/06/24 06:56:45 UTC

[GitHub] [servicecomb-java-chassis] G-Jay-R opened a new issue #2431: ServiceCombLoadBalancerStats:LoadBalancerStatsTimer error.空指针异常

G-Jay-R opened a new issue #2431:
URL: https://github.com/apache/servicecomb-java-chassis/issues/2431


   platform.log日志中偶现空指针异常,请问引发的原因是什么,对业务会有什么影响吗?
   ```
   2021-06-18 08:59:44,539 INFO  [][][LoadBalancerStatsTimer][servicecomb.loadbalance.ServiceCombLoadBalancerStats$3 174] ping mark server 873457e8ce9811eb80960255ac1ee072 failure.
   2021-06-18 08:59:44,539 WARN  [][][LoadBalancerStatsTimer][servicecomb.loadbalance.ServiceCombLoadBalancerStats$3 180] LoadBalancerStatsTimer error.
   java.lang.NullPointerException: null
           at org.apache.servicecomb.loadbalance.ServiceCombLoadBalancerStats$3.run(ServiceCombLoadBalancerStats.java:172) ~[handler-loadbalance-1.3.0.B012.jar:1.3.0.B012]
           at java.util.TimerThread.mainLoop(Timer.java:555) ~[?:1.8.0_262]
           at java.util.TimerThread.run(Timer.java:505) ~[?:1.8.0_262]
   2021-06-18 08:59:46,835 ERROR [][][vert.x-eventloop-thread-2][client.http.RestClientInvocation 104] Failed to send request, local:not connected, remote:/192.168.0.58:8443.
   ```
   源码:
   ```
         @Override
         public void run() {
           try {
             Map<ServiceCombServer, ServiceCombServerStats> allServers = pingView;
             Iterator<ServiceCombServer> instances = allServers.keySet().iterator();
             while (instances.hasNext()) {
               ServiceCombServer server = instances.next();
               ServiceCombServerStats stats = allServers.get(server);
               if ((System.currentTimeMillis() - stats.getLastVisitTime() > timerIntervalInMilis) && !ping
                   .ping(server.getInstance())) {
                 LOGGER.info("ping mark server {} failure.", server.getInstance().getInstanceId());
                 stats.markFailure();
               }
             }
             serverStatsCache.cleanUp();
           } catch (Throwable e) {
             LOGGER.warn("LoadBalancerStatsTimer error.", e);
           }
         }
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [servicecomb-java-chassis] liubao68 commented on issue #2431: ServiceCombLoadBalancerStats:LoadBalancerStatsTimer error.空指针异常

Posted by GitBox <gi...@apache.org>.
liubao68 commented on issue #2431:
URL: https://github.com/apache/servicecomb-java-chassis/issues/2431#issuecomment-867596219


   这个异常对功能无影响。 你的版本太老了。 新代码看起来已经改了实现,参考 [releases](https://github.com/apache/servicecomb-java-chassis/releases)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [servicecomb-java-chassis] liubao68 edited a comment on issue #2431: ServiceCombLoadBalancerStats:LoadBalancerStatsTimer error.空指针异常

Posted by GitBox <gi...@apache.org>.
liubao68 edited a comment on issue #2431:
URL: https://github.com/apache/servicecomb-java-chassis/issues/2431#issuecomment-867596219


   这个异常对功能无影响。 你的版本太老了。 新代码看起来已经改了实现,参考  [releases](https://github.com/apache/servicecomb-java-chassis/releases)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org