The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

cron orphan?

Discussion in 'General Discussion' started by Sheldon, Jul 22, 2004.

  1. Sheldon

    Sheldon Well-Known Member

    Joined:
    Jun 7, 2004
    Messages:
    378
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Canada
    --------------------- Cron Begin ------------------------

    **Unmatched Entries**
    ORPHAN (no passwd entry)
    ORPHAN (no passwd entry)
    ORPHAN (no passwd entry)
    ORPHAN (no passwd entry)
    ORPHAN (no passwd entry)
    ORPHAN (no passwd entry)
    ORPHAN (no passwd entry)



    I added a cron through crontab -e via command line the other day.. How do I fix this? What did I do wrong?
     
  2. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    Location:
    Go on, have a guess
    Sounds like there may be a crontab in /var/spool/cron/ for a user account that no longer exists.
     
  3. Sheldon

    Sheldon Well-Known Member

    Joined:
    Jun 7, 2004
    Messages:
    378
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Canada
    root@ferrari [/var/spool/cron]# ls
    ./ ../ kale mailman root tmp.5216

    the only cron's that I know exist are kale/root mailman im sure has a cron somewhere

    tmp.5216 is a empty file.

    can I delete that file?

    Sheldon
     
  4. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    Location:
    Go on, have a guess
    Yes. That's what's probably causing the error.
     
  5. Sheldon

    Sheldon Well-Known Member

    Joined:
    Jun 7, 2004
    Messages:
    378
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Canada
    chirpy that fixed it for awhile, but ive got it again even worse than before!



    --------------------- Cron Begin ------------------------

    **Unmatched Entries**
    ORPHAN (no passwd entry)
    ORPHAN (no passwd entry)
    ORPHAN (no passwd entry)
    ORPHAN (no passwd entry)
    ORPHAN (no passwd entry)
    ORPHAN (no passwd entry)
    ORPHAN (no passwd entry)
    ORPHAN (no passwd entry)
    ORPHAN (no passwd entry)
    ORPHAN (no passwd entry)
    ORPHAN (no passwd entry)
    ORPHAN (no passwd entry)
    ORPHAN (no passwd entry)
    ORPHAN (no passwd entry)
    ORPHAN (no passwd entry)
    ORPHAN (no passwd entry)
    ORPHAN (no passwd entry)
    ORPHAN (no passwd entry)
    ORPHAN (no passwd entry)

    ---------------------- Cron End -------------------------



    Any ideas?
     
  6. GeekPatrolMille

    GeekPatrolMille Well-Known Member

    Joined:
    Mar 12, 2004
    Messages:
    84
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    McKinney, Texas, USA
    I am having exactly the same problem. I did rm all the tmp* files which left three files called "root", "mailman", and "username". The only odd thing is the "username" file has no cron instructions other than MAILTO="username". I am temporarily moving this file out of the /var/spool/cron/ folder to see what happens.

    Just to be clear, the use of "username" above is to obscure an actual user name. :cool:

    Any other input is appreciated...
     
  7. nickb

    nickb Well-Known Member

    Joined:
    Feb 25, 2005
    Messages:
    347
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    India
    /var/spool/cron/ should have crons for valid users only..i.e only those crons are valid that are created for users with valid entry in /etc/passwd/ try removing invalid cron entries and restart cron daemon.
     
  8. GeekPatrolMille

    GeekPatrolMille Well-Known Member

    Joined:
    Mar 12, 2004
    Messages:
    84
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    McKinney, Texas, USA
    No luck... Here is a snipit from /var/log/crond between the times 3:50AM and 5:10AM... It shows an interesting repeating pattern but I am having trouble figuring out why it is repeating. I think this is tied to the Orphan issue in some way because they both began at the same time. Sorry for the long log clipping...

    The pattern of most interest below repeats roughly every 60 seconds...
    Aug 6 04:53:00 ls05 CROND[19379]: (root) CMD (/scripts/upcp)
    Aug 6 04:53:01 ls05 crontab[19460]: (root) LIST (root)
    Aug 6 04:53:01 ls05 crontab[19462]: (root) LIST (root)
    Aug 6 04:53:01 ls05 crontab[19463]: (root) LIST (root)
    Aug 6 04:53:01 ls05 crontab[19464]: (root) REPLACE (root)
    Aug 6 04:53:59 ls05 crond[23643]: (root) RELOAD (cron/root)

    Here is my /var/spool/cron/root contents...
    */15 * * * * /usr/local/cpanel/whostmgr/bin/dnsqueue > /dev/null 2>&1
    */5 * * * * /home/mybackup/backperms
    0 1 * * * /scripts/cpbackup
    2,58 * * * * /usr/local/bandmin/bandmin
    0 0 * * * /usr/local/bandmin/ipaddrmap
    0 6 * * * /scripts/exim_tidydb > /dev/null 2>&1
    * 4 * * * /scripts/upcp
    */5 * * * * /usr/local/cpanel/bin/dcpumon >/dev/null 2>&1


    Thank you for your help...
    -greg


    =========Log Begins Here============
    Aug 6 03:50:00 ls05 CROND[26930]: (root) CMD (/usr/bin/mrtg /etc/mrtg/mrtg.cfg)
    Aug 6 03:50:00 ls05 CROND[26932]: (root) CMD (/usr/local/cpanel/bin/dcpumon >/dev/null 2>&1)
    Aug 6 03:50:00 ls05 CROND[26935]: (root) CMD (/home/mybackup/backperms)
    Aug 6 03:55:00 ls05 CROND[27017]: (root) CMD (/usr/bin/mrtg /etc/mrtg/mrtg.cfg)
    Aug 6 03:55:00 ls05 CROND[27019]: (root) CMD (/usr/local/cpanel/bin/dcpumon >/dev/null 2>&1)
    Aug 6 03:55:00 ls05 CROND[27022]: (root) CMD (/home/mybackup/backperms)
    Aug 6 03:58:00 ls05 CROND[27066]: (root) CMD (/usr/local/bandmin/bandmin)
    Aug 6 04:00:00 ls05 CROND[27103]: (root) CMD (/usr/bin/mrtg /etc/mrtg/mrtg.cfg)
    Aug 6 04:00:00 ls05 CROND[27107]: (root) CMD (/scripts/upcp)
    Aug 6 04:00:00 ls05 CROND[27105]: (root) CMD (/usr/local/cpanel/bin/dcpumon >/dev/null 2>&1)
    Aug 6 04:00:00 ls05 CROND[27114]: (root) CMD (/home/mybackup/backperms)
    Aug 6 04:00:00 ls05 CROND[27117]: (root) CMD (/usr/local/cpanel/whostmgr/bin/dnsqueue > /dev/null 2>&1)
    Aug 6 04:00:08 ls05 crontab[27210]: (root) LIST (root)
    Aug 6 04:00:08 ls05 crontab[27212]: (root) LIST (root)
    Aug 6 04:00:08 ls05 crontab[27213]: (root) LIST (root)
    Aug 6 04:00:08 ls05 crontab[27214]: (root) REPLACE (root)
    Aug 6 04:00:59 ls05 crond[23643]: (root) RELOAD (cron/root)
    Aug 6 04:00:59 ls05 CROND[27530]: (root) CMD (run-parts /etc/cron.hourly)
    Aug 6 04:00:59 ls05 CROND[27532]: (root) CMD (/scripts/upcp)
    Aug 6 04:01:03 ls05 crontab[27623]: (root) LIST (root)
    Aug 6 04:01:03 ls05 crontab[27625]: (root) LIST (root)
    Aug 6 04:01:03 ls05 crontab[27626]: (root) LIST (root)
    Aug 6 04:01:03 ls05 crontab[27627]: (root) REPLACE (root)
    Aug 6 04:02:01 ls05 crond[23643]: (root) RELOAD (cron/root)
    Aug 6 04:02:01 ls05 CROND[27933]: (root) CMD (/usr/local/bandmin/bandmin)
    Aug 6 04:02:01 ls05 CROND[27931]: (root) CMD (/scripts/upcp)
    Aug 6 04:02:01 ls05 CROND[27929]: (root) CMD (run-parts /etc/cron.daily)
    Aug 6 04:02:10 ls05 crontab[28038]: (root) LIST (root)
    Aug 6 04:02:10 ls05 crontab[28042]: (root) LIST (root)
    Aug 6 04:02:10 ls05 crontab[28054]: (root) LIST (root)
    Aug 6 04:02:11 ls05 crontab[28055]: (root) REPLACE (root)
    Aug 6 04:03:00 ls05 crond[23643]: (root) RELOAD (cron/root)
    Aug 6 04:03:00 ls05 CROND[28468]: (root) CMD (/scripts/upcp)
    Aug 6 04:03:03 ls05 crontab[28551]: (root) LIST (root)
    Aug 6 04:03:03 ls05 crontab[28553]: (root) LIST (root)
    Aug 6 04:03:03 ls05 crontab[28555]: (root) LIST (root)
    Aug 6 04:03:03 ls05 crontab[28556]: (root) REPLACE (root)
    Aug 6 04:03:13 ls05 anacron[28963]: Updated timestamp for job `cron.daily' to 2005-08-06
    Aug 6 04:04:00 ls05 crond[23643]: (root) RELOAD (cron/root)
    Aug 6 04:04:00 ls05 CROND[30098]: (root) CMD (/scripts/upcp)
    Aug 6 04:04:01 ls05 crontab[30180]: (root) LIST (root)
    Aug 6 04:04:01 ls05 crontab[30182]: (root) LIST (root)
    Aug 6 04:04:01 ls05 crontab[30183]: (root) LIST (root)
    Aug 6 04:04:01 ls05 crontab[30184]: (root) REPLACE (root)
    Aug 6 04:05:00 ls05 crond[23643]: (root) RELOAD (cron/root)
    Aug 6 04:05:00 ls05 CROND[30790]: (root) CMD (/scripts/upcp)
    Aug 6 04:05:00 ls05 CROND[30788]: (root) CMD (/usr/local/cpanel/bin/dcpumon >/dev/null 2>&1)
    Aug 6 04:05:00 ls05 CROND[30793]: (root) CMD (/home/mybackup/backperms)
    Aug 6 04:05:00 ls05 CROND[30786]: (root) CMD (/usr/bin/mrtg /etc/mrtg/mrtg.cfg)
    Aug 6 04:05:02 ls05 crontab[30914]: (root) LIST (root)
    Aug 6 04:05:02 ls05 crontab[30916]: (root) LIST (root)
    Aug 6 04:05:02 ls05 crontab[30917]: (root) LIST (root)
    Aug 6 04:05:02 ls05 crontab[30918]: (root) REPLACE (root)
    ================================================
    SNIP - REMOVED TO SHORTEN OVERALL LENGTH OF POST - SNIP
    ================================================
    Aug 6 04:55:01 ls05 crond[23643]: (root) RELOAD (cron/root)
    Aug 6 04:55:01 ls05 CROND[20152]: (root) CMD (/usr/local/cpanel/bin/dcpumon >/dev/null 2>&1)
    Aug 6 04:55:01 ls05 CROND[20155]: (root) CMD (/scripts/upcp)
    Aug 6 04:55:01 ls05 CROND[20150]: (root) CMD (/usr/bin/mrtg /etc/mrtg/mrtg.cfg)
    Aug 6 04:55:01 ls05 CROND[20157]: (root) CMD (/home/mybackup/backperms)
    Aug 6 04:55:03 ls05 crontab[20254]: (root) LIST (root)
    Aug 6 04:55:03 ls05 crontab[20256]: (root) LIST (root)
    Aug 6 04:55:03 ls05 crontab[20257]: (root) LIST (root)
    Aug 6 04:55:03 ls05 crontab[20258]: (root) REPLACE (root)
    Aug 6 04:56:01 ls05 crond[23643]: (root) RELOAD (cron/root)
    Aug 6 04:56:01 ls05 CROND[20563]: (root) CMD (/scripts/upcp)
    Aug 6 04:56:02 ls05 crontab[20644]: (root) LIST (root)
    Aug 6 04:56:02 ls05 crontab[20646]: (root) LIST (root)
    Aug 6 04:56:02 ls05 crontab[20647]: (root) LIST (root)
    Aug 6 04:56:02 ls05 crontab[20648]: (root) REPLACE (root)
    Aug 6 04:56:59 ls05 crond[23643]: (root) RELOAD (cron/root)
    Aug 6 04:56:59 ls05 CROND[20969]: (root) CMD (/scripts/upcp)
    Aug 6 04:57:01 ls05 crontab[21050]: (root) LIST (root)
    Aug 6 04:57:01 ls05 crontab[21052]: (root) LIST (root)
    Aug 6 04:57:01 ls05 crontab[21053]: (root) LIST (root)
    Aug 6 04:57:01 ls05 crontab[21054]: (root) REPLACE (root)
    Aug 6 04:58:01 ls05 crond[23643]: (root) RELOAD (cron/root)
    Aug 6 04:58:01 ls05 CROND[21352]: (root) CMD (/usr/local/bandmin/bandmin)
    Aug 6 04:58:01 ls05 CROND[21350]: (root) CMD (/scripts/upcp)
    Aug 6 04:58:02 ls05 crontab[21436]: (root) LIST (root)
    Aug 6 04:58:02 ls05 crontab[21438]: (root) LIST (root)
    Aug 6 04:58:02 ls05 crontab[21439]: (root) LIST (root)
    Aug 6 04:58:02 ls05 crontab[21440]: (root) REPLACE (root)
    Aug 6 04:59:00 ls05 crond[23643]: (root) RELOAD (cron/root)
    Aug 6 04:59:00 ls05 CROND[21737]: (root) CMD (/scripts/upcp)
    Aug 6 04:59:01 ls05 crontab[21818]: (root) LIST (root)
    Aug 6 04:59:01 ls05 crontab[21820]: (root) LIST (root)
    Aug 6 04:59:01 ls05 crontab[21821]: (root) LIST (root)
    Aug 6 04:59:01 ls05 crontab[21822]: (root) REPLACE (root)
    Aug 6 05:00:00 ls05 crond[23643]: (root) RELOAD (cron/root)
    Aug 6 05:00:00 ls05 CROND[22127]: (root) CMD (/home/mybackup/backperms)
    Aug 6 05:00:00 ls05 CROND[22134]: (root) CMD (/usr/local/cpanel/whostmgr/bin/dnsqueue > /dev/null 2>&1)
    Aug 6 05:00:00 ls05 CROND[22125]: (root) CMD (/usr/local/cpanel/bin/dcpumon >/dev/null 2>&1)
    Aug 6 05:00:00 ls05 CROND[22123]: (root) CMD (/usr/bin/mrtg /etc/mrtg/mrtg.cfg)
    Aug 6 05:01:00 ls05 CROND[22153]: (root) CMD (run-parts /etc/cron.hourly)
    Aug 6 05:02:00 ls05 CROND[22166]: (root) CMD (/usr/local/bandmin/bandmin)
    Aug 6 05:05:00 ls05 CROND[22191]: (root) CMD (/usr/bin/mrtg /etc/mrtg/mrtg.cfg)
    Aug 6 05:05:00 ls05 CROND[22193]: (root) CMD (/usr/local/cpanel/bin/dcpumon >/dev/null 2>&1)
    Aug 6 05:05:00 ls05 CROND[22195]: (root) CMD (/home/mybackup/backperms)
    Aug 6 05:10:00 ls05 CROND[22268]: (root) CMD (/usr/bin/mrtg /etc/mrtg/mrtg.cfg)
    Aug 6 05:10:00 ls05 CROND[22270]: (root) CMD (/usr/local/cpanel/bin/dcpumon >/dev/null 2>&1)
    Aug 6 05:10:00 ls05 CROND[22273]: (root) CMD (/home/mybackup/backperms)
     
  9. GeekPatrolMille

    GeekPatrolMille Well-Known Member

    Joined:
    Mar 12, 2004
    Messages:
    84
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    McKinney, Texas, USA
    I may have answered my own question... I noticed the cron entry for upcp was...

    * 4 * * * /scripts/upcp :eek:

    which at first glance looked fine but since the upcp script is reloading crontab at some point in its process, I guess crond is going to run /scripts/upcp because no specific minute was specified, only the hour.

    I will report back tomorrow if this fixes anything. :rolleyes:
     
  10. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    Location:
    Go on, have a guess
    That line will run upcp every minute between 04:00 and 04:59. Running at 04:00 is not good either. I'd suggest you change it to:

    5 0 * * * /scripts/upcp

    Which will run it at 00:05 and just the once :)
     
  11. GeekPatrolMille

    GeekPatrolMille Well-Known Member

    Joined:
    Mar 12, 2004
    Messages:
    84
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    McKinney, Texas, USA
    This worked... Thanks chirpy...
     
Loading...

Share This Page