kartoza / docker-geoserver

A docker recipe for GeoServer
GNU General Public License v2.0
628 stars 423 forks source link

Clearing users.xml while creating user #664

Closed deenu2 closed 5 months ago

deenu2 commented 5 months ago

What is the bug or the crash?

I have deployed the geoserver in Kubernetes and whenever I create a user it clear the users.xml file as it will be empty and geoserver will start crashing due to that. I have configured EFS volume for persistent storage.

Steps to reproduce the issue

deployed the geoserver in EKS cluster with EFS storage for persistence storage, created a user and if the geoserver pod restart it will clear the users.xml file.

Versions

2.25.0

Additional context

I have faced the same issue in 2.22.1 version as well

NyakudyaA commented 5 months ago

What do you mean when you say create a user, through the UI or on startup with env variables?

deenu2 commented 5 months ago

once geoserver is up and running I logged in and created a new user using the UI and after that if I restart the pod facing the issue image

NyakudyaA commented 5 months ago

You need to add a persistent mount like

-v settings:/settings

Because in Kubernetes, restarting a pod, recreates a new container with new params whilst in docker-compose a restart is different as it just restarts the running instance

deenu2 commented 5 months ago

Thank you for the solution it worked