rtail icon indicating copy to clipboard operation
rtail copied to clipboard

Not receiving logs from systemd service

Open thelinuxlich opened this issue 10 years ago • 6 comments

echo on the terminal works, but a node.js systemd service doesn't :(

thelinuxlich avatar Aug 22 '15 00:08 thelinuxlich

@thelinuxlich did you figure what's wrong?

kilianc avatar Sep 16 '15 20:09 kilianc

I've did a hack, created a rtail service which people can use for now:

[Unit]
Description=rtail
After=service_you_want_to_log.service

[Service]
WorkingDirectory=/home/your_user
ExecStart=/usr/bin/bash -c '/usr/bin/sudo journalctl -u service_you_want_to_log -f  | rtail --host rtail_host'
Restart=always
StandardOutput=syslog
StandardError=syslog
SyslogIdentifier=rtail
User=your_user
Group=your_user

[Install]
WantedBy=multi-user.target

thelinuxlich avatar Sep 16 '15 20:09 thelinuxlich

Oh cool, but I still want to know if the issue was your particular use case or systemd or in rtail, if it's the second I want to fix it.

kilianc avatar Sep 16 '15 20:09 kilianc

I don't have enough knowledge to say it's all systemd fault

thelinuxlich avatar Sep 16 '15 20:09 thelinuxlich

what happens if you do > file.log ? what is the exact command you are trying to launch ?

kilianc avatar Sep 16 '15 20:09 kilianc

tailing the stdout or redirecting inside the service doesn't work :(

thelinuxlich avatar Sep 16 '15 20:09 thelinuxlich