geonode-project icon indicating copy to clipboard operation
geonode-project copied to clipboard

Geoserver Passwort not set on fresh install

Open t-book opened this issue 3 years ago • 3 comments

Branch 3.2.x

Start Stack on a fresh VM Set a secure password instead of default: geoserver

Passwort get's not set and invoke is showing:

Setting GeoServer Admin Password...
Response Code: 401
WARNING: GeoServer admin password *NOT* updated: code [401]
tail: invoke.log: file truncated

t-book avatar Mar 08 '21 11:03 t-book

@t-book I have also fresh docker GN 3.2.x installation and I have successfully changed admin password. As I can see by default in .env file OAUTH2_API_KEY= is blank. You should first in Geoserver in 'AuthKEY REST Role Service geonode REST role service' add REST Api Key and then add it to your .env. Try it to see if this will help.

Darkonyks avatar Mar 08 '21 12:03 Darkonyks

Thanks, I updated the OAuth2 Rest API Key (https://docs.geonode.org/en/master/install/basic/index.html#oauth2-rest-api-key) and also the admin password in the GeoServer console. Then I was able to change the OAUTH2_API_KEY and geoserver password in the .env file. It worked successfully. You need to change the geoserver password in the .env file to match the geoserver console, or else you will get an error when trying to upload a dataset in GeoNode.

d3netxer avatar May 27 '21 23:05 d3netxer

This issue makes impossible to secure GeoServer in production environments. Setting a non-trivial password requires setting it again using the GeoServer web interface, but that lasts until the container is destroyed.

frafra avatar Nov 05 '21 09:11 frafra