Connection refused to openstreet map server

I have setup nominatim server with daily update according to the https://nominatim.org/release-docs/latest/admin/Import-and-Update/
Update works properly for two weeks.
my local.php file content

  @define('CONST_Website_BaseURL', '/nominatim/');
  @define('CONST_Pyosmium_Binary', '/home/nominatim/.local/bin/pyosmium-get-changes');
  @define('CONST_Replication_Url', '[https://download.geofabrik.de/asia/sri-lanka-updates](https://download.geofabrik.de/asia/sri-lanka-updates)');
  @define('CONST_Replication_Update_Interval', '86400');
  @define('CONST_Replication_Recheck_Interval', '900');

and i have add following entry to crontab
* 22 * * * /srv/nominatim/Nominatim-3.4.1/build/utils/update.php --import-osmosis

now new changes are not updating to my nominatim and i am getting following error

  PHP Warning:  file_get_contents(https://download.geofabrik.de/asia/sri-lanka-updates/state.txt): failed to open stream: Connection refused in 
  /srv/nominatim/Nominatim-3.4.1/utils/update.php on line 85
 Cannot find state.txt file at the configured replication URL.
 Does the URL point to a directory containing OSM update data?
 ERROR: replication URL not reachable.
 string(30) "replication URL not reachable."

out put for the wget https://download.geofabrik.de/asia/sri-lanka-updates/state.txt
–2020-08-20 04:29:21-- https://download.geofabrik.de/asia/sri-lanka-updates/state.txt
Resolving download.geofabrik.de (download.geofabrik.de)… 88.99.142.44, 116.202.112.212
Connecting to download.geofabrik.de (download.geofabrik.de)|88.99.142.44|:443… failed: Connection refused.
Connecting to download.geofabrik.de (download.geofabrik.de)|116.202.112.212|:443… failed: Connection refused.

The server that you cannot connect to is not the “openstreetmap server”, but instead Geofabrik’s download server. If you have access to a different machine somewhere, try that “wget” command somewhere else and see if it works there. If that is the case, then you are probably blocked on the Geofabrik download server - perhaps you, or someone else at the same IP, have made thousands of requests which will get your IP blocked. You’re not 52.74.113.* by any chance? The configuration you quote above will only check for updates every 15 minutes but that IP address has checked for updates every 10 seconds on 09 and 10 August this year and therefore was blocked.

Best
Frederik Ramm - download.geofabrik.de admin

Hi Frederik.

Thanks for your quick response. This is the first time we are syncing nominatim and tile servers. At the setup time, our developer may access the sync service with less time gap than the expected value.

We are extremely sorry and we have read your policy document and follow some forum discussion too.

We have configured the sync service as described below as cron job.

  • 22 * * * /srv/nominatim/Nominatim-3.4.1/build/utils/update.php --import-osmosis

As you guess our IP address is 52.74.113.*. Please be kind enough to unblock the IP and advice further to avoid the same behavior in future

Thanks & Best Regards,

We updated the cron job as below

*/15 22 * * * /srv/nominatim/Nominatim-3.5.1/build/utils/update.php --import-osmosis

It should work now. The gaps configured in Nominatim itself only apply to the --import-osmosis-all task. If you run it from Cron then it will run more often.