Cron job problem "Solved"

Discussion in 'ISPConfig 3 Priority Support' started by ganewbie, Sep 30, 2015.

  1. ganewbie

    ganewbie Member HowtoForge Supporter

    Hello,
    I have a problem with Cron job, and I have been googling for couple of days already but no luck.
    If I try the Cron job with the GET URL in a browser, it works. And as I saw Till's instruction that I do not add the GET in the cron job field just the complete URL.
    The job does not happen but I see it in the system log as follows.
    There is no client in this case it is a reseller acount who owns web2, does it make a difference?
    Not sure where to start.
    Thanks,
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    The line in the log shows that the cronjob was run. Maybe there is an issue in your php script or the php script is not reachable by this URL from the server.

    No.
     
  3. ganewbie

    ganewbie Member HowtoForge Supporter

    Thanks for the quick response.
    When I enter https://domain.com/fold/crons/cron.php in the browser the script runs OK.
    Then, I would expect the script to be good and reachable by url.
    Not sure where do I look?
     
    Ham likes this.
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    is your server behind a NAT router or does it has a direct internet ip?
     
  5. ganewbie

    ganewbie Member HowtoForge Supporter

    Thanks again,
    It is NATed behind a router with private IP going to public
     
  6. till

    till Super Moderator Staff Member ISPConfig Developer

    Ok, then your router is blocking the script as it denies access to the external IP from the server itself. Do you use * or an IP in the website settings? If you use *, then you can try this:

    add the internal IP followed by the domain name of this site into the /etc/hosts file on the server. This tells wget to connect to apache directly on the internal IP without the roundtript to the router.
     
  7. ganewbie

    ganewbie Member HowtoForge Supporter

    Hi Till,
    Yes I use * in the website settings.
    Here is what I have in /etc/hosts after adding the one line.
    I have added the public IP address (Y.Y.Y.Y)
    Is that what you have in mind?
    I think I will have to reboot but I want to double check.

    While I am at it. Can I change the host name serv1.site.com to serv2.domain.com for example or changing the host name may cause more issues and it is not that simple.

    Thanks again,
     
    Last edited: Oct 1, 2015
  8. till

    till Super Moderator Staff Member ISPConfig Developer

    in the hosts file you dont use http:// or https://. just add the domain as:

    y.y.y.y www.domain.com domain.com

    you can change the hostname,. Just ensure that you replace all occurrences of the old name in /etc/hosts, /etc/hostname, /etc/mailname and /etc/postfix/main.cf and restart the server. If one of the files does not exist on your server, then skip that file.
     
  9. ganewbie

    ganewbie Member HowtoForge Supporter

    Hello,
    Still no luck, however I can ping the domain from the host and it responds with the internal IP.
    Any other suggestion?
    Thanks in advance,
     
  10. ganewbie

    ganewbie Member HowtoForge Supporter

    Gents,
    I still have no luck, any other suggestions?
    Thanks,
     
  11. till

    till Super Moderator Staff Member ISPConfig Developer

  12. ganewbie

    ganewbie Member HowtoForge Supporter

    Thanks Till,
    No still not executed.
     
  13. ganewbie

    ganewbie Member HowtoForge Supporter

    Hi Till,
    Any other suggestions?
    Thanks,
     
  14. till

    till Super Moderator Staff Member ISPConfig Developer

    Does the command returns instantly to the prompt when you run the command?
     
  15. ganewbie

    ganewbie Member HowtoForge Supporter

    Yes,
    As if you are clicking enter only.
    Thanks,
     
  16. ganewbie

    ganewbie Member HowtoForge Supporter

    Hi Till and Florian,
    It works like magic now, added the "SSL bundle" and everything is good.
    Thanks a million,
     
    till likes this.

Share This Page