Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tarsnode会拉起进程多次 #121

Open
panyihua opened this issue Apr 26, 2022 · 7 comments
Open

tarsnode会拉起进程多次 #121

panyihua opened this issue Apr 26, 2022 · 7 comments

Comments

@panyihua
Copy link

tarsweb后台点击重启,tarsnode拉起进程多次会是什么原因?

附上grep "pid changed" 的tarsnode日志:
2022-04-26 20:27:15|140601701943040|DEBUG|compiler_depend.ts:setPid:618| pid changed! 18133 --->>> 0
2022-04-26 20:27:15|140601651586816|DEBUG|compiler_depend.ts:setPid:618| pid changed! 0 --->>> 18342
2022-04-26 20:27:15|140601685157632|DEBUG|compiler_depend.ts:setPid:618| pid changed! 18342 --->>> 18165
2022-04-26 20:27:15|140601685157632|DEBUG|compiler_depend.ts:setPid:618| pid changed! 18165 --->>> 0
2022-04-26 20:27:17|140601659979520|DEBUG|compiler_depend.ts:setPid:618| pid changed! 0 --->>> 18566
2022-04-26 20:27:17|140601968285440|DEBUG|compiler_depend.ts:setPid:618| pid changed! 18566 --->>> 18382
2022-04-26 20:27:17|140601968285440|DEBUG|compiler_depend.ts:setPid:618| pid changed! 18382 --->>> 0
2022-04-26 20:27:20|140601668372224|DEBUG|compiler_depend.ts:setPid:618| pid changed! 0 --->>> 18753
2022-04-26 20:27:20|140601968285440|DEBUG|compiler_depend.ts:setPid:618| pid changed! 18753 --->>> 18575
2022-04-26 20:27:20|140601968285440|DEBUG|compiler_depend.ts:setPid:618| pid changed! 18575 --->>> 0
2022-04-26 20:27:24|140601659979520|DEBUG|compiler_depend.ts:setPid:618| pid changed! 0 --->>> 18938
2022-04-26 20:27:24|140601968285440|DEBUG|compiler_depend.ts:setPid:618| pid changed! 18938 --->>> 18762
2022-04-26 20:27:24|140601968285440|DEBUG|compiler_depend.ts:setPid:618| pid changed! 18762 --->>> 0
2022-04-26 20:27:25|140601643194112|DEBUG|compiler_depend.ts:setPid:618| pid changed! 0 --->>> 18342

最终启动完成的进程是18342
18566 18753 18938是被重复拉起的进程
18165 18382 18575 18762 是不知道哪里来的进程

@ruanshudong
Copy link
Contributor

框架是什么版本? 业务服务马上就挂了?

@panyihua
Copy link
Author

web:2.4.27
framework:3.0.4
业务服18342正常启动,18566 18753 18938日志里显示端口被占用自动退出了

@ruanshudong
Copy link
Contributor

升级一下框架, 可能中间有一个版本, 对于服务的pid判断在某些系统上好像有问题

@panyihua
Copy link
Author

master分支最新版tarsnode启动不了
2022-04-28 14:53:26|[compiler_depend.ts::onUpdateConfig::606]|NodeServer::onUpdateConfig error:autoptr null handle error![N4tars12CommunicatorE]

@ruanshudong
Copy link
Contributor

昨天刚提交的代码没注意有问题, 刚才改了, 你更新试一试

@panyihua
Copy link
Author

main函数里是这样写的
parseConfig(argc,argv);
g_app.main( argc, argv );

parseConfig里面使用了Application::getCommunicator()
但是通信器初始化在g_app.main

@ruanshudong
Copy link
Contributor

是的, 是这个问题, 内外部代码这里有点不同, 同步的时候没注意

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants