LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 07-15-2019, 06:29 PM   #1
babydr
Member
 
Registered: Aug 2015
Location: Fairbanks , Alaska
Distribution: Slackware-14.2 & 15.0
Posts: 234

Rep: Reputation: 45
root cron "unable to create mail file"


Hello All , I have serached to no avail , for any help on this problem .
The problem is VERY evident from the below entries ... Tia , JimL

ps: slackware 14.2 , Last updated 2019-Jul-14
pps: Prior to this on 14-Apr-2019 , I had been receiving cron process emails , See more below (*) .


crontab -l
...snip
#
# Testing the email of output from here ...
*/5 * * * * /bin/echo " Testing the email of output from here ..."
...snip


tail -10 /var/log/cron
...snip
Jul 15 15:25:01 ns4 crond[6386]: FILE /var/spool/cron/crontabs/root USER root PID 25844 /bin/echo " Testing the email of output from here ..."
Jul 15 15:25:01 ns4 crond[25844]: unable to create mail file /var/spool/cron/cron.ZpnPN4/cron.root.6386: cron output for user root /bin/echo " Testing the email of output from here ..." to /dev/null


(*)
Between the last & now non-email capable cron , I compiled & Installed the below , All other items had been installed for some many weeks prior to the last cron processed email .

4 drwxr-xr-x 7 jiml users 4096 Jun 2 17:53 libmnl-1.0.4/
4 drwxr-xr-x 8 jiml users 4096 Jun 2 17:59 libnftnl-1.1.3/
4 drwxr-xr-x 12 jiml users 4096 Jun 2 18:02 iptables-1.8.3/

Between the last & now non-email capable cron , I Installed these updates ...

32 -rw-r--r-- 1 root root 30087 Apr 7 04:00 ghostscript-9.26-x86_64-1_slack14.2
32 -rw-r--r-- 1 root root 31715 Apr 7 04:00 httpd-2.4.39-x86_64-1_slack14.2
4 -rw-r--r-- 1 root root 2010 Apr 7 04:00 openjpeg-2.3.1-x86_64-1_slack14.2
8 -rw-r--r-- 1 root root 4710 Apr 7 04:00 wget-1.20.3-x86_64-1_slack14.2

These were the ones that when cron ran I did not get in email ...
4 -rw-r--r-- 1 root root 1460 Apr 21 04:00 libpng-1.6.37-x86_64-1_slack14.2
8 -rw-r--r-- 1 root root 8185 Apr 21 04:00 libssh2-1.8.2-x86_64-1_slack14.2

Last edited by babydr; 07-15-2019 at 08:22 PM. Reason: More slackware updates just after the beginning of failure .
 
Old 07-16-2019, 08:31 AM   #2
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,831
Blog Entries: 15

Rep: Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669
Does the parent directory, /var/spool/cron/cron.ZpnPN4, exist before you do the cron run?

