Sitemap generator error - HTTP headers: x_csize: 0
« on: August 12, 2022, 01:13:45 PM »
We have been using SiteMap Generator for many years without problems, until recently.
Now when attempting to generate a Sitemap, we get the following error:

HTTP headers:  x_csize: 0
  • We do have cURL installed on our website
  • We have a firewall in place with NAT from public to private address
  • The website where generator is installed is available externally on port 443
Re: Sitemap generator error - HTTP headers: x_csize: 0
« Reply #1 on: August 12, 2022, 01:34:25 PM »
Note that using Pro Sitemaps, we have no issues with creating a sitemap.
Its only with the Standalone Generator that we have this problem.
Re: Sitemap generator error - HTTP headers: x_csize: 0
« Reply #2 on: August 13, 2022, 01:31:50 PM »
Hello,
you would need to whitelist your own server IP in the firewall to allow local connection for sitemap generator bot requests.
Re: Sitemap generator error - HTTP headers: x_csize: 0
« Reply #3 on: August 15, 2022, 09:18:25 AM »
Hi there,

Could you please explain this is a bit more detail.
We have an external firewall that allows port 80 and 443 to the webserver.
The external firewall also does NAT, so the webserver has a private IP address that's different from the incoming domain address 
eg [ External links are visible to forum administrators only ] = 1.2.3.4
The firewall will NAT this to 192.168.1.x

The webserver also has its own firewall, which will allow port 80 and port 443 to the webserver.

Question:
On which firewall do we need to make whitelist the own server IP
Which IP do we list?  The public one or the NAT private one?
Re: Sitemap generator error - HTTP headers: x_csize: 0
« Reply #4 on: August 15, 2022, 10:00:40 AM »
Hello,

private IP should be whitelisted. Details on depend on the system configuration, you might need to contact your hosting support for that.
Re: Sitemap generator error - HTTP headers: x_csize: 0
« Reply #5 on: August 16, 2022, 08:20:16 AM »
I'm not sure that is the problem.

I have tested using a desktop device on the same network i.e inside the perimeter firewall.
I also disabled the firewall on the webserver, so there shouldn't be anything that needs to be whitelisted on the perimeter firewall.

However, I still get the same error message, although I did notice that the generator was waiting while attempting to contact https://www.xml-sitemaps.com  (not sure why it needs to phone home)
Re: Sitemap generator error - HTTP headers: x_csize: 0
« Reply #6 on: August 16, 2022, 08:11:19 PM »
Hello,
please check if a testing connection works with the script like:
Code: [Select]
<?php $initurl = 'https://www.yourdomain.com'; $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $initurl); curl_setopt($ch, CURLOPT_HEADER, 1); curl_setopt($ch, CURLOPT_VERBOSE, 1); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); if($errno = curl_errno($ch)) {  $error_message = curl_error ($ch);  echo "cURL error ({$errno}):\n {$error_message}"; } $info = curl_getinfo($ch); print_r($info); $fdata = curl_exec($ch); print_r($fdata); curl_close($ch); 
Re: Sitemap generator error - HTTP headers: x_csize: 0
« Reply #7 on: August 28, 2023, 11:33:05 AM »
We never got round to fixing this problem....it was just easier to use an online generator.
But it's frustrating that we have paid for a tool which doesn't work, so i would like to resolve it if possible.

We have created a test php file, which we access from outside the network and with the above content. 
This is the response:

Array ( [url] => https://www.xxx.com [content_type] => [http_code] => 0 [header_size] => 0 [request_size] => 0 [filetime] => -1 [ssl_verify_result] => 0 [redirect_count] => 0 [total_time] => 0 [namelookup_time] => 0 [connect_time] => 0 [pretransfer_time] => 0 [size_upload] => 0 [size_download] => 0 [speed_download] => 0 [speed_upload] => 0 [download_content_length] => -1 [upload_content_length] => -1 [starttransfer_time] => 0 [redirect_time] => 0 [redirect_url] => [primary_ip] => [certinfo] => Array ( ) [primary_port] => 0 [local_ip] => [local_port] => 0 [http_version] => 0 [protocol] => 0 [ssl_verifyresult] => 0 [scheme] => [appconnect_time_us] => 0 [connect_time_us] => 0 [namelookup_time_us] => 0 [pretransfer_time_us] => 0 [redirect_time_us] => 0 [starttransfer_time_us] => 0 [total_time_us] => 0 [effective_method] => GET )
Re: Sitemap generator error - HTTP headers: x_csize: 0
« Reply #9 on: August 29, 2023, 07:19:00 AM »
PM sent!