Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

[systemd] Refusing to accept PID outside of service control group, acquired through unsafe symlink chain #5258

Open
czd890 opened this issue Oct 22, 2024 · 3 comments

Comments

@czd890
Copy link
Contributor

czd890 commented Oct 22, 2024

在高版本上用systemd启动时, 会收到 Refusing to accept PID outside of service control group, acquired through unsafe symlink chain 错误, 因为systemd不允许启动的服务在cgroup之外. 启动脚本是不是可以优化一下?

[Unit]
Description=apollo config service
After=network.target

[Service]
Type=forking
Restart=on-failure
PIDFile=/apollo/configservice/apollo-configservice/apollo-configservice.pid
# RemainAfterExit=true
ExecStart=/apollo/configservice/scripts/startup.sh
ExecStop= /apollo/configservice/scripts/shutdown.sh
[Install]
WantedBy=multi-user.target

@czd890
Copy link
Contributor Author

czd890 commented Oct 22, 2024

@nobodyiam 把$APOLLO_RUN_MODE 变量的判断改成前台/后台如何. 现在的docker值就是前台模式?

@nobodyiam
Copy link
Member

docker 运行是前台模式的,是什么版本运行报错?

@czd890
Copy link
Contributor Author

czd890 commented Oct 29, 2024

os 是 Amazon Linux 2023
内核是 6.1.112-122.189.amzn2023.x86_64

# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

No branches or pull requests

2 participants