healer1219 opened a new issue, #1407:
URL: https://github.com/apache/servicecomb-service-center/issues/1407
**Describe the bug**
* 服务使用 spring cloud huawei 1.8.0 hoxton
* SC 为 2.0.0 release 版本
* 实例下线调用 deregister,向sc发起unregister,返回 400017
* SC ms.go UnregisterInstance -> revokeInstance -> "Instance's leaseId not
exist."
* 导致实例未及时从sc中 unregister,只能等待 sc 主动清除
**To Reproduce**
Steps to reproduce the behavior:
1. springcloud huawei 1.8.0 hoxton
``` java
@Component
public class Unregister implements
ApplicationListener<ApplicationReadyEvent> {
@Autowired
private ServiceCombRegistration serviceCombRegistration;
@Autowired
private ServiceCombServiceRegistry serviceCombServiceRegistry;
@Override
public void onApplicationEvent(ApplicationReadyEvent event) {
Runtime.getRuntime().addShutdownHook(
new Thread(() -> {
serviceCombServiceRegistry.deregister(serviceCombRegistration);
})
);
}
}
```
2. kill 这个实例
**Expected behavior**
服务主动调用unregister后应能正常清除实例
**Platform And Runtime (please complete the following information):**
Platform
- OS: openEuler 22.03 LTS
- Browser [e.g. chrome, safari]
- Version [e.g. 22]
Runtime
- Version openEuler 22.03 LTS
--
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]