Connection refused to openstreet map server

I have setup nominatim server with daily update according to the
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', '[](');
  @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( 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
–2020-08-20 04:29:21--
Resolving (…,
Connecting to (||:443… failed: Connection refused.
Connecting to (||: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.

Frederik Ramm - 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.