apollo icon indicating copy to clipboard operation
apollo copied to clipboard

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

Open czd890 opened this issue 1 year ago • 3 comments

在高版本上用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 avatar Oct 22 '24 07:10 czd890

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

czd890 avatar Oct 22 '24 07:10 czd890

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

nobodyiam avatar Oct 26 '24 11:10 nobodyiam

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

czd890 avatar Oct 29 '24 09:10 czd890