• Welcome to Sitemap Generator Forum.
 

Sitemap generator error - HTTP headers: x_csize: 0

Started by accounts180, August 12, 2022, 01:13:45 PM

Previous topic - Next topic

accounts180

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

accounts180

Note that using Pro Sitemaps, we have no issues with creating a sitemap.
Its only with the Standalone Generator that we have this problem.

XML-Sitemaps Support

Hello,
you would need to whitelist your own server IP in the firewall to allow local connection for sitemap generator bot requests.

accounts180

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?

XML-Sitemaps Support

Hello,

private IP should be whitelisted. Details on depend on the system configuration, you might need to contact your hosting support for that.

accounts180

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)

XML-Sitemaps Support

Hello,
please check if a testing connection works with the script like:

<?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);


accounts180

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 )


accounts180