zstackio / zstack

ZStack - the open-source IaaS software http://zstack.org (国内用户请至 http://zstack.io)
Apache License 2.0
1.3k stars 393 forks source link

ui失败 #1337

Closed admin-ping closed 1 year ago

admin-ping commented 1 year ago

服务器意外断电后使用命令“zstack-ctl start_ui”报错:

nginx server config file /usr/local/zstack/zstack-ui/configs/extend.server.nginx.conf nginx upstream config file /usr/local/zstack/zstack-ui/configs/extend.upstream.nginx.conf pm2 config file /usr/local/zstack/zstack-ui/configs/extend.ecosystem.config.json node: relocation error: node: symbol -Emcmp, version GLIBC_2.2.5 not defined in file libc.so.6 with link time reference ERROR 1045 (28000): Access denied for user 'zstack_ui'@'localhost' (using password: NO) node: relocation error: node: symbol -Emcmp, version GLIBC_2.2.5 not defined in file libc.so.6 with link time reference ... -node: relocation error: node: symbol -Emcmp, version GLIBC_2.2.5 not defined in file libc.so.6 with link time reference node: relocation error: node: symbol -Emcmp, version GLIBC_2.2.5 not defined in file libc.so.6 with link time reference node: relocation error: node: symbol -Emcmp, version GLIBC_2.2.5 not defined in file libc.so.6 with link time reference node: relocation error: node: symbol -Emcmp, version GLIBC_2.2.5 not defined in file libc.so.6 with link time reference |Job for pm2-zstack.service failed because the control process exited with error code. See "systemctl status pm2-zstack.service" and "journalctl -xe" for details. fail to start UI server on the localhost. Use zstack-ctl start_ui to restart it. zstack UI log could be found in /usr/local/zstack/zstack-ui/logs/zstack-ui-server.log

执行命令“systemctl status pm2-zstack.service”返回信息:

● pm2-zstack.service - PM2 process manager Loaded: loaded (/etc/systemd/system/pm2-zstack.service; enabled; vendor preset: disabled) Active: failed (Result: start-limit) since Tue 2023-06-20 10:42:25 CST; 4min 0s ago Docs: https://pm2.keymetrics.io/ Process: 43525 ExecStart=/usr/local/zstack/zstack-ui/node_modules/pm2/bin/pm2 resurrect (code=exited, status=127)

Jun 20 10:42:25 192-168-1-70 systemd[1]: Failed to start PM2 process manager. Jun 20 10:42:25 192-168-1-70 systemd[1]: Unit pm2-zstack.service entered fa.... Jun 20 10:42:25 192-168-1-70 systemd[1]: pm2-zstack.service failed. Jun 20 10:42:25 192-168-1-70 systemd[1]: pm2-zstack.service holdoff time ov.... Jun 20 10:42:25 192-168-1-70 systemd[1]: Stopped PM2 process manager. Jun 20 10:42:25 192-168-1-70 systemd[1]: start request repeated too quickly...e Jun 20 10:42:25 192-168-1-70 systemd[1]: Failed to start PM2 process manager. Jun 20 10:42:25 192-168-1-70 systemd[1]: Unit pm2-zstack.service entered fa.... Jun 20 10:42:25 192-168-1-70 systemd[1]: pm2-zstack.service failed. Hint: Some lines were ellipsized, use -l to show in full.

sinbargit commented 1 year ago

请先在命令行输入 :ps aux | grep pm2。 如果发现有许多的pm2进程,就ps aux | grep pm2 |xargs kill -9 杀掉他们。

admin-ping commented 1 year ago

查找并未发现存在pm2进程

sinbargit commented 1 year ago

ps aux | grep node 会出现很多进程么

admin-ping commented 1 year ago

这是具体返回结果 [root@192-168-1-70 ~]# ps aux | grep pm2 root 26945 0.0 0.0 112708 976 pts/2 S+ 14:41 0:00 grep --color=auto pm2

sinbargit commented 1 year ago

如果ps aux | grep node 有进程,就杀掉他们。 不管有没有都可以尝试运行下systemctl start pm2-zstack

sinbargit commented 1 year ago

如果ps aux | grep node 有进程,就杀掉他们。 不管有没有都可以尝试运行下systemctl start pm2-zstack

admin-ping commented 1 year ago

[root@192-168-1-70 ~]# systemctl start pm2-zstack Job for pm2-zstack.service failed because the control process exited with error code. See "systemctl status pm2-zstack.service" and "journalctl -xe" for details.

sinbargit commented 1 year ago

运行这个 /usr/local/zstack/zstack-ui/node_modules/pm2/bin/pm2 resurrect

admin-ping commented 1 year ago

提示错误: [root@192-168-1-70 ~]# /usr/local/zstack/zstack-ui/node_modules/pm2/bin/pm2 resurrect node: relocation error: node: symbol -Emcmp, version GLIBC_2.2.5 not defined in file libc.so.6 with link time reference

查找相关文件名存在多个同名: [root@192-168-1-70 ~]# find / -name "libc.so.6" /var/lib/docker/overlay2/2159e862736133cf2cf11044f02d9d3ad0c6e4eb50551c2217f343320773f909/diff/usr/lib64/libc.so.6 /var/lib/docker/overlay2/fc669779e149f14c1f44d808c2353adf7d6894bf9e2bcb055eae2c6974cc4be2/diff/usr/lib64/libc.so.6 /var/lib/docker/overlay2/28d08ec5f41f2a08c759a5de521d9cdd88410d2b00c78adae0a37e9b10d312d8/merged/usr/lib64/libc.so.6 /usr/lib64/libc.so.6

sinbargit commented 1 year ago

那么 这个看起来并不是断电造成的,似乎是底层库没有兼容,或者说node本身的问题。 你可以尝试直接运行 node 看看是否工作,如果不工作,重新安装node就可以。

admin-ping commented 1 year ago

运行node提示: [root@192-168-1-70 ~]# node node: relocation error: node: symbol -Emcmp, version GLIBC_2.2.5 not defined in file libc.so.6 with link time reference

断电前是正常运行的,断电重启后就出现错误,具体原因还未知

zstack-ctl里未发现install node,请问该如何安装

sinbargit commented 1 year ago

这个只要是14.15.1版本或者以上的nodejs都可以的。 可以使用yum install 安装,也可以网上下载安装包安装,或者自己编译构建安装都可以。

sinbargit commented 1 year ago

这个只要是14.15.1版本或者以上的nodejs都可以的。 可以使用yum install 安装,也可以网上下载安装包安装,或者自己编译构建安装都可以。

admin-ping commented 1 year ago

整合解决方案:

运行一下命令 yum -y remove nodejs yum -y install nodejs zstack-ctl stop zstack-ctl start 成功解决