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

systemd init script fails on boot on CentOS 7 #145

Open
leonsodhi opened this issue May 10, 2016 · 3 comments
Open

systemd init script fails on boot on CentOS 7 #145

leonsodhi opened this issue May 10, 2016 · 3 comments

Comments

@leonsodhi
Copy link

[root@NAME]# systemctl status remote_syslog 
remote_syslog.service - remote_syslog2 
Loaded: loaded (/etc/systemd/system/remote_syslog.service; enabled; vendor preset: disabled) 
Active: failed (Result: start-limit) since Mon 2016-05-09 14:15:19 UTC; 5min ago 
Docs: https://github.com/papertrail/remote_syslog2 
Process: 1118 ExecStart=/usr/local/bin/remote_syslog -D (code=exited, status=1/FAILURE) 
Process: 1115 ExecStartPre=/usr/bin/test -e /etc/log_files.yml (code=exited, status=0/SUCCESS) 
Main PID: 1118 (code=exited, status=1/FAILURE) 

May 09 14:15:19 NAME systemd[1]: Unit remote_syslog.service entered failed state. 
May 09 14:15:19 NAME systemd[1]: remote_syslog.service failed. 
May 09 14:15:19 NAME systemd[1]: remote_syslog.service holdoff time over, scheduling restart. 
May 09 14:15:19 NAME systemd[1]: start request repeated too quickly for remote_syslog.service 
May 09 14:15:19 NAME systemd[1]: Failed to start remote_syslog2. 
May 09 14:15:19 NAME systemd[1]: Unit remote_syslog.service entered failed state. 
May 09 14:15:19 NAME systemd[1]: remote_syslog.service failed. 

Works fine if started after the system is up and running.

@johlym
Copy link
Contributor

johlym commented May 27, 2016

Has rsyslog.service started at this point?

@ivanovv
Copy link

ivanovv commented May 14, 2020

For me the problem was in these two lines:

[Service]
ExecStartPre=/usr/bin/test -e /etc/log_files.yml
ExecStart=/usr/local/bin/remote_syslog -D
Restart=always
User=root  <---- 1
Group=root <---- 2

Looks like you can use root as user name and group name at the same time.

The error was

 remote_syslog2.service: Failed at step USER spawning /usr/bin/test: No such process

@johlym
Copy link
Contributor

johlym commented May 15, 2020

Good catch @ivanovv. Unfortunately, I don't maintain this since I don't work at Papertrail anymore, but still super helpful.

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

3 participants