Cron error
Closed, ResolvedPublic


Hi Guys

Reviewing my syslog server, I've noticed that all of my VyOS machines are adding entries stating a cron task errored due to child exiting with status 1.

Looking at this snippet, we can see the CMD being run and the resulting error that gets added to syslog.

2016-12-17 23:17:01.000	vy-gw-a CRON[4589]: pam_unix(cron:session): session opened for user root by (uid=0)
2016-12-17 23:17:01.000	vy-gw-a /USR/SBIN/CRON[4591]: (root) CMD ( cd / && run-parts --report /etc/cron.hourly)
2016-12-17 23:17:01.000	vy-gw-a /USR/SBIN/CRON[4589]: (CRON) error (grandchild #4591 failed with exit status 1)
2016-12-17 23:17:01.000	vy-gw-a /USR/SBIN/CRON[4589]: (CRON) info (No MTA installed, discarding output)
2016-12-17 23:17:01.000	vy-gw-a CRON[4589]: pam_unix(cron:session): session closed for user root

If I run the command manually, I get the following error.

root@vy-gw-a:/# run-parts --report /etc/cron.hourly
error: stat of /var/log/vyatta/ipsec.log failed: No such file or directory
run-parts: /etc/cron.hourly/vyatta-logrotate-hourly exited with return code 1

I can confirm I do not have ipsec configured on any of my VyOS machines. I'm not 100% sure how you guys generate log files on install but it might be worth touching /var/log/vyatta/ipsec.log so it doesnt error :)

(I fixed my problem by touching the file...)

I dont see anything operationally wrong with my machines, other than it generating more lines than necessary in my syslog :)


root@vy-gw-a:/var/log/vyatta# show version
Version:      VyOS 1.1.7
Description:  VyOS 1.1.7 (helium)
Copyright:    2016 VyOS maintainers and contributors
Built by:
Built on:     Wed Feb 17 09:57:31 UTC 2016
Build ID:     1602170957-4459750
System type:  x86 64-bit
Boot via:     image
Hypervisor:   KVM
HW model:     Standard PC (i440FX + PIIX, 1996)
HW S/N:       Not Specified
HW UUID:      0DF8732C-4E3D-054D-A62C-F3268415D6A0
Uptime:       00:27:19 up 9 days, 19:40,  1 user,  load average: 0.00, 0.01, 0.05


Difficulty level
Easy (less than an hour)
syncer reassigned this task from syncer to EwaldvanGeffen.Dec 18 2016, 12:28 AM
syncer triaged this task as Low priority.
syncer added a project: VyOS 1.1.x (1.1.8).

Thanks for reporting!
@dmbaturin @EwaldvanGeffen @UnicronNL
Easy one?

Can you provide the output of /etc/logrotate.conf via a pastebin

Merijn added a subscriber: Merijn.Jan 10 2017, 9:20 PM

I checked a couple of routers and every router without IPSec configured has this error, but every router with IPSec configured had this file so no errors.

I guess instead of creating the file, I could have edited the ipsec logrotate to add: