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

Cannot access remote raster files when querying raster ca-certificates missing #307

Closed
robe2 opened this issue Aug 5, 2022 · 4 comments · Fixed by #311
Closed

Cannot access remote raster files when querying raster ca-certificates missing #307

robe2 opened this issue Aug 5, 2022 · 4 comments · Fixed by #311

Comments

@robe2
Copy link
Member

robe2 commented Aug 5, 2022

A user reported this issue on postgis issue tracker:
trying to use 14-3.2 image

https://trac.osgeo.org/postgis/ticket/5199

User was trying to do an out-db-raster call to a google cloud raster, and the call failed because ca-certificates weren't installed.

Error was:

ERROR 11: CURL error: server certificate verification failed. CAfile: none CRLfile: none
2022-08-05 11:43:47.299 UTC [243] ERROR:  rt_band_load_offline_data: Cannot open offline raster: /vsigs/<bucket>/pop12.tif
2022-08-05 11:43:47.299 UTC [243] CONTEXT:  SQL function "st_pixelaspolygons" statement 1
        SQL statement "SELECT public.ST_Buffer(public.ST_Collect(t.geom), 0)            FROM public.ST_PixelAsPolygons(rast, nband) AS t"
        PL/pgSQL function _st_intersects(geometry,raster,integer) line 21 at SQL statement
        PL/pgSQL function st_intersection(geometry,raster,integer) line 11 at assignment
        SQL function "st_intersection" statement 1
@phillipross
Copy link
Contributor

Thanks Regina. This makes sense. @ImreSamu I wonder if this might be some type of regression that happened somewhere along the line as the base debian containers were updated?

Whatever the case, we can look to see how much bigger the images become if we add in the certs package and whatever dependencies it might pull in, but I'm betting it's negligible.

@ImreSamu
Copy link
Member

ImreSamu commented Aug 6, 2022

@phillipross

I wonder if this might be some type of regression that happened somewhere
along the line as the base debian containers were updated?

as I see ca-certificates is a "recommended package"
and we are using && apt-get install -y --no-install-recommends \

now the: postgresql-$PG_MAJOR-postgis-3 recommended packages : ca-certificates proj-bin poppler-data publicsuffix

Whatever the case, we can look to see how much bigger the images become
if we add in the certs package and whatever dependencies it might pull in,
but I'm betting it's negligible.

agree; negligible ~ +391 kB
apt install ca-certificates -> After this operation, 391 kB of additional disk space will be used.

@robe2
Copy link
Member Author

robe2 commented Sep 2, 2022

Thanks all. So I assume this is all set and we can close or has a build not been released yet with this change?

@phillipross
Copy link
Contributor

At the moment the PR is up but still in review. When we get it finalized and merged then we'll swing back and close this issue. But to be clear, this issue explicit covers getting the ca-certificates package into the docker image, but the trac issue may not necessarily be resolved by this fix. The user reporting the issue on trac should retest after we get this PR merged to make sure this is really the fix for the issue 😊

phillipross pushed a commit that referenced this issue Sep 4, 2022
* add ca-certificates: for accessing remote raster files;
fix: #307

* add ca-certificates check the *-master template

* fix master-template error
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants