Skip to content

Initialize shared volume ownership#865

Open
vuilleumierc wants to merge 1 commit into
geoserver:gh-pagesfrom
vuilleumierc:init-volume-datadir-3-0
Open

Initialize shared volume ownership#865
vuilleumierc wants to merge 1 commit into
geoserver:gh-pagesfrom
vuilleumierc:init-volume-datadir-3-0

Conversation

@vuilleumierc

Copy link
Copy Markdown
Member

Set ownership of shared volumes to the user running the GeoServer services.
Otherwise the services fail on startup with the following error:

wms-1 | Caused by: java.lang.IllegalArgumentException: /opt/app/data_directory/.filelocks/resourcestore.locks is not writable
wms-1 | at org.geoserver.cloud.catalog.backend.datadir.locking.StripingFileLockProvider.<init>(StripingFileLockProvider.java:71)
wms-1 | at org.geoserver.cloud.catalog.backend.datadir.locking.DistributedFileLockProvider.<init>(DistributedFileLockProvider.java:55)
wms-1 | at org.geoserver.cloud.config.catalog.backend.datadirectory.DataDirectoryBackendConfiguration.distributedFileLockProvider(DataDirectoryBackendConfiguration.java:254)
wms-1 | at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(Unknown Source)
wms-1 | at java.base/java.lang.reflect.Method.invoke(Unknown Source)
wms-1 | at org.springframework.beans.factory.support.SimpleInstantiationStrategy.lambda$instantiate$0(SimpleInstantiationStrategy.java:155)
wms-1 | ... 82 common frames omitted

@vuilleumierc vuilleumierc requested a review from groldan June 8, 2026 14:07
@vuilleumierc vuilleumierc added the documentation Improvements or additions to documentation label Jun 8, 2026

@groldan groldan left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi Cécile, thanks for the fix, the root-owned volume problem on first startup is real and worth solving.

One blocking issue: this PR targets the gh-pages branch, which is the generated documentation site. It's published automatically by the docs workflow from the docs/ build on every push to main, hence your change would be silently overwritten the next time the docs deploy runs.

The source of truth for this file is on main at docs/src/deploy/docker-compose/dev/datadir/compose.yml. Could you retarget the PR to main and apply the change there? See docs/README.md for how the docs tree is organized (docs/src/ is the source, docs/site/ is the generated output that ends up on gh-pages).

A couple suggestions:

  • The same problem affects the sibling compose files: stable/datadir/compose.yml (same two volumes) and both pgconfig variants (their geowebcache_data volume). It would be great to fix them consistently, especially the stable one since that's what most
    users copy.
  • A non-recursive chown 1000:1000 /opt/app/data_directory /data/geowebcache should be enough: the services create everything beneath those directories as 1000:1000 themselves, and -R over a populated tile cache will get slow on every up.
  • alpine:3.18 is EOL please pin a current tag (e.g. alpine:3.22).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants