kartoza / docker-postgis

Dockerfile for postgis
GNU General Public License v2.0
651 stars 317 forks source link

Error file_fdw wget failed to download a remote csv #344

Closed Doctor-Who closed 2 years ago

Doctor-Who commented 2 years ago

Hello,

Using docker image : kartoza/postgis:13-3.1 When trying to use FDW from a remote CSV, I've got the following error :

program "wget -q -O - "https://cdonline.articque.com/download/434922/Base_illectronisme_CSV.csv"" failed

OGR_FDW works with remote GeoJSON but I suppose it's not using wget ? When attaching a shell, I can install a package such as nano so internet connection works inside the container.

I've also tested on our production server, same SQL code is working.

Best regards.

NyakudyaA commented 2 years ago

Hello,

Using docker image : kartoza/postgis:13-3.1

When trying to use FDW from a remote CSV, I've got the following error :

program "wget -q -O - "https://cdonline.articque.com/download/434922/Base_illectronisme_CSV.csv"" failed

OGR_FDW works with remote GeoJSON but I suppose it's not using wget ?

When attaching a shell, I can install a package such as nano so internet connection works inside the container.

I've also tested on our production server, same SQL code is working.

Best regards.

I am not sure what you are trying to do with wget. Isn't the purpose of fdw to link remote data.

Maybe you need to ask on stack exchange or ogr_fwd GitHub page because this looks like it's not a problem with the image

Doctor-Who commented 2 years ago

Dear @NyakudyaA perhaps my english was not clear.

The file_fdw postgres extension call wget to download some remote csv like this tutorial : https://blog.rustprooflabs.com/2020/03/postgresql-fdw-remote-file And when I try to apply this method, I've got the error failed already mention. I've also try with other extension : fdw_ogr with a distant GeoJson and it works.

But the file_fdw extension doesn't seems to work properly in docker image.

NyakudyaA commented 2 years ago

Dear @NyakudyaA perhaps my english was not clear.

The file_fdw postgres extension call wget to download some remote csv like this tutorial : https://blog.rustprooflabs.com/2020/03/postgresql-fdw-remote-file And when I try to apply this method, I've got the error failed already mention. I've also try with other extension : fdw_ogr with a distant GeoJson and it works.

But the file_fdw extension doesn't seems to work properly in docker image.

I haven't tried file_fwd but I think I would try https://github.com/pramsey/pgsql-ogr-fdw Which combines well with https://gdal.org/user/virtual_file_systems.html

Doctor-Who commented 2 years ago

Thanks for your help. It was due to vpn bug ... when connecting on remote work with VPN, my containers do not have anymore internet access ... At home without VPN and at work at the office, it was okay too. My bad ;)