Comments (9)
Hi,
I experience the same behavior as @Ja-Woj, but on v2.23.1.
To add more information to the issue, the root cause of Premature end of file error is that the users.xml located in data_dir/security/usergroup/default/ is empty. If i restore the content of this file to default, i can start successfully the container.
Our scenario to reproduce the bug:
- start the container
- add a user with the admin panel
at this point, users.xml looks like this :
<?xml version="1.0" encoding="UTF-8"?><userRegistry xmlns="http://www.geoserver.org/security/users" version="1.0">
<users>
<user enabled="true" name="admin" password="digest1:password_placeholder"/>
<user enabled="true" name="test" password="digest1:password_placeholder"/>
</users>
<groups/>
</userRegistry>
- restart the container
at this point, admin panel is not accessible anymore, and the users.xml file is empty
from docker-geoserver.
Have you tried without specifying any plugins at all? Note that the majority if not all test in https://github.com/kartoza/docker-geoserver/tree/develop/scenario_tests run without plugins except the clustering
from docker-geoserver.
@NyakudyaA I work with OP on problem he described, and since he's offline now I took liberty of testing this scenario without specifying any plugins, result it the same "Fatal error premature end of file"
EDIT Also if I am correct in tests you've send link to, you are stopping container and starting it again. In scenario we provided, we need to delete container and create it from scratch, only thing left should be volume ( or if working on k8s PVC)
EDIT2 Maybe its worth mentioning, same scenario worked fine on version 2.21.1
from docker-geoserver.
@NyakudyaA I confirm that the same result occurs without any plugins.
It is crucial to recreate container in this scenario. This is reproducion of scenario that happens on kuberenetes cluster. You cannot stop and then start the same container . Kubernetes scheduler will always spin up a new pod with a new instance of container but it will use the same volume. Typical scenario when it can happen are - kuberenetes cluster upgrade, rescheduling geoserver pod on a new k8s worker node, geoserver deployment upgrade.
from docker-geoserver.
@Ja-Woj cc @JakubBakowski This works locally on my docker-compose setup, we could also add this to the tests #586
for now, this works on a clean environment using docker-compose.yml
Maybe this concerns how you are mounting your volume in Kubernetes and what storage class you are using. Does it fully support the chown
and are all the files owned by the correct users?
from docker-geoserver.
from docker-geoserver.
Hi @NyakudyaA
Thanks for reply but I am not sure wheter you reproduced full scenerio, precisely point 3.
delete container and run docker compose up again (it will create a new container) Make sure you run a new container , not starting exising one
So please execute :
- docker stop 6b85n24de81
- docker rm 6b8c65461ff7
- docker compose up
I believe this should reproduce this failure
Maybe this concerns how you are mounting your volume in Kubernetes and what storage class you are using. Does it fully support the chown and are all the files owned by the correct users?
We verified that all files are owned by the correct user group in k8s
from docker-geoserver.
I think what could be causing this is that the users are most likely being created at each restart,
Can you try to set the env
EXISTING_DATA_DIR=TRUE
Before you restart your container. This should allow reset logic to be skipped1
from docker-geoserver.
@Ja-Woj cc @jeremypioche I managed to replicate this. The issue is caused by the location of the lockfile which the password script looks for. It currently defaults to https://github.com/kartoza/docker-geoserver/blob/develop/scripts/update_passwords.sh#L18
which in Kubernetes is not persistent by it's nature because each time a container restart it will delete settings. There are two solutions here
- Set an extra env variable and a volume to manage lockflie persistence:
-e EXTRA_CONFIG_DIR=/settings
then mount a volume to this path
-v settings:/settings
- Run your container and when it is up and running, update your env variables to add
EXISTING_DATA_DIR=TRUE
Maybe we just need to be more verbose about this in the README
from docker-geoserver.
Related Issues (20)
- Missing community plugins HOT 2
- In Cluster setup, broker goes into infinite loop of logs HOT 2
- Can't get it to run on Colima HOT 9
- Unable to set FILTER_COMPLIANCE property in Web Feature Server store through REST api HOT 5
- support for 2.24.1 HOT 4
- GeoServer Pod Restart Failure with Thread Local Errors in Kubernetes Environment HOT 1
- Not possible anymore to run as non-root HOT 12
- roles.xml & roles.xml.orig down to 0 bytes HOT 1
- Geoserver Cluster on AWS ECS not working HOT 9
- Dockerfile STABLE_EXTENSION gdal error ->Plugin URL does not exist:: https://sourceforge.net/projects/geoserver/files/GeoServer/2.24.1/extensions/geoserver-2.24.1-gdal.zip HOT 1
- gdal stable extension support needed. HOT 5
- random start-up crash HOT 10
- XFRAME_OPTIONS does not work as expected. HOT 1
- [geoserver.monitor] - Request Dumper exiting due to :Permission denied
- crash at start on arm64 HOT 1
- After crashing I couldn't run again HOT 2
- Write a security policy / nominate security contacts HOT 5
- validate_url and download_extension request every URL twice, and don't re-use connections, making builds really slow HOT 3
- Update base image to new image HOT 4
- GWC error "Problem communicating with GeoServer" HOT 13
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from docker-geoserver.