システムフローサービス出力127エラー

システムフローサービス出力127エラー

Fluid用のsystemd設定ファイルがあります

[Unit]
Description=Fluentd
Wants=network-online.target
After=network-online.target

[Service]
User=xxx
Group=users
Type=simple
Restart=on-failure
RestartSec=5s
ExecStart=/usr/local/rvm/gems/ruby-2.7.2/bin/fluentd --config /etc/fluent/fluent.conf

[Install]
WantedBy=multi-user.target

systemctl statusの出力は次のとおりです。

xxx@test:/home/xxx # sudo systemctl status fluentd.service
● fluentd.service - Fluentd
   Loaded: loaded (/etc/systemd/system/fluentd.service; enabled; vendor preset: disabled)
   Active: activating (auto-restart) (Result: exit-code) since Wed 2023-02-08 20:51:05 UTC; 141ms ago
  Process: 5286 ExecStart=/usr/local/rvm/gems/ruby-2.7.2/bin/fluentd --config /etc/fluent/fluent.conf (code=exited, status=127)
 Main PID: 5286 (code=exited, status=127)

Feb 08 20:51:05 xenoss.io systemd[1]: Unit fluentd.service entered failed state.
Feb 08 20:51:05 xenoss.io systemd[1]: fluentd.service failed.
Warning: fluentd.service changed on disk. Run 'systemctl daemon-reload' to reload units.

しかし、これを使って実行すると:

fluentd --config /etc/fluent/fluent.conf

正常に起動できますが、systemdを使用すると失敗します。

また、流体出力は以下の通りです。

/usr/local/rvm/gems/ruby-2.7.2/bin/fluentd

出力sudo ジャーナルctl -xeu Fluentd.service:

-- The start-up result is done.
Feb 09 23:10:45 xxx systemd[1]: Starting Fluentd...
-- Subject: Unit fluentd.service has begun start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit fluentd.service has begun starting up.
Feb 09 23:10:45 xxx systemd[1]: fluentd.service: main process exited, code=exited, status=127/n/a
Feb 09 23:10:45 xxx systemd[1]: Unit fluentd.service entered failed state.
Feb 09 23:10:45 xxx systemd[1]: fluentd.service failed.

ベストアンサー1

おすすめ記事