Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nominatim reverse cli call with external database #550

Open
lucasmaj opened this issue Apr 9, 2024 · 1 comment
Open

nominatim reverse cli call with external database #550

lucasmaj opened this issue Apr 9, 2024 · 1 comment
Labels

Comments

@lucasmaj
Copy link

lucasmaj commented Apr 9, 2024

When running nominatim cli nominatim reverse --lat 43.73282549781305 --lon -87.42420819014446 I get reverse geocode result followed by error. I am using external postresql database. Running reverse via WEB REST API call, does not appear causing any errors but I am worried something is not right.

nominatim reverse --lat 43.73282549781305 --lon -87.42420819014446

{
"place_id": 63099588,
"licence": "Data © OpenStreetMap contributors, ODbL 1.0. http://osm.org/copyright",
"osm_type": "relation",
"osm_id": 270625,
"lat": "43.7128967",
"lon": "-87.9370433",
"category": "boundary",
"type": "administrative",
"place_rank": 12,
"importance": 0.24000999999999997,
"addresstype": "county",
"name": "Sheboygan County",
"display_name": "Sheboygan County, Wisconsin, United States",
"boundingbox": [
"43.5423730",
"43.8925880",
"-88.1622240",
"-87.0753571"
]
}
2024-04-09 22:14:48: Fatal error on SSL transport
protocol: <asyncio.sslproto.SSLProtocol object at 0x7fabccb2bdf0>
transport: <_SelectorSocketTransport closing fd=6>
Traceback (most recent call last):
File "/usr/lib/python3.10/asyncio/selector_events.py", line 924, in write
n = self._sock.send(data)
OSError: [Errno 9] Bad file descriptor

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/usr/lib/python3.10/asyncio/sslproto.py", line 690, in _process_write_backlog
self._transport.write(chunk)
File "/usr/lib/python3.10/asyncio/selector_events.py", line 930, in write
self._fatal_error(exc, 'Fatal write error on socket transport')
File "/usr/lib/python3.10/asyncio/selector_events.py", line 725, in _fatal_error
self._force_close(exc)
File "/usr/lib/python3.10/asyncio/selector_events.py", line 737, in _force_close
self._loop.call_soon(self._call_connection_lost, exc)
File "/usr/lib/python3.10/asyncio/base_events.py", line 753, in call_soon
self._check_closed()
File "/usr/lib/python3.10/asyncio/base_events.py", line 515, in _check_closed
raise RuntimeError('Event loop is closed')
RuntimeError: Event loop is closed

@lucasmaj lucasmaj added the bug label Apr 9, 2024
@bfnsga
Copy link

bfnsga commented Apr 21, 2024

I had this same issue with the "nominatim search" command to an external Postgre database on a standard Nominatim installation on Ubuntu 22 (not nominatim-docker).

What worked for me was manually activating the python virtual environment while logged in as the "nominatim" user (source ~/nominatim-venv/bin/activate). After activiting the virtual environment and running the same nominatim search command, the error dissappeared. Since the REST API server uses the virtual environment I would imagine that is why the error does not appear for those queries either.

Again, I am not using nominatim-docker but hopefully the above information helps provide a fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants