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

一段时间后就会报错不运行 #2361

Closed
hejun041 opened this issue May 13, 2024 · 9 comments
Closed

一段时间后就会报错不运行 #2361

hejun041 opened this issue May 13, 2024 · 9 comments

Comments

@hejun041
Copy link

Qinglong version

2.17.3

Steps to reproduce

jq: error (at :1): Cannot iterate over null (null)
jq: error (at :1): Cannot iterate over null (null)
jq: error (at :1): Cannot iterate over null (null)
jq: error (at :1): Cannot iterate over null (null)
jq: error (at :1): Cannot iterate over null (null)

What is expected?

每次更新最新版本也是一样,大约一个月一两次

What is actually happening?

jq: error (at :1): Cannot iterate over null (null)
jq: error (at :1): Cannot iterate over null (null)
jq: error (at :1): Cannot iterate over null (null)
jq: error (at :1): Cannot iterate over null (null)
jq: error (at :1): Cannot iterate over null (null)
image
image
image
执行ql check 也是一堆正常
root@armbian:~/docker/ql# docker exec -it ql_web_1 ql check

开始执行... 2024-05-13 09:10:57

=====> 开始检测
npm WARN deprecated [email protected]: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.

removed 1 package, and changed 167 packages in 2m

17 packages are looking for funding
run npm fund for details
---> 1. 开始检测配置文件

---> 配置文件检测完成

---> 2. 开始安装青龙依赖

安装 /ql 依赖包...

Packages are hard linked from the content-addressable store to the virtual store.
Content-addressable store is at: /root/.local/share/pnpm/store/v3
Virtual store is at: node_modules/.pnpm

╭─────────────────────────────────────────────────────────────────╮
│ │
│ Update available! 8.3.1 → 9.1.1. │
│ Changelog: https://github.com/pnpm/pnpm/releases/tag/v9.1.1
│ Run "pnpm add -g pnpm" to update. │
│ │
│ Follow @pnpmjs for updates: https://twitter.com/pnpmjs
│ │
╰─────────────────────────────────────────────────────────────────╯

.../node_modules/protobufjs postinstall$ node scripts/postinstall
.../node_modules/protobufjs postinstall: Done
.../node_modules/@whyour/sqlite3 install$ node-pre-gyp install --fallback-to-build
.../node_modules/@whyour/sqlite3 install: [@whyour/sqlite3] Success: "/ql/node_modules/.pnpm/github.com+whyour+node-sqlite3@3a00af0b5d7603b7f1b290032507320b18a6b741/node_modules/@whyour/sqlite3/lib/binding/napi-v6-linux-arm64/node_sqlite3.node" is installed via remote
.../node_modules/@whyour/sqlite3 install: Done

dependencies:

  • @grpc/grpc-js 1.8.15
  • @otplib/preset-default 12.0.1
  • @sentry/node 7.54.0
  • body-parser 1.20.2
  • celebrate 15.0.1
  • chokidar 3.5.3
  • cors 2.8.5
  • cron-parser 4.8.1
  • cross-spawn 7.0.3
  • dayjs 1.11.8
  • dotenv 16.1.4
  • express 4.18.2
  • express-jwt 6.1.2
  • express-rate-limit 7.0.0
  • express-urlrewrite 1.4.0
  • form-data 4.0.0
  • got 11.8.6
  • hpagent 1.2.0
  • http-proxy-middleware 2.0.6
  • iconv-lite 0.6.3
  • ip2region 2.3.0
  • js-yaml 4.1.0
  • jsonwebtoken 8.5.1
  • lodash 4.17.21
  • multer 1.4.5-lts.1
  • nedb 1.8.0
  • node-schedule 2.1.1
  • nodemailer 6.9.3
  • p-queue-cjs 7.3.4
  • protobufjs 7.2.3
  • pstree.remy 1.1.8
  • reflect-metadata 0.1.13
  • request-ip 3.3.0
  • sequelize 6.32.0
  • serve-handler 6.1.5
  • sockjs 0.3.24
  • sqlite3 <- @whyour/sqlite3 1.0.3
  • toad-scheduler 1.6.1
  • tough-cookie 4.0.0
  • typedi 0.10.0
  • uuid 8.3.2
  • winston 3.9.0
  • winston-daily-rotate-file 4.7.1
  • yargs 17.7.2

devDependencies: skipped

@ postinstall /ql
max setup 2>/dev/null || true

Done in 43.4s
---> 青龙依赖安装完成

---> 脚本依赖安装完成

---> 1. 复制通知文件

---> 复制一份 /ql/sample/notify.py 为 /ql/data/scripts/notify.py

'/ql/sample/notify.py' -> '/ql/data/scripts/notify.py'

---> 复制一份 /ql/sample/notify.js 为 /ql/data/scripts/sendNotify.js

'/ql/sample/notify.js' -> '/ql/data/scripts/sendNotify.js'
---> 通知文件复制完成

---> 2. 复制nginx配置文件

'/ql/docker/nginx.conf' -> '/etc/nginx/nginx.conf'
'/ql/docker/front.conf' -> '/etc/nginx/conf.d/front.conf'
---> 配置文件复制完成

=====> 检测面板

<script src="./api/env.js"></script> <script src="https://gw.alipayobjects.com/os/lib/react/18.2.0/umd/react.production.min.js"></script> <script src="https://gw.alipayobjects.com/os/lib/react-dom/18.2.0/umd/react-dom.production.min.js"></script>
<script src="./umi.a237342f.js"></script>

=====> 面板服务启动正常

=====> 检测nginx服务
56 nginx: master process nginx -c /etc/nginx/nginx.conf
57 nginx: worker process
58 nginx: worker process
59 nginx: worker process
60 nginx: worker process

=====> nginx服务正常

---> pm2日志
2024-04-20T20:06:49: ✌️ DB loaded
2024-04-20T20:06:49: ✌️ Init file down
2024-04-20T20:06:49: ✌️ Sentry loaded
2024-04-20T20:06:51: ✌️ Dependency Injector loaded
2024-04-20T20:06:52: ✌️ Express loaded
2024-04-20T20:06:52: ✌️ init data loaded
2024-04-20T20:06:52: ✌️ link deps loaded
2024-04-20T20:06:52: ✌️ init task loaded
2024-04-20T20:06:53: ✌️ 后端服务启动成功!

=====> 检测后台

{"code":200,"data":{"isInitialized":true,"version":"2.17.3","publishTime":1711726200,"branch":"master","changeLog":"1. python 通知文件支持自定义参数,可由每个脚本控制通知参数配置
2. ql repo 命令复制仓库任务时,保留仓库脚本原始目录层级
3. 修改自定义通知 body 解析逻辑
4. 修改系统重启逻辑
5. 修改 latest 基础镜像 node 版本为 v20
","changeLogLink":"https://t.me/jiao_long/404"}}

=====> 后台服务启动正常

[PM2] Applying action reloadProcessId on app [update](ids: [ 0 ])
[PM2] update
┌────┬─────────────┬─────────────┬─────────┬─────────┬──────────┬────────┬──────┬───────────┬──────────┬──────────┬──────────┬──────────┐
│ id │ name │ namespace │ version │ mode │ pid │ uptime │ ↺ │ status │ cpu │ mem │ user │ watching │
├────┼─────────────┼─────────────┼─────────┼─────────┼──────────┼────────┼──────┼───────────┼──────────┼──────────┼──────────┼──────────┤
│ 3 │ panel │ default │ N/A │ fork │ 158 │ 22D │ 0 │ online │ 1.4% │ 124.8mb │ root │ disabled │
│ 2 │ public │ default │ N/A │ fork │ 127 │ 22D │ 0 │ online │ 1.2% │ 92.5mb │ root │ disabled │
│ 1 │ schedule │ default │ N/A │ fork │ 126 │ 22D │ 0 │ online │ 0.8% │ 87.9mb │ root │ disabled │
│ 0 │ update │ default │ N/A │ fork │ 3098302 │ 4s │ 1 │ online │ 0% │ 90.6mb │ root │ disabled │
└────┴─────────────┴─────────────┴─────────┴─────────┴──────────┴────────┴──────┴───────────┴──────────┴──────────┴──────────┴──────────┘
[PM2] Applying action reloadProcessId on app [schedule](ids: [ 1 ])
[PM2] Applying action reloadProcessId on app [public](ids: [ 2 ])
[PM2] schedule
[PM2] Applying action reloadProcessId on app [panel](ids: [ 3 ])
[PM2] public
[PM2] panel
┌────┬─────────────┬─────────────┬─────────┬─────────┬──────────┬────────┬──────┬───────────┬──────────┬──────────┬──────────┬──────────┐
│ id │ name │ namespace │ version │ mode │ pid │ uptime │ ↺ │ status │ cpu │ mem │ user │ watching │
├────┼─────────────┼─────────────┼─────────┼─────────┼──────────┼────────┼──────┼───────────┼──────────┼──────────┼──────────┼──────────┤
│ 3 │ panel │ default │ N/A │ fork │ 3098386 │ 8s │ 1 │ online │ 0% │ 109.3mb │ root │ disabled │
│ 2 │ public │ default │ N/A │ fork │ 3098354 │ 13s │ 1 │ online │ 0% │ 96.6mb │ root │ disabled │
│ 1 │ schedule │ default │ N/A │ fork │ 3098353 │ 13s │ 1 │ online │ 12.8% │ 91.9mb │ root │ disabled │
│ 0 │ update │ default │ N/A │ fork │ 3098302 │ 20s │ 1 │ online │ 0.3% │ 92.0mb │ root │ disabled │
└────┴─────────────┴─────────────┴─────────┴─────────┴──────────┴────────┴──────┴───────────┴──────────┴──────────┴──────────┴──────────┘

=====> 检测结束

执行结束... 2024-05-13 09:14:12 耗时 195 秒

设置-系统日志也是一切正常

System Info

No response

Any additional comments?

No response

@whyour
Copy link
Owner

whyour commented May 15, 2024

报错来源是哪里

@hejun041
Copy link
Author

脚本内,所有脚本开头都是这个错,其他功能正常
容器一般是正常情况都不会重启,大概一两个月就会复现一次
有些时候执行ql check依然问题存在,这次是ql check之后就正常了
我容器内也只有两个正常的脚本,没有其他定时任务
重新docker-compose pull stop 再重新启动才行,或者从新进bash 里面重新安装一下pnpm i
pnpm日志有些时候看到是node_sqlite3这个安装失败

@whyour
Copy link
Owner

whyour commented May 26, 2024

手动运行任务会有这个提示吗,看样子像是自动执行任务的时候,更新任务状态报错了

@hejun041
Copy link
Author

手动运行好像也是一样的

@hejun041
Copy link
Author

hejun041 commented Jun 3, 2024

今天凌晨又复现了
这是脚本内部日志

开始执行... 2024-06-02 23:58:40

jq: error (at :1): Cannot iterate over null (null)
jq: error (at :1): Cannot iterate over null (null)
jq: error (at :1): Cannot iterate over null (null)
jq: error (at :1): Cannot iterate over null (null)
jq: error (at :1): Cannot iterate over null (null)

优先固定账号数量不得大于或等于有效账号总量,本次暂不重组 Cookie ...

变量PHONE_NUM共配置0条CK,请添加环境变量,或查看环境变量状态
未填写环境变量 PHONE_NUM 请添加

钉钉机器人 服务启动
PUSHPLUS 服务启动
PUSHPLUS 推送失败!
钉钉机器人 推送成功!

执行结束... 耗时 1 秒  

早上重新执行又成功了

@whyour
Copy link
Owner

whyour commented Jun 3, 2024

这个貌似是你自己脚本里用了 jq,打印开始执行前,内置的jq已经执行完了

@hejun041
Copy link
Author

hejun041 commented Jun 4, 2024

我看task_before.sh里面好像是有jq相关的执行,应该怎么处理呢

@whyour
Copy link
Owner

whyour commented Jun 13, 2024

你的代码,你想怎么处理都行

@whyour whyour closed this as completed Jun 13, 2024
@hejun041
Copy link
Author

感谢大佬的回复!

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