私有部署社区版每次重启都报错,每次都是费很大功夫才能重启,请大神看看

问答  收藏
6 / 268

这是更新完第一次重启后失败,提示 Service response code error,然后打开日志后,显示如下:

Installer | 2024-03-03 21:59:48 | INFO | GenToken | Management background authentication Token: fcPG4hpaEJnG1pU80HNRw7CXfVIZvK3qrtr0zydBcdFB6ZxFmyhenixgDetMx4j0
Installer | 2024-03-03 21:59:48 | INFO | main | Server Listen 0.0.0.0:38881
Installer | 2024-03-03 21:59:48 | INFO | StartServerIdExec | bash -c ./service.sh startServerIdExec
Installer | 2024-03-03 22:09:56 | ERROR | StartServerIdExec | bash -c ./service.sh startServerIdExec | { _: [], path: '/data/mingdao', p: '/data/mingdao', port: 38880, '$0': 'bin/amd64/mingdaoyun_private_deployment_captain'}Service started, listening on port 38880./service.sh: line 386: 93276 Terminated binDir/serverIdExec --path installDir --port serverIdPort | exit status 143

后续通过 rm -f service.pid
ps -ef | grep 'mingdaoyun\|service.sh' | grep -v grep
在重启后还是失败,
这次报错如下:
Installer | 2024-03-03 22:22:01 | INFO | GenToken | Management background authentication Token: fcPG4hpaEJnG1pw7CXfVIZvK3qrtr0zydBcdFB6ZxFmyhenixgDetM0
Installer | 2024-03-03 22:22:01 | INFO | main | Server Listen 0.0.0.0:38881
panic: listen tcp 0.0.0.0:38881: bind: address already in use

goroutine 1 [running]:
main.main()
/data/jenkins/workspace/group-offline/offline-mingdaoyun-captain/server/main.go:49 +0x673

然后第二次重启就可以了,正常启动,请问这是怎么回事?