[whyour/qinglong]服务启动超时

2024-01-31 450 views
9

v2.15.20

服务启动超时 请先按如下方式修复:

  1. 宿主机执行 docker run --rm -v /var/run/docker.sock:/var/run/docker.sock containrrr/watchtower -cR <容器名>
  2. 容器内执行 ql -l check、ql -l update
  3. 如果无法解决,容器内执行 pm2 logs,拷贝执行结果提交 issue null 2023-08-05T21:39:11: Error: Cannot find module 'tar' 2023-08-05T21:39:11: Require stack: 2023-08-05T21:39:11: - /ql/static/build/services/system.js 2023-08-05T21:39:11: - /ql/static/build/api/system.js 2023-08-05T21:39:11: - /ql/static/build/api/index.js 2023-08-05T21:39:11: - /ql/static/build/loaders/express.js 2023-08-05T21:39:11: - /ql/static/build/loaders/app.js 2023-08-05T21:39:11: - /ql/static/build/app.js 2023-08-05T21:39:11: at Function.Module._resolveFilename (node:internal/modules/cjs/loader:956:15) 2023-08-05T21:39:11: at Module.Hook._require.Module.require (/root/.local/share/pnpm/global/5/.pnpm/require-in-the-middle@5.1.0/node_modules/require-in-the-middle/index.js:61:29) 2023-08-05T21:39:11: at require (node:internal/modules/cjs/helpers:102:18) 2023-08-05T21:39:11: at Object. (/ql/back/services/system.ts:27:1) 2023-08-05T21:39:11: at Module._compile (node:internal/modules/cjs/loader:1120:14) 2023-08-05T21:39:11: at Object.Module._extensions..js (node:internal/modules/cjs/loader:1174:10) 2023-08-05T21:39:11: at Module.load (node:internal/modules/cjs/loader:998:32) 2023-08-05T21:39:11: at Function.Module._load (node:internal/modules/cjs/loader:839:12) 2023-08-05T21:39:11: at Module.require (node:internal/modules/cjs/loader:1022:19) 2023-08-05T21:39:11: at Module.Hook._require.Module.require (/root/.local/share/pnpm/global/5/.pnpm/require-in-the-middle@5.1.0/node_modules/require-in-the-middle/index.js:80:39) { 2023-08-05T21:39:11: code: 'MODULE_NOT_FOUND', 2023-08-05T21:39:11: requireStack: [ 2023-08-05T21:39:11: '/ql/static/build/services/system.js', 2023-08-05T21:39:11: '/ql/static/build/api/system.js', 2023-08-05T21:39:11: '/ql/static/build/api/index.js', 2023-08-05T21:39:11: '/ql/static/build/loaders/express.js', 2023-08-05T21:39:11: '/ql/static/build/loaders/app.js', 2023-08-05T21:39:11: '/ql/static/build/app.js' 2023-08-05T21:39:11: ] 2023-08-05T21:39:11: } 2023-08-05T21:39:11: This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). The promise rejected with the reason: 2023-08-05T21:39:11: Error: Cannot find module 'tar' 2023-08-05T21:39:11: Require stack: 2023-08-05T21:39:11: - /ql/static/build/services/system.js 2023-08-05T21:39:11: - /ql/static/build/api/system.js 2023-08-05T21:39:11: - /ql/static/build/api/index.js 2023-08-05T21:39:11: - /ql/static/build/loaders/express.js 2023-08-05T21:39:11: - /ql/static/build/loaders/app.js 2023-08-05T21:39:11: - /ql/static/build/app.js 2023-08-05T21:39:11: at Function.Module._resolveFilename (node:internal/modules/cjs/loader:956:15) 2023-08-05T21:39:11: at Module.Hook._require.Module.require (/root/.local/share/pnpm/global/5/.pnpm/require-in-the-middle@5.1.0/node_modules/require-in-the-middle/index.js:61:29) 2023-08-05T21:39:11: at require (node:internal/modules/cjs/helpers:102:18) 2023-08-05T21:39:11: at Object. (/ql/back/services/system.ts:27:1) 2023-08-05T21:39:11: at Module._compile (node:internal/modules/cjs/loader:1120:14) 2023-08-05T21:39:11: at Object.Module._extensions..js (node:internal/modules/cjs/loader:1174:10) 2023-08-05T21:39:11: at Module.load (node:internal/modules/cjs/loader:998:32) 2023-08-05T21:39:11: at Function.Module._load (node:internal/modules/cjs/loader:839:12) 2023-08-05T21:39:11: at Module.require (node:internal/modules/cjs/loader:1022:19) 2023-08-05T21:39:11: at Module.Hook._require.Module.require (/root/.local/share/pnpm/global/5/.pnpm/require-in-the-middle@5.1.0/node_modules/require-in-the-middle/index.js:80:39) 2023-08-05T21:40:16: Error: Cannot find module 'tar' 2023-08-05T21:40:16: Require stack: 2023-08-05T21:40:16: - /ql/static/build/services/system.js 2023-08-05T21:40:16: - /ql/static/build/api/system.js 2023-08-05T21:40:16: - /ql/static/build/api/index.js 2023-08-05T21:40:16: - /ql/static/build/loaders/express.js 2023-08-05T21:40:16: - /ql/static/build/loaders/app.js 2023-08-05T21:40:16: - /ql/static/build/app.js 2023-08-05T21:40:16: at Function.Module._resolveFilename (node:internal/modules/cjs/loader:956:15) 2023-08-05T21:40:16: at Module.Hook._require.Module.require (/root/.local/share/pnpm/global/5/.pnpm/require-in-the-middle@5.1.0/node_modules/require-in-the-middle/index.js:61:29) 2023-08-05T21:40:16: at require (node:internal/modules/cjs/helpers:102:18) 2023-08-05T21:40:16: at Object. (/ql/back/services/system.ts:27:1) 2023-08-05T21:40:16: at Module._compile (node:internal/modules/cjs/loader:1120:14) 2023-08-05T21:40:16: at Object.Module._extensions..js (node:internal/modules/cjs/loader:1174:10) 2023-08-05T21:40:16: at Module.load (node:internal/modules/cjs/loader:998:32) 2023-08-05T21:40:16: at Function.Module._load (node:internal/modules/cjs/loader:839:12) 2023-08-05T21:40:16: at Module.require (node:internal/modules/cjs/loader:1022:19) 2023-08-05T21:40:16: at Module.Hook._require.Module.require (/root/.local/share/pnpm/global/5/.pnpm/require-in-the-middle@5.1.0/node_modules/require-in-the-middle/index.js:80:39) { 2023-08-05T21:40:16: code: 'MODULE_NOT_FOUND', 2023-08-05T21:40:16: requireStack: [ 2023-08-05T21:40:16: '/ql/static/build/services/system.js', 2023-08-05T21:40:16: '/ql/static/build/api/system.js', 2023-08-05T21:40:16: '/ql/static/build/api/index.js', 2023-08-05T21:40:16: '/ql/static/build/loaders/express.js', 2023-08-05T21:40:16: '/ql/static/build/loaders/app.js', 2023-08-05T21:40:16: '/ql/static/build/app.js' 2023-08-05T21:40:16: ] 2023-08-05T21:40:16: } 2023-08-05T21:40:16: This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). The promise rejected with the reason: 2023-08-05T21:40:16: Error: Cannot find module 'tar' 2023-08-05T21:40:16: Require stack: 2023-08-05T21:40:16: - /ql/static/build/services/system.js 2023-08-05T21:40:16: - /ql/static/build/api/system.js 2023-08-05T21:40:16: - /ql/static/build/api/index.js 2023-08-05T21:40:16: - /ql/static/build/loaders/express.js 2023-08-05T21:40:16: - /ql/static/build/loaders/app.js 2023-08-05T21:40:16: - /ql/static/build/app.js 2023-08-05T21:40:16: at Function.Module._resolveFilename (node:internal/modules/cjs/loader:956:15) 2023-08-05T21:40:16: at Module.Hook._require.Module.require (/root/.local/share/pnpm/global/5/.pnpm/require-in-the-middle@5.1.0/node_modules/require-in-the-middle/index.js:61:29) 2023-08-05T21:40:16: at require (node:internal/modules/cjs/helpers:102:18) 2023-08-05T21:40:16: at Object. (/ql/back/services/system.ts:27:1) 2023-08-05T21:40:16: at Module._compile (node:internal/modules/cjs/loader:1120:14) 2023-08-05T21:40:16: at Object.Module._extensions..js (node:internal/modules/cjs/loader:1174:10) 2023-08-05T21:40:16: at Module.load (node:internal/modules/cjs/loader:998:32) 2023-08-05T21:40:16: at Function.Module._load (node:internal/modules/cjs/loader:839:12) 2023-08-05T21:40:16: at Module.require (node:internal/modules/cjs/loader:1022:19) 2023-08-05T21:40:16: at Module.Hook._require.Module.require (/root/.local/share/pnpm/global/5/.pnpm/require-in-the-middle@5.1.0/node_modules/require-in-the-middle/index.js:80:39)

{"code":7,"killed":false,"signal":null,"cmd":"curl -s http://localhost:5600/api/system"}

解决

5700/error错误。脚本在运行。web页打不开。check update都试过,不能修复。

回答

1

今天的最新版更新了,还是这个样子。

3

root@qinglong-1:/ql $ pm2 logs [TAILING] Tailing last 15 lines for [all] processes (change the value with --lines option) /root/.pm2/pm2.log last 15 lines: PM2 | 2023-08-06T16:27:42: PM2 log: Stopping app:public id:1 PM2 | 2023-08-06T16:27:42: PM2 log: App [schedule:0] exited with code [0] via signal [SIGINT] PM2 | 2023-08-06T16:27:42: PM2 log: App [public:1] exited with code [0] via signal [SIGINT] PM2 | 2023-08-06T16:27:42: PM2 log: pid=95 msg=process killed PM2 | 2023-08-06T16:27:42: PM2 log: App [schedule:0] starting in -fork mode- PM2 | 2023-08-06T16:27:42: PM2 log: pid=101 msg=process killed PM2 | 2023-08-06T16:27:42: PM2 log: App [public:1] starting in -fork mode- PM2 | 2023-08-06T16:27:45: PM2 log: App [schedule:0] online PM2 | 2023-08-06T16:27:45: PM2 log: Process 2 in a stopped status, starting it PM2 | 2023-08-06T16:27:45: PM2 log: Stopping app:panel id:2 PM2 | 2023-08-06T16:27:45: PM2 log: App [panel:2] exited with code [0] via signal [SIGINT] PM2 | 2023-08-06T16:27:45: PM2 log: pid=119 msg=process killed PM2 | 2023-08-06T16:27:45: PM2 log: App [panel:2] starting in -fork mode- PM2 | 2023-08-06T16:27:50: PM2 log: App [public:1] online PM2 | 2023-08-06T16:27:55: PM2 log: App [panel:2] online

/root/.pm2/logs/schedule-error.log last 15 lines: /root/.pm2/logs/public-error.log last 15 lines: /root/.pm2/logs/schedule-out.log last 15 lines: 0|schedule | 2023-08-06T16:27:45: debug: ✌️ 定时服务启动成功!

/root/.pm2/logs/panel-out.log last 15 lines: 2|panel | 2023-08-06T16:27:47: info: ✌️ DB loaded 2|panel | 2023-08-06T16:27:47: info: ✌️ Init file down 2|panel | 2023-08-06T16:27:47: info: ✌️ Sentry loaded

/root/.pm2/logs/panel-error.log last 15 lines: 2|panel | 2023-08-06T16:27:48: - /ql/static/build/api/system.js 2|panel | 2023-08-06T16:27:48: - /ql/static/build/api/index.js 2|panel | 2023-08-06T16:27:48: - /ql/static/build/loaders/express.js 2|panel | 2023-08-06T16:27:48: - /ql/static/build/loaders/app.js 2|panel | 2023-08-06T16:27:48: - /ql/static/build/app.js 2|panel | 2023-08-06T16:27:48: at Function.Module._resolveFilename (node:internal/modules/cjs/loader:956:15) 2|panel | 2023-08-06T16:27:48: at Module.Hook._require.Module.require (/root/.local/share/pnpm/global/5/.pnpm/require-in-the-middle@5.1.0/node_modules/require-in-the-middle/index.js:61:29) 2|panel | 2023-08-06T16:27:48: at require (node:internal/modules/cjs/helpers:102:18) 2|panel | 2023-08-06T16:27:48: at Object. (/ql/back/services/system.ts:27:1) 2|panel | 2023-08-06T16:27:48: at Module._compile (node:internal/modules/cjs/loader:1120:14) 2|panel | 2023-08-06T16:27:48: at Object.Module._extensions..js (node:internal/modules/cjs/loader:1174:10) 2|panel | 2023-08-06T16:27:48: at Module.load (node:internal/modules/cjs/loader:998:32) 2|panel | 2023-08-06T16:27:48: at Function.Module._load (node:internal/modules/cjs/loader:839:12) 2|panel | 2023-08-06T16:27:48: at Module.require (node:internal/modules/cjs/loader:1022:19) 2|panel | 2023-08-06T16:27:48: at Module.Hook._require.Module.require (/root/.local/share/pnpm/global/5/.pnpm/require-in-the-middle@5.1.0/node_modules/require-in-the-middle/index.js:80:39)

/root/.pm2/logs/public-out.log last 15 lines: 1|public | 2023-08-06T16:27:44: info: ✌️ Sentry loaded 1|public | 2023-08-06T16:27:50: info: ✌️ DB loaded 1|public | 2023-08-06T16:27:50: debug: ✌️ 公共服务启动成功!

6

+1头铁不听劝冲了。。。

3

使用宿主机方式更新下

首先更新镜像,确保更新到了最新版镜像 确保原来映射了 data 目录 使用 docker run --rm -v /var/run/docker.sock:/var/run/docker.sock containrrr/watchtower -cR <容器名> 更新

3

我是在威联通里的容器中安装的。容器内执行 ql -l check、ql -l update执行了。 上一次遇到后,解决成功的。这次升级出错后,就一直没解决这个问题。