1. Please take a little time for this simple survey! Thank you for participating!
    Dismiss Notice
  2. Dear Pleskians, please read this carefully! New attachments and other rules Thank you!
    Dismiss Notice
  3. Dear Pleskians, I really hope that you will share your opinion in this Special topic for chatter about Plesk in the Clouds. Thank you!
    Dismiss Notice

Can't modify cron, change admin pass or use watchdog

Discussion in 'Plesk 10.x for Linux Issues, Fixes, How-To' started by HelH, Jun 24, 2011.

  1. HelH

    HelH New Pleskian

    12
    60%
    Joined:
    Jun 24, 2011
    Messages:
    4
    Likes Received:
    0
    Hi,
    I have a fresh install of Plesk on a new server but I can't set up or modify any cron jobs, change the admin password or use watchdog. I need to migrate from the old server but need the cron working first but I'm at a complete loss.

    CentOS 5 64bit + Plesk Panel 10.2
    PHP 5.2.10

    If you click on the Watchdog module it gives:

    ERROR: WDCPExc
    Changing of crontab configuration failed.
    0: wdcplib.php:137
    set_cronjob_task(string '/usr/local/psa/libexec/modules/watchdog/cp/secur-check', string 'root', array)
    1: wdcplib.php:33
    set_secur_scan_cronjob(string 'weekly')
    2: configure.php:20
    require_once(string '/var/psa/admin/plib/modules/watchdog/configure.php')
    3: wdcplib.php:212
    wd__require_once(string 'configure.php')
    4: preaction.php:17
    require_once(string '/var/psa/admin/plib/modules/watchdog/preaction.php')
    5: index.php:3


    If you try to set up or modify any cron:

    ERROR: PleskFatalException
    Crontab->export() failed: plesk_tempnam() failed: tempnam failed:Incorrect temporary file name generated.

    0: CrontabPropertiesUIPointer.php:57
    CrontabPropertiesUIPointer->accessItem(string 'POST', NULL null)
    1: UIPointer.php:595
    UIPointer->access(string 'POST')
    2: plesk.php:42

    If you try to change the admin password:

    ERROR: PleskFatalException
    plesk_tempnam() failed: tempnam failed:Incorrect temporary file name generated.

    0: cmd_server.php3:55
    ch_admin_pass(string '************************', string '************')
    1: admin-password.php:54
    plesk__admin_password->accessItem(string 'POST', NULL null)
    2: UIPointer.php:595
    UIPointer->access(string 'POST')
    3: plesk.php:42
     
  2. IgorG

    IgorG Forums Analyst Staff Member

    49
    24%
    Joined:
    Oct 27, 2009
    Messages:
    24,564
    Likes Received:
    1,243
    Location:
    Novosibirsk, Russia
    Try to find reason in /usr/local/psa/admin/logs/panel.log
    Most probably that problem was caused by a misconfiguration in root crontab and watchbog couldn't overwrite it.
     
  3. HelH

    HelH New Pleskian

    12
    60%
    Joined:
    Jun 24, 2011
    Messages:
    4
    Likes Received:
    0
    Hi,
    I've managed to sort those out now, the tmp folders were in the wrong place.
    But I still have this when trying to set up a cron on a domain. The system user has "access to the server over SSH" set to /bin/bash:

    ERROR: PleskFatalException
    No secure shell available

    0: SysUser.php:1473
    SysUser->_getSecureShell()
    1: SysUser.php:1452
    SysUser->getCrontabShell()
    2: client.domain.hosting.crontab.php:32
    plesk__client__domain__hosting__crontab->_getShell()
    3: client.domain.hosting.crontab.php:26
    plesk__client__domain__hosting__crontab->getCrontab()
    4: CrontabTaskUIPointer.php:65
    CrontabTaskUIPointer->accessItem(string 'GET', NULL null)
    5: UIPointer.php:595
    UIPointer->access(string 'GET')
    6: plesk.php:42
     
  4. IgorG

    IgorG Forums Analyst Staff Member

    49
    24%
    Joined:
    Oct 27, 2009
    Messages:
    24,564
    Likes Received:
    1,243
    Location:
    Novosibirsk, Russia
  5. HelH

    HelH New Pleskian

    12
    60%
    Joined:
    Jun 24, 2011
    Messages:
    4
    Likes Received:
    0
    Hi
    I did and also followed the instruction in the manual -
    But it gave me:
    [ *** ~]# /usr/local/psa/admin/bin/server_pref -u -crontab-secure-shell"/bin/sh"
    -bash: /usr/local/psa/admin/bin/server_pref: No such file or directory
    :(
     
  6. IgorG

    IgorG Forums Analyst Staff Member

    49
    24%
    Joined:
    Oct 27, 2009
    Messages:
    24,564
    Likes Received:
    1,243
    Location:
    Novosibirsk, Russia
    You should use:

    # /usr/local/psa/bin/server_pref -u -crontab-secure-shell /bin/sh
     
  7. HelH

    HelH New Pleskian

    12
    60%
    Joined:
    Jun 24, 2011
    Messages:
    4
    Likes Received:
    0
    Thankyou Igor :) it worked (it's been driving me nuts for days)
     
  8. cmaxwell

    cmaxwell Regular Pleskian

    25
    73%
    Joined:
    Aug 1, 2001
    Messages:
    150
    Likes Received:
    1
    We are seeing this issue in Plesk 10.4.4 Update #36 - we run the command below and the 'No secure shell available' message goes away:

    Code:
    /usr/local/psa/bin/server_pref -u -crontab-secure-shell /bin/sh
    But after some time, the 'No secure shell available' message comes back and the only way to fix it is to again run the command above.

    Does anyone have any suggestions what is causing this and how to fix it?

    Thanks,
    Chris
     
  9. getsited

    getsited New Pleskian

    10
     
    Joined:
    Sep 12, 2012
    Messages:
    1
    Likes Received:
    0
    We are on Plesk 10.4.4 Update #43 and have the same issue with having to run the command every couple of weeks.

    Has anyone found a way to resolve it? Is it fixed in version 11?
     
  10. cmaxwell

    cmaxwell Regular Pleskian

    25
    73%
    Joined:
    Aug 1, 2001
    Messages:
    150
    Likes Received:
    1
    As far as i'm aware, there has been no fix for this issue as we are running the latest update of 10.4.4. The way we work around this is to run the server_pref command hourly via a cron job - not ideal but has prevented any ongoing customer issues.

    I haven't tested 11 to confirm if the issue still exists, though we certainly wouldn't use 11 in a production environment at this time - not least because we've only just moved to 10.
     
  11. DocF

    DocF New Pleskian

    16
    60%
    Joined:
    Feb 2, 2011
    Messages:
    6
    Likes Received:
    0
    The problem still exists with the latest Plesk 11. Everytime a user creates or change a crontab the crontab shell has no shell an an entry like "curl http://do.com/it.php' ended up with a '-: curl: command not found'.

    Setting up a cronjob with '/usr/local/psa/bin/server_pref -u -crontab-secure-shell /bin/sh' helps as a workaround, but it's not really a solutions.

    Any news on this?


    Thx,
    Christian
     
Loading...