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

多服务连同一redis报错:TypeError: Cannot read property 'admin_menus' of undefined #3731

Open
kemen209 opened this issue Aug 4, 2022 · 7 comments
Assignees
Milestone

Comments

@kemen209
Copy link
Contributor

kemen209 commented Aug 4, 2022

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相关的东西。

@kemen209
Copy link
Contributor Author

kemen209 commented Aug 4, 2022

docker部署时采用docker compose up -d后台运行。

直接部署,采用nohup yarn start &后台运行。

@hotlong hotlong added this to the 2.2 milestone Aug 5, 2022
@sunhaolin
Copy link
Contributor

本地测试 多服务连同一redis或者手动清理redis后刷新页面会打印此信息

@hotlong hotlong closed this as completed Aug 5, 2022
@kemen209
Copy link
Contributor Author

kemen209 commented Aug 6, 2022

本地测试 多服务连同一redis或者手动清理redis后刷新页面会打印此信息

直接原因就是redis不正常工作。我这里的问题是,redis-server的config目录被修改,导致redis无法正常工作。

正常工作时,
Screen Shot 2022-08-05 at 17 56 16

Screen Shot 2022-08-05 at 17 59 07

一段时间之后,config目录被修改,出现异常
Screen Shot 2022-08-05 at 18 09 35

Screen Shot 2022-08-05 at 18 09 52

随后,访问页面,导致steedos后台异常:
Screen Shot 2022-08-05 at 18 11 07

redis-server config目录被修改的原因不明,换环境之后,到目前为止正常。

感谢各位大神!

@kemen209
Copy link
Contributor Author

kemen209 commented Aug 6, 2022

调试过程中,发现了另外一个问题:#3737

@hotlong hotlong reopened this Aug 6, 2022
@hotlong hotlong changed the title TypeError: Cannot read property 'admin_menus' of undefined 多服务连同一redis报错:TypeError: Cannot read property 'admin_menus' of undefined Aug 6, 2022
@hotlong hotlong modified the milestones: 2.2, 2.3 Aug 8, 2022
@hotlong hotlong modified the milestones: 2.3, 2.4 Dec 19, 2022
@hotlong hotlong assigned baozhoutao and unassigned sunhaolin Apr 10, 2023
@hotlong hotlong modified the milestones: 2.4, 2.5 Apr 10, 2023
@hotlong hotlong modified the milestones: 2.5, 2.6 Aug 31, 2023
@hengyanqwe
Copy link

hengyanqwe commented Oct 20, 2023

我刚刚用阿里云试了试,还有这个问题,大佬解决了吗?

@baozhoutao
Copy link
Contributor

这个问题安排到2.6版本解决.

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

5 participants