• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion
  • Please beaware of a breaking change in the REST API on the next Plesk release (18.0.62).
    Starting from Plesk Obsidian 18.0.62, requests to REST API containing the Content-Type header with a media-type directive other than “application/json” will result in the HTTP “415 Unsupported Media Type” client error response code. Read more here

Issue Plesk Cron Fetch a URL not working 404

Quinten

Regular Pleskian
Server operating system version
Ubuntu 20.04.6 LTS
Plesk version and microupdate number
Plesk Obsidian Version 18.0.60 Update #1
Hello,

My customer runs a webshop (prestashop) and needs to have a daily cron to run to generate a sitemap.
I get the following error:

Task "JuXtra BV" completed with error in 2 seconds, output:
Url 'JuXtra BV' fetched
Status: 404
Output:
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>404 Not Found</title>
</head><body>
<h1>Not Found</h1>
<p>The requested URL was not found on this server.</p>
<hr>
<address>Apache Server at www.EXAMPLE.be Port 443</address>
</body></html>

If i do run a command and use curl i get this:
Task "curl JuXtra BV" successfully completed in 2 seconds, output:
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed

0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
curl: (77) error setting certificate verify locations:
CAfile: /etc/ssl/certs/ca-certificates.crt
CApath: /etc/ssl/certs

It ends up not doing anything and the customer does have a certificate

If i run it manually from prestashop or visit the link myself it works and it generates so seems to be something with the server or plesk but i cant figure it out.

Any help would be appriciated.
 
URls got messed with, should be:

Code:
Task "https://www.example.be/nl/module/gsitemap/cron?token=EXAMPLE&id_shop=1" completed with error in 2 seconds, output:

Url 'https://www.example.be/nl/module/gsitemap/cron?token=EXAMPLE&id_shop=1"' fetched

Status: 404
 
URls got messed with, should be:

Code:
Task "https://www.example.be/nl/module/gsitemap/cron?token=EXAMPLE&id_shop=1" completed with error in 2 seconds, output:

Url 'https://www.example.be/nl/module/gsitemap/cron?token=EXAMPLE&id_shop=1"' fetched

Status: 404
Correct and the curl command one gives success, because it ran, but also 404 response
 
An similar issue has been posted here. Maybe any of the suggestions in that thread helps you.
I have seen this thread and tried the suggestions , nothing seems to work

i updated to the newest plesk .61 hoping it would fix things or have an effect.
no result sadly, i dont know much specifics about cron jobs commands but I have changed the command to:

Code:
curl -l -k https://www.example.be/nl/module/gsitemap/cron?token=exampleid&id_shop=1

and this is the response:

<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"> <html><head> <title>404 Not Found</title> </head><body> <h1>Not Found</h1> <p>The requested URL was not found on this server.</p> <hr> <address>Apache Server at www.example.be Port 443</address> </body></html> % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- ...

 
Are you sure the domain name isn't listed sever host file?
I am sure yes, also tried running the cron from a different plesk server with the following result:


Code:
Task " https://www.example.be/nl/module/gsitemap/cron?token=exampleid&id_shop=1" completed with error in 0 seconds, output:

curl: (3) URL using bad/illegal format or missing URL
Unable to fetch URL: https://www.example.be/nl/module/gsitemap/cron?token=exampleid&id_shop=1
 
Are you using a server with a NAT IP configuration by any chance? That's the only thing I can things of if the host file is empty and there are no .htaccess files or additional nginx directives that could cause the 404.
 
Are you using a server with a NAT IP configuration by any chance? That's the only thing I can things of if the host file is empty and there are no .htaccess files or additional nginx directives that could cause the 404.
This is my current setup:
1716532154909.png

The red being a public ip4 and the blue being local 10., could this be the issue?
This is a vm hosted on Azure.

Many thanks on trying to help!
 
Hello,

My customer runs a webshop (prestashop) and needs to have a daily cron to run to generate a sitemap.
I get the following error:

Task "JuXtra BV" completed with error in 2 seconds, output:
Url 'JuXtra BV' fetched
Status: 404
Output:
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>404 Not Found</title>
</head><body>
<h1>Not Found</h1>
<p>The requested URL was not found on this server.</p>
<hr>
<address>Apache Server at www.EXAMPLE.be Port 443</address>
</body></html>

If i do run a command and use curl i get this:
Task "curl JuXtra BV" successfully completed in 2 seconds, output:
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed

0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
curl: (77) error setting certificate verify locations:
CAfile: /etc/ssl/certs/ca-certificates.crt
CApath: /etc/ssl/certs

It ends up not doing anything and the customer does have a certificate

If i run it manually from prestashop or visit the link myself it works and it generates so seems to be something with the server or plesk but i cant figure it out.

Any help would be appriciated.
The issue might be with the server's SSL configuration. Ensure the CA certificates are correctly installed on the server, and try updating the CA certificates with sudo update-ca-certificates
 
The issue might be with the server's SSL configuration. Ensure the CA certificates are correctly installed on the server, and try updating the CA certificates with sudo update-ca-certificates
Hey thanks for the reply but sadly running the command and checking the certificates again did not change anything.
 
For now the cron jobs are running on an external server till i figure out the problem with the server.
Will report back
 
Back
Top