moremind opened a new issue, #3822:
URL: https://github.com/apache/shenyu/issues/3822

   ### Is there an existing issue for this?
   
   - [X] I have searched the existing issues
   
   ### Current Behavior
   
   1.delete rule in shenyu admin
   2.shenyu websocket sync occur npe
   
   ### Expected Behavior
   
   no error
   
   ### Steps To Reproduce
   
   1.delete rule in shenyu admin
   2.shenyu websocket sync occur npe
   
   ### Environment
   
   ```markdown
   ShenYu version(s):2.5.0
   ```
   
   
   ### Debug logs
   
   2022-08-09 14:11:05 [WebSocketConnectReadThread-262] INFO  
org.apache.shenyu.plugin.sync.data.websocket.client.ShenyuWebsocketClient - 
handleResult({"groupType":"RULE","eventType":"DELETE","data":[{"id":"1556813932145938432","name":"/http/test/**","selectorId":"1556813671167954944","matchMode":0,"sort":1,"enabled":true,"loged":true,"handle":"{\"requestVolumeThreshold\":\"5\",\"errorThresholdPercentage\":\"5\",\"sleepWindowInMilliseconds\":\"50000\",\"executionIsolationStrategy\":1,\"callBackUri\":\"\",\"groupKey\":\"\",\"commandKey\":\"\",\"maxConcurrentRequests\":\"0\"}","conditionDataList":[]}]})
   2022-08-09 14:11:05 [WebSocketConnectReadThread-262] ERROR 
org.java_websocket.drafts.Draft_6455 - Runtime exception during 
onWebsocketMessage
   java.lang.NullPointerException: null
        at 
java.util.concurrent.ConcurrentHashMap.get(ConcurrentHashMap.java:936)
        at 
org.apache.shenyu.plugin.base.cache.CommonPluginDataSubscriber.removeCacheData(CommonPluginDataSubscriber.java:245)
        at 
org.apache.shenyu.plugin.base.cache.CommonPluginDataSubscriber.lambda$subscribeDataHandler$4(CommonPluginDataSubscriber.java:165)
        at java.util.Optional.ifPresent(Optional.java:159)
        at 
org.apache.shenyu.plugin.base.cache.CommonPluginDataSubscriber.subscribeDataHandler(CommonPluginDataSubscriber.java:165)
        at 
org.apache.shenyu.plugin.base.cache.CommonPluginDataSubscriber.unRuleSubscribe(CommonPluginDataSubscriber.java:143)
        at java.util.ArrayList.forEach(ArrayList.java:1259)
        at 
org.apache.shenyu.plugin.sync.data.websocket.handler.RuleDataHandler.doDelete(RuleDataHandler.java:54)
        at 
org.apache.shenyu.plugin.sync.data.websocket.handler.AbstractDataHandler.handle(AbstractDataHandler.java:80)
        at 
org.apache.shenyu.plugin.sync.data.websocket.handler.WebsocketDataHandler.executor(WebsocketDataHandler.java:59)
        at 
org.apache.shenyu.plugin.sync.data.websocket.client.ShenyuWebsocketClient.handleResult(ShenyuWebsocketClient.java:161)
        at 
org.apache.shenyu.plugin.sync.data.websocket.client.ShenyuWebsocketClient.onMessage(ShenyuWebsocketClient.java:112)
        at 
org.java_websocket.client.WebSocketClient.onWebsocketMessage(WebSocketClient.java:591)
        at 
org.java_websocket.drafts.Draft_6455.processFrameText(Draft_6455.java:885)
        at 
org.java_websocket.drafts.Draft_6455.processFrame(Draft_6455.java:819)
        at org.java_websocket.WebSocketImpl.decodeFrames(WebSocketImpl.java:379)
        at org.java_websocket.WebSocketImpl.decode(WebSocketImpl.java:216)
        at 
org.java_websocket.client.WebSocketClient.run(WebSocketClient.java:508)
        at java.lang.Thread.run(Thread.java:750)
   2022-08-09 14:11:05 [WebSocketConnectReadThread-262] ERROR 
org.apache.shenyu.plugin.sync.data.websocket.client.ShenyuWebsocketClient - 
websocket server[ws://localhost:9095/websocket] is error.....
   java.lang.NullPointerException: null
        at 
java.util.concurrent.ConcurrentHashMap.get(ConcurrentHashMap.java:936)
        at 
org.apache.shenyu.plugin.base.cache.CommonPluginDataSubscriber.removeCacheData(CommonPluginDataSubscriber.java:245)
        at 
org.apache.shenyu.plugin.base.cache.CommonPluginDataSubscriber.lambda$subscribeDataHandler$4(CommonPluginDataSubscriber.java:165)
        at java.util.Optional.ifPresent(Optional.java:159)
        at 
org.apache.shenyu.plugin.base.cache.CommonPluginDataSubscriber.subscribeDataHandler(CommonPluginDataSubscriber.java:165)
        at 
org.apache.shenyu.plugin.base.cache.CommonPluginDataSubscriber.unRuleSubscribe(CommonPluginDataSubscriber.java:143)
        at java.util.ArrayList.forEach(ArrayList.java:1259)
        at 
org.apache.shenyu.plugin.sync.data.websocket.handler.RuleDataHandler.doDelete(RuleDataHandler.java:54)
        at 
org.apache.shenyu.plugin.sync.data.websocket.handler.AbstractDataHandler.handle(AbstractDataHandler.java:80)
        at 
org.apache.shenyu.plugin.sync.data.websocket.handler.WebsocketDataHandler.executor(WebsocketDataHandler.java:59)
        at 
org.apache.shenyu.plugin.sync.data.websocket.client.ShenyuWebsocketClient.handleResult(ShenyuWebsocketClient.java:161)
        at 
org.apache.shenyu.plugin.sync.data.websocket.client.ShenyuWebsocketClient.onMessage(ShenyuWebsocketClient.java:112)
        at 
org.java_websocket.client.WebSocketClient.onWebsocketMessage(WebSocketClient.java:591)
        at 
org.java_websocket.drafts.Draft_6455.processFrameText(Draft_6455.java:885)
        at 
org.java_websocket.drafts.Draft_6455.processFrame(Draft_6455.java:819)
        at org.java_websocket.WebSocketImpl.decodeFrames(WebSocketImpl.java:379)
        at org.java_websocket.WebSocketImpl.decode(WebSocketImpl.java:216)
        at 
org.java_websocket.client.WebSocketClient.run(WebSocketClient.java:508)
        at java.lang.Thread.run(Thread.java:750)
   2022-08-09 14:11:25 [WebSocketConnectReadThread-262] INFO  
org.apache.shenyu.plugin.sync.data.websocket.client.ShenyuWebsocketClient - 
handleResult({"groupType":"RULE","eventType":"UPDATE","data":[{"id":"1556885846348533760","name":"/http/test/**","pluginName":"hystrix","selectorId":"1556813671167954944","matchMode":0,"sort":1,"enabled":true,"loged":true,"handle":"{\"requestVolumeThreshold\":\"5\",\"errorThresholdPercentage\":\"5\",\"sleepWindowInMilliseconds\":\"5000\",\"executionIsolationStrategy\":1,\"callBackUri\":\"\",\"groupKey\":\"\",\"commandKey\":\"\",\"maxConcurrentRequests\":\"5\"}","conditionDataList":[{"paramType":"uri","operator":"pathPatter","paramName":"/","paramValue":"/http/"}]}]})
   
   
   ### Anything else?
   
   _No response_


-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to