steedos-platform
steedos-platform copied to clipboard
多服务连同一redis报错:TypeError: Cannot read property 'admin_menus' of undefined
v2.2.54
在本地部署时从没有出现过该问题,部署到远程集群时,不管是采用docker部署还是直接运行yarn start方式(后台运行),断开ssh远程连接后(不一定直接相关,肯定有什么机制触发了getAssignedMenus流程),可以出现登录界面,但登录以后为空白页面,查看运行日志,显示下列异常:
(node:262329) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'admin_menus' of undefined
at /root/foa/node_modules/@steedos/objectql/src/types/app.ts:243:47
at step (/root/foa/node_modules/tslib/tslib.js:144:27)
at Object.next (/root/foa/node_modules/tslib/tslib.js:125:57)
at fulfilled (/root/foa/node_modules/tslib/tslib.js:115:62)
at /root/foa/node_modules/meteor-promise/fiber_pool.js:43:39
(node:262329) UnhandledPromiseRejectionWarning: Unhandled promise rejection. 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(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 4)
我这边的APP没有使用任何admin_menus相关的东西。
docker部署时采用docker compose up -d
后台运行。
直接部署,采用nohup yarn start &
后台运行。
使用提供的模版https://github.com/steedos/docker/blob/main/steedos-community/docker-compose.yml,部署到远程机器(唯一做了ip地址修改),同样产生上述异常。
本地测试 多服务连同一redis或者手动清理redis后刷新页面会打印此信息
本地测试 多服务连同一redis或者手动清理redis后刷新页面会打印此信息
直接原因就是redis不正常工作。我这里的问题是,redis-server的config目录被修改,导致redis无法正常工作。
正常工作时,

一段时间之后,config目录被修改,出现异常

随后,访问页面,导致steedos后台异常:
redis-server config目录被修改的原因不明,换环境之后,到目前为止正常。
感谢各位大神!
调试过程中,发现了另外一个问题:https://github.com/steedos/steedos-platform/issues/3737
我刚刚用阿里云试了试,还有这个问题,大佬解决了吗?
这个问题安排到2.6版本解决.