nacos-group / nacos-group/nacos-sdk-python
python端心跳超时后,重新发送心跳包,在java端会报NullPointerException
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 471
- Forks
- 155
- PR merge metrics
- No merged PRs in 30d
Description
python端服务注册成功后,大概每隔几周服务就会掉线。掉线后重新发送心跳包,java端就找不到实例了,此时nacos实例列表中可以看到实例,但是java端请求的时候就会报空指针。
naming-event.log
2021-08-13 12:15:58,605 INFO {POS} {IP-DISABLED} valid: 192.168.0.228:9000@DEFAULT@DEFAULT_GROUP@@semantic, region: unknown, msg: client timeout after 15000, last beat: 1628828139154
2021-08-13 12:16:13,664 INFO DEFAULT_GROUP@@semantic {SYNC} {IP-DEAD} cluster: DEFAULT, dead ips size: 1, content: [192.168.0.228:9000:unknown:DEFAULT_1.0_false_false_DEFAULT]
2021-08-13 12:16:13,664 INFO [IP-UPDATED] namespace: prod, service: DEFAULT_GROUP@@semantic, ips:
2021-08-13 12:18:19,154 INFO DEFAULT_GROUP@@semantic {SYNC} {IP-NEW} cluster: DEFAULT, new ips size: 1, content: [192.168.0.228:9000:unknown:DEFAULT_1.0_true_false_DEFAULT]
2021-08-13 12:18:19,155 INFO [IP-UPDATED] namespace: prod, service: DEFAULT_GROUP@@semantic, ips: 192.168.0.228:9000_true,
naming-server.log
2021-08-13 12:15:59,638 WARN protect threshold reached, return all ips, service: DEFAULT_GROUP@@semantic
2021-08-13 12:16:03,313 WARN protect threshold reached, return all ips, service: DEFAULT_GROUP@@semantic
2021-08-13 12:16:13,315 WARN protect threshold reached, return all ips, service: DEFAULT_GROUP@@semantic
2021-08-13 12:16:13,638 INFO [AUTO-DELETE-IP] service: DEFAULT_GROUP@@semantic, ip: {"instanceId":"192.168.0.228#9000#DEFAULT#DEFAULT_GROUP@@semantic","ip":"192.168.0.228","port":9000,"weight":1.0,"healthy":false,"enabled":true,"ephemeral":true,"clusterName":"DEFAULT","serviceName":"DEFAULT_GROUP@@semantic","metadata":{},"lastBeat":1628828139154,"marked":false,"app":"DEFAULT","instanceHeartBeatInterval":5000,"instanceIdGenerator":"simple","instanceHeartBeatTimeOut":15000,"ipDeleteTimeout":30000}
2021-08-13 12:16:13,664 INFO [NACOS-RAFT] datum is changed, key: com.alibaba.nacos.naming.iplist.ephemeral.prod##DEFAULT_GROUP@@semantic, value: {"instanceList":[]}
2021-08-13 12:18:19,154 WARN [CLIENT-BEAT] The instance has been removed for health mechanism, perform data compensation operations, beat: {"load":0.0,"cpu":0.0,"rt":0.0,"qps":0.0,"mem":0.0,"port":9000,"ip":"192.168.0.228","serviceName":"semantic","cluster":"DEFAULT","weight":1.0,"ephemeral":true}, serviceName: DEFAULT_GROUP@@semantic
2021-08-13 12:18:19,154 INFO [NACOS-RAFT] datum is changed, key: com.alibaba.nacos.naming.iplist.ephemeral.prod##DEFAULT_GROUP@@semantic, value: {"instanceList":[{"instanceId":"192.168.0.228#9000#DEFAULT#DEFAULT_GROUP@@semantic","ip":"192.168.0.228","port":9000,"weight":1.0,"healthy":true,"enabled":true,"ephemeral":true,"clusterName":"DEFAULT","serviceName":"DEFAULT_GROUP@@semantic","lastBeat":1628828299154,"marked":false,"instanceHeartBeatInterval":5000,"instanceIdGenerator":"simple","instanceHeartBeatTimeOut":15000,"ipDeleteTimeout":30000}]}
java端的log
2021-08-13 12:16:23.317 INFO 16115 --- [com.alibaba.nacos.client.naming.updater] com.alibaba.nacos.client.naming : removed ips(1) service: DEFAULT_GROUP@@semantic -> [{"clusterName":"DEFAULT","enabled":true,"ephemeral":true,"healthy":true,"instanceHeartBeatInterval":5000,"instanceHeartBeatTimeOut":15000,"instanceId":"192.168.0.228#9000#DEFAULT#DEFAULT_GROUP@@semantic","instanceIdGenerator":"simple","ip":"192.168.0.228","ipDeleteTimeout":30000,"metadata":{},"port":9000,"serviceName":"DEFAULT_GROUP@@semantic","weight":1.0}]
2021-08-13 12:16:23.318 INFO 16115 --- [com.alibaba.nacos.client.naming.updater] com.alibaba.nacos.client.naming : current ips:(0) service: DEFAULT_GROUP@@semantic -> []
2021-08-13 12:18:23.338 INFO 16115 --- [com.alibaba.nacos.client.naming.updater] com.alibaba.nacos.client.naming : new ips(1) service: DEFAULT_GROUP@@semantic -> [{"clusterName":"DEFAULT","enabled":true,"ephemeral":true,"healthy":true,"instanceHeartBeatInterval":5000,"instanceHeartBeatTimeOut":15000,"instanceId":"192.168.0.228#9000#DEFAULT#DEFAULT_GROUP@@semantic","instanceIdGenerator":"simple","ip":"192.168.0.228","ipDeleteTimeout":30000,"port":9000,"serviceName":"DEFAULT_GROUP@@semantic","weight":1.0}]
2021-08-13 12:18:23.339 INFO 16115 --- [com.alibaba.nacos.client.naming.updater] com.alibaba.nacos.client.naming : current ips:(1) service: DEFAULT_GROUP@@semantic -> [{"clusterName":"DEFAULT","enabled":true,"ephemeral":true,"healthy":true,"instanceHeartBeatInterval":5000,"instanceHeartBeatTimeOut":15000,"instanceId":"192.168.0.228#9000#DEFAULT#DEFAULT_GROUP@@semantic","instanceIdGenerator":"simple","ip":"192.168.0.228","ipDeleteTimeout":30000,"port":9000,"serviceName":"DEFAULT_GROUP@@semantic","weight":1.0}]
2021-08-13 12:19:25.319 ERROR 16115 --- [reactor-http-epoll-8] a.w.r.e.AbstractErrorWebExceptionHandler : [4107f492] 500 Server Error for HTTP POST "/semantic/bot/1a47a3f9a9af49f3"java.lang.NullPointerException: null
2021-08-13 12:20:01.375 ERROR 16115 --- [reactor-http-epoll-3] a.w.r.e.AbstractErrorWebExceptionHandler : [76993041] 500 Server Error for HTTP POST "/semantic/bot/assistant"
java.lang.NullPointerException: null
2021-08-13 12:20:04.657 ERROR 16115 --- [reactor-http-epoll-6] a.w.r.e.AbstractErrorWebExceptionHandler : [99790b9a] 500 Server Error for HTTP POST "/semantic/bot/1a47a3f9a9af49f3"
java.lang.NullPointerException: null
2021-08-13 12:20:08.177 ERROR 16115 --- [reactor-http-epoll-7] a.w.r.e.AbstractErrorWebExceptionHandler : [e2caca67] 500 Server Error for HTTP POST "/semantic/bot/1a47a3f9a9af49f3"
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No file, test, or entry point is named. Start by reproducing the heartbeat timeout and recovery sequence from the naming-event.log and naming-server.log excerpts, then trace the Java request path that produces the NullPointerException; done means the recovered instance no longer causes that failure.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, python
- Domain
- backend, distributed-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100