+1
I am also having this problem using geoserver via docker. We’re using the docker.osgeo.org/geoserver:2.26.2
docker image and our index is kept in a PostgreSQL table. We bind mount with the path to our NFS to our docker container, and the user tomcat
owns the data on the NFS mount.
I am wondering if it has to do with file permissions somehow. When we create our docker container, we have it set to run as the tomcat
user and assigned a UID/GID that is the same as the tomcat
user we created on our VM that “owns” the data in our NFS mount:
# Run as tomcat user with same UID and GID as on host VM
RUN_UNPRIVILEGED=true
RUN_WITH_USER_UID=444
RUN_WITH_USER_GID=444
However, while our tomcat
user owns the data on our NFS mount, the group does not match what is on the NFS mount. So in our docker container, I see the image mosaic files like this:
-rwxrwxr-x 1 tomcat 4730 2403012 May 7 03:53 noresm2_mm_ssp585_dbcca_daymet_vic4_wind_2060_2099_spring.tif
Where GID 4730 matches a group on our VM, but it does not exist in our docker container. I wonder if the fact that the group doesn’t exist in our docker container is somehow messing it up. I don’t know how that could be since tomcat
owns the data and has all necessary permissions to act on it, but it’s the only thing I can really think of.
(I commented on your stackoverflow post, but figured I would here too for more visibility).
UPDATE:
I tried changing the group to tomcat
too (GID=444), which it recognized, but it didn’t make a difference.
Log files seem to indicate that GeoServer is looking in the wrong spot for our regex .properties
files, but the right spot for the other configuration files like mosaic_dir.properties
and datastore.properties
. Very confusing, no idea why it would be doing that. As an aside, where it says Required key Levels not found
can be ignored; the key Levels
is not part of datastore.properties
, only <mosaic_dir>.properties
has that per the docs. That file is generally created automatically and it does, indeed, have the key Levels
when I check.
07 May 20:02:48 DEBUG [gce.imagemosaic] - Using ThreadPoolExecutor with the following settings: core pool size = 5
max pool size = 10
keep alive time 30000
07 May 20:02:48 DEBUG [gce.imagemosaic] - Checking file:/data/hop/test_mosaic/
isHidden:false
exists:true
isFiletrue
canRead:true
canWritetrue
canExecute:true
isAbsolute:true
lastModified:1738273704109
length:84
07 May 20:02:48 DEBUG [gce.imagemosaic] - Trying to load properties file from URL:file:/data/hop/test_mosaic/test_mosaic.properties
07 May 20:02:48 DEBUG [gce.imagemosaic] - Checking file:/data/hop/test_mosaic/
isHidden:false
exists:false
isFilefalse
canRead:false
canWritefalse
canExecute:false
isAbsolute:true
lastModified:0
length:0
07 May 20:02:48 DEBUG [gce.imagemosaic] - Checking file:/data/hop/test_mosaic/
isHidden:false
exists:true
isFiletrue
canRead:true
canWritetrue
canExecute:true
isAbsolute:true
lastModified:1736959770561
length:865
07 May 20:02:48 DEBUG [gce.imagemosaic] - Checking file:/opt/
isHidden:false
exists:false
isFilefalse
canRead:false
canWritefalse
canExecute:false
isAbsolute:false
lastModified:0
length:0
07 May 20:02:48 INFO [catalog.index] - Unable to access the file for this PropertyCollector: /opt/clm_model_regex.properties
07 May 20:02:48 DEBUG [gce.imagemosaic] - Checking file:/opt/
isHidden:false
exists:false
isFilefalse
canRead:false
canWritefalse
canExecute:false
isAbsolute:false
lastModified:0
length:0
07 May 20:02:48 INFO [catalog.index] - Unable to access the file for this PropertyCollector: /opt/em_scenario_regex.properties
07 May 20:02:48 DEBUG [gce.imagemosaic] - Checking file:/opt/
isHidden:false
exists:false
isFilefalse
canRead:false
canWritefalse
canExecute:false
isAbsolute:false
lastModified:0
length:0
07 May 20:02:48 INFO [catalog.index] - Unable to access the file for this PropertyCollector: /opt/downscale_regex.properties
07 May 20:02:48 DEBUG [gce.imagemosaic] - Checking file:/opt/
isHidden:false
exists:false
isFilefalse
canRead:false
canWritefalse
canExecute:false
isAbsolute:false
lastModified:0
length:0
07 May 20:02:48 INFO [catalog.index] - Unable to access the file for this PropertyCollector: /opt/meteor_force_regex.properties
07 May 20:02:48 DEBUG [gce.imagemosaic] - Checking file:/opt/
isHidden:false
exists:false
isFilefalse
canRead:false
canWritefalse
canExecute:false
isAbsolute:false
lastModified:0
length:0
07 May 20:02:48 INFO [catalog.index] - Unable to access the file for this PropertyCollector: /opt/model_grid_regex.properties
07 May 20:02:48 DEBUG [gce.imagemosaic] - Checking file:/opt/
isHidden:false
exists:false
isFilefalse
canRead:false
canWritefalse
canExecute:false
isAbsolute:false
lastModified:0
length:0
07 May 20:02:48 INFO [catalog.index] - Unable to access the file for this PropertyCollector: /opt/clm_variable_regex.properties
07 May 20:02:48 DEBUG [gce.imagemosaic] - Checking file:/opt/
isHidden:false
exists:false
isFilefalse
canRead:false
canWritefalse
canExecute:false
isAbsolute:false
lastModified:0
length:0
07 May 20:02:48 INFO [catalog.index] - Unable to access the file for this PropertyCollector: /opt/clm_period_regex.properties
07 May 20:02:48 DEBUG [gce.imagemosaic] - Checking file:/opt/
isHidden:false
exists:false
isFilefalse
canRead:false
canWritefalse
canExecute:false
isAbsolute:false
lastModified:0
length:0
07 May 20:02:48 INFO [catalog.index] - Unable to access the file for this PropertyCollector: /opt/time_period_regex.properties
07 May 20:02:48 DEBUG [gce.imagemosaic] - Trying to load properties file from URL:file:/data/hop/test_mosaic/datastore.properties
07 May 20:02:48 INFO [gce.imagemosaic] - Required key Levels not found.
07 May 20:02:48 DEBUG [gce.imagemosaic] - Trying to load properties file from URL:file:/data/hop/test_mosaic/test_mosaic.properties
07 May 20:02:48 DEBUG [gce.imagemosaic] - Checking file:/data/hop/test_mosaic/
isHidden:false
exists:false
isFilefalse
canRead:false
canWritefalse
canExecute:false
isAbsolute:true
lastModified:0
length:0
07 May 20:02:48 DEBUG [gce.imagemosaic] - Checking file:/data/hop/test_mosaic/
isHidden:false
exists:true
isFiletrue
canRead:true
canWritetrue
canExecute:true
isAbsolute:true
lastModified:1736959770561
length:865
07 May 20:02:48 DEBUG [gce.imagemosaic] - Checking file:/opt/
isHidden:false
exists:false
isFilefalse
canRead:false
canWritefalse
canExecute:false
isAbsolute:false
lastModified:0
length:0
07 May 20:02:48 INFO [catalog.index] - Unable to access the file for this PropertyCollector: /opt/clm_model_regex.properties
07 May 20:02:48 DEBUG [gce.imagemosaic] - Checking file:/opt/
isHidden:false
exists:false
isFilefalse
canRead:false
canWritefalse
canExecute:false
isAbsolute:false
lastModified:0
length:0
07 May 20:02:48 INFO [catalog.index] - Unable to access the file for this PropertyCollector: /opt/em_scenario_regex.properties
07 May 20:02:48 DEBUG [gce.imagemosaic] - Checking file:/opt/
isHidden:false
exists:false
isFilefalse
canRead:false
canWritefalse
canExecute:false
isAbsolute:false
lastModified:0
length:0
07 May 20:02:48 INFO [catalog.index] - Unable to access the file for this PropertyCollector: /opt/downscale_regex.properties
07 May 20:02:48 DEBUG [gce.imagemosaic] - Checking file:/opt/
isHidden:false
exists:false
isFilefalse
canRead:false
canWritefalse
canExecute:false
isAbsolute:false
lastModified:0
length:0
07 May 20:02:48 INFO [catalog.index] - Unable to access the file for this PropertyCollector: /opt/meteor_force_regex.properties
07 May 20:02:48 DEBUG [gce.imagemosaic] - Checking file:/opt/
isHidden:false
exists:false
isFilefalse
canRead:false
canWritefalse
canExecute:false
isAbsolute:false
lastModified:0
length:0
07 May 20:02:48 INFO [catalog.index] - Unable to access the file for this PropertyCollector: /opt/model_grid_regex.properties
07 May 20:02:48 DEBUG [gce.imagemosaic] - Checking file:/opt/
isHidden:false
exists:false
isFilefalse
canRead:false
canWritefalse
canExecute:false
isAbsolute:false
lastModified:0
length:0
07 May 20:02:48 INFO [catalog.index] - Unable to access the file for this PropertyCollector: /opt/clm_variable_regex.properties
07 May 20:02:48 DEBUG [gce.imagemosaic] - Checking file:/opt/
isHidden:false
exists:false
isFilefalse
canRead:false
canWritefalse
canExecute:false
isAbsolute:false
lastModified:0
length:0
07 May 20:02:48 INFO [catalog.index] - Unable to access the file for this PropertyCollector: /opt/clm_period_regex.properties
07 May 20:02:48 DEBUG [gce.imagemosaic] - Checking file:/opt/
isHidden:false
exists:false
isFilefalse
canRead:false
canWritefalse
canExecute:false
isAbsolute:false
lastModified:0
length:0
07 May 20:02:48 INFO [catalog.index] - Unable to access the file for this PropertyCollector: /opt/time_period_regex.properties
07 May 20:02:48 DEBUG [gce.imagemosaic] - Checking file:/data/hop/test_mosaic/
isHidden:false
exists:true
isFiletrue
canRead:true
canWritetrue
canExecute:false
isAbsolute:true
lastModified:1746641074172
length:469
07 May 20:02:48 DEBUG [geotools.jdbc] - CREATE CONNECTION
07 May 20:02:48 DEBUG [geotools.jdbc] - Metadata table GT_PK_METADATA was not found
07 May 20:02:48 DEBUG [geotools.jdbc] - Getting information about primary keys of test_mosaic
07 May 20:02:48 DEBUG [geotools.jdbc] - Grabbing table pk metadata: SELECT "fid" FROM "public"."test_mosaic" WHERE 0=1
07 May 20:02:48 DEBUG [geotools.jdbc] - CLOSE CONNECTION
07 May 20:02:48 DEBUG [geotools.jdbc] - CREATE CONNECTION
07 May 20:02:48 DEBUG [geotools.jdbc] - Geometry type check; SELECT TYPE FROM geometry_columns WHERE F_TABLE_SCHEMA = 'public' AND F_TABLE_NAME = 'test_mosaic' AND f_geometry_column = 'the_geom'
07 May 20:02:48 DEBUG [geotools.jdbc] - Geography srid check; SELECT SRID FROM GEOGRAPHY_COLUMNS WHERE F_TABLE_SCHEMA = 'public' AND F_TABLE_NAME = 'test_mosaic' AND F_GEOGRAPHY_COLUMN = 'the_geom'
07 May 20:02:48 DEBUG [geotools.jdbc] - Geometry srid check; SELECT SRID FROM GEOMETRY_COLUMNS WHERE F_TABLE_SCHEMA = 'public' AND F_TABLE_NAME = 'test_mosaic' AND F_GEOMETRY_COLUMN = 'the_geom'
07 May 20:02:48 DEBUG [geotools.jdbc] - Geography srid check; SELECT COORD_DIMENSION FROM GEOGRAPHY_COLUMNS WHERE F_TABLE_SCHEMA = 'public' AND F_TABLE_NAME = 'test_mosaic' AND F_GEOGRAPHY_COLUMN = 'the_geom'
07 May 20:02:48 DEBUG [geotools.jdbc] - Geometry srid check; SELECT COORD_DIMENSION FROM GEOMETRY_COLUMNS WHERE F_TABLE_SCHEMA = 'public' AND F_TABLE_NAME = 'test_mosaic' AND F_GEOMETRY_COLUMN = 'the_geom'
07 May 20:02:48 DEBUG [geotools.jdbc] - CLOSE CONNECTION
07 May 20:02:48 DEBUG [imagemosaic.catalog] - BBOXFilterExtractor::extractBasicProperties(): geometryPropertyName is set to 'the_geom'.
07 May 20:02:48 DEBUG [geotools.jdbc] - CREATE CONNECTION
07 May 20:02:48 DEBUG [geotools.jdbc] - CLOSE CONNECTION
07 May 20:02:48 ERROR [geoserver.rest] - Failed to locate the input file file:///data/hop/test_mosaic
org.geoserver.rest.RestException 400 BAD_REQUEST: Failed to locate the input file file:///data/hop/test_mosaic
This was the curl
command I gave it:
curl -v -u username:password -XPOST -H "Content-type: text/plain" -d "file:///data/hop/test_mosaic" "http://localhost:8080/geoserver/rest/workspaces/chap/coveragestores/test_mosaic/external.imagemosaic"
I have verified in the docker container the data (including the regex files) all exist at /data/hop/test_mosaic
.
In our docker compose we do have this setup… I wonder if that is somehow making it go look in /opt
for our regex files even though all this line should be doing is saying that anything in /opt
should be owned by tomcat
.
CHANGE_OWNERSHIP_ON_FOLDERS="/opt"