Overv / openstreetmap-tile-server

Docker file for a minimal effort OpenStreetMap tile server
Apache License 2.0
1.24k stars 488 forks source link

Import failed behind proxy: Caused by SSLError #311

Open HoangAlain64 opened 2 years ago

HoangAlain64 commented 2 years ago

Hello,

like issue #215 , I could not import behind proxy... but this time it seems to be caused by SSL version:

requests.exceptions.SSLError: HTTPSConnectionPool(host='osmdata.openstreetmap.de', port=443): Max retries exceeded with url: /download/simplified-water-polygons-split-3857.zip (Caused by SSLError(SSLError(1, '[SSL: WRONG_VERSION_NUMBER] wrong version number (_ssl.c:997)')))

I did configure docker client, like recommended on https://docs.docker.com/network/proxy/.

I was able to dowload it from bash with HTTPS_proxy set using wget ( wget https://osmdata.openstreetmap.de/download/simplified-water-polygons-split-3857.zip )

any tip? See you, Alain.

HoangAlain64 commented 2 years ago

I do have the issue on RHEL 7.9 and RHEL 8.6 with docker-ce-20.10.17-3.el[78]. downgrading docker-ce to 19.03.15 on EL8, to 18.09.9-3 on EL7, did not fix the issue.

should I update some openssl package on my VM?

xmlsec1-openssl-1.2.25-4.el8.x86_64 openssl-pkcs11-0.4.10-2.el8.x86_64 apr-util-openssl-1.6.1-6.el8.x86_64 openssl-libs-1.1.1k-7.el8_6.x86_64 compat-openssl10-1.0.2o-3.el8.x86_64 openssl-1.1.1k-7.el8_6.x86_64

any suggestion?

HoangAlain64 commented 2 years ago

I do have the same with Window Docker Desktop...

HoangAlain64 commented 2 years ago

and I do have the same on Ubuntu 22.04 VM running as guest of VirtualBox... :( How could we add --no-check-certificate to wget?

INFO:root: Fetching https://osmdata.openstreetmap.de/download/simplified-water-polygons-split-3857.zip Traceback (most recent call last): File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 699, in urlopen httplib_response = self._make_request( File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 382, in _make_request self._validate_conn(conn) File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 1012, in _validate_conn conn.connect() File "/usr/lib/python3/dist-packages/urllib3/connection.py", line 411, in connect self.sock = ssl_wrapsocket( File "/usr/lib/python3/dist-packages/urllib3/util/ssl.py", line 449, in ssl_wrap_socket ssl_sock = _ssl_wrap_socketimpl( File "/usr/lib/python3/dist-packages/urllib3/util/ssl.py", line 493, in _ssl_wrap_socket_impl return ssl_context.wrap_socket(sock, server_hostname=server_hostname) File "/usr/lib/python3.10/ssl.py", line 512, in wrap_socket return self.sslsocket_class._create( File "/usr/lib/python3.10/ssl.py", line 1070, in _create self.do_handshake() File "/usr/lib/python3.10/ssl.py", line 1341, in do_handshake self._sslobj.do_handshake() ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:997)

HoangAlain64 commented 2 years ago

Hello, I go the same error, from Ubuntu 22.04 VM when running: scripts/get-external-data.py

^[[?2004hpostgres@VB:/home/osm/openstreetmap-carto$ scripts/get-external-data.py^M ^[[?2004l^MINFO:root:Starting load of external data into database^M INFO:root:Checking table simplified_water_polygons^M Traceback (most recent call last):^M File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 699, in urlopen^M httplib_response = self._make_request(^M File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 382, in _make_request^M self._validate_conn(conn)^M File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 1012, in _validate_conn^M conn.connect()^M File "/usr/lib/python3/dist-packages/urllib3/connection.py", line 411, in connect^M self.sock = ssl_wrapsocket(^M File "/usr/lib/python3/dist-packages/urllib3/util/ssl.py", line 449, in ssl_wrap_socket^M ssl_sock = _ssl_wrap_socketimpl(^M File "/usr/lib/python3/dist-packages/urllib3/util/ssl.py", line 493, in _ssl_wrap_socket_impl^M return ssl_context.wrap_socket(sock, server_hostname=server_hostname)^M File "/usr/lib/python3.10/ssl.py", line 512, in wrap_socket^M return self.sslsocket_class._create(^M File "/usr/lib/python3.10/ssl.py", line 1070, in _create^M self.do_handshake()^M File "/usr/lib/python3.10/ssl.py", line 1341, in do_handshake^M self._sslobj.do_handshake()^M ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:997)^M ^M