It is telling you it can't create the file cron.root.6386. Since it is running as root permissions generally wouldn't be an issue (unless you're using ACLs or SELINUX) so it is more likely it can't find the parent directory.

P.S. While you CAN run a command line separated by semi-colons within cron it is usually better to put the commands in a script and run the script from cron.

Last edited by MensaWater; 07-16-2019 at 03:23 PM.
 
Old 07-16-2019, 01:23 PM   #3
Labinnah
Member
 
Registered: May 2014
Location: Łódź, Poland
Distribution: Slackware-current
Posts: 185

Rep: Reputation: 112Reputation: 112
There can be some errors in partition or disk. Check logs for filesystem or disk errors. For sure you can run fsck.
 
Old 07-16-2019, 02:40 PM   #4
babydr
Member
 
Registered: Aug 2015
Location: Fairbanks , Alaska
Distribution: Slackware-14.2 & 15.0
Posts: 234

Original Poster
Rep: Reputation: 45
Hello All , Please NOTE: This system was able to send emails of cron runs and stopped after Apr-14-2019 , I am not aware of any changes I have made that should/would/could stop such functionality .

@MensaWater , As far as I can tell that directory does not exist at anytime after restart , But the drcon manpage says it will automatically create a unique path at run time . That echo doesn't last very long . I beleive I have tried recreating the mentioned path , but I atm have no memory of the findings , so will try recreating it again . But at start up rc.M will just re-delete it again . Check slackware-14.2 /etc/rc.d/rc.M you'll see the rm -rf ...
The system is not running SElinux or setup for ACL's atm .
Fyi , I have NO commands in my crontab that use semi-colons , Which is something I've never tried , well maybe ince 15 years or so ago .

@Labinnah , A possible problem I had not thought of , But the system is a (semi-)virtual system that I am renting & I'd forogt to mention that fact too .

Thank you both for the idea's , Please do keep the ideas coming , as soon someone will ping back with a thought that has not come across my mind in the last 5 days , I should have started working on this difficuty back in Apr-2019 , But things as usual got inbetween .

Tia , JimL
 
Old 07-16-2019, 03:50 PM   #5
Labinnah
Member
 
Registered: May 2014
Location: Łódź, Poland
Distribution: Slackware-current
Posts: 185

Rep: Reputation: 112Reputation: 112
Quote:
Originally Posted by babydr View Post
A possible problem I had not thought of , But the system is a (semi-)virtual system that I am renting & I'd forogt to mention that fact too .
This not exclude filesystem problem. If you cannot check that, ask owner.

Quote:
Originally Posted by babydr View Post
Please do keep the ideas coming
If you want all ideas I have three more, but they are highly unlikely.
- Restart crond, process local filesystem copy may look different than for rest of system.
- Cron directory can have "immutable" flag set, see "lsattr" command.
- I assume you check free space on device, but did you check free inodes ("df -i")?
 
Old 07-16-2019, 07:36 PM   #6
babydr
Member
 
Registered: Aug 2015
Location: Fairbanks , Alaska
Distribution: Slackware-14.2 & 15.0
Posts: 234

Original Poster
Rep: Reputation: 45
Hello All ,
recreating the path /var/spool/cron/cron.ZpnPN4 , Has cleared the problem .

I am now going to do a reboot & see if crond(dcron) will indeed create another unique data path for root (& my users) cron scripts .

Thank you , Both Labinnah & MensaWater for your Questions & Hints .

I may be back ...

Status of thread is Solved & report success after reboot .

reboot and dcron created another path for root .
But now I have iptables not reloading the saved tables . Off to it again .

Thank you .

Last edited by babydr; 07-16-2019 at 07:44 PM. Reason: Status of thread is Solved & report success after reboot .
 
1 members found this post helpful.
Old 07-16-2019, 09:25 PM   #7
Gerard Lally
Senior Member
 
Registered: Sep 2009
Location: Leinster, IE
Distribution: Slackware, NetBSD
Posts: 2,205

Rep: Reputation: 1781Reputation: 1781Reputation: 1781Reputation: 1781Reputation: 1781Reputation: 1781Reputation: 1781Reputation: 1781Reputation: 1781Reputation: 1781Reputation: 1781
Quote:
Originally Posted by babydr View Post
But now I have iptables not reloading the saved tables . Off to it again .
Not sure how you updated iptables - was it an official Slackware update or was it from source?

Is the network interface up before iptables is loaded? Do you have any virtual (tun/tap) interfaces -- for a VPN, perhaps? they would need to be brought up before iptables.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
cron.hourly cron.weekly cron.monthly and 0anacron. Are they necessary? glore2002 Debian 2 09-30-2009 08:57 PM
Help With Java Problem Please"""""""""""" suemcholan Linux - Newbie 1 04-02-2008 06:02 PM
adding a perl script to cron.daily / cron.d to setup a cron job CrontabNewBIE Linux - Software 6 01-14-2008 08:16 AM
cron not working from crontab nor form /etc/cron/cron.d. What did SuSE change? JZL240I-U SUSE / openSUSE 11 01-04-2007 01:57 AM
Can any one plz explain why/what for cron.d, cron.daily, cron.weekly etc are there. mavinashbabu Linux - Newbie 4 09-21-2006 01:50 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 02:30 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration