Skip to content

Commit

Permalink
Geoserver doesn't restart with https
Browse files Browse the repository at this point in the history
Geoserver fail on https

Message from logs : 
geoserver_1       | keytool error: java.io.IOException: Keystore was tampered with, or password was incorrect
  • Loading branch information
kikislater committed Jul 11, 2019
1 parent f41c355 commit a7d2543
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions scripts/spcgeonode/geoserver/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -138,10 +138,14 @@ if [ ! -z "$HTTPS_HOST" ]; then
openssl x509 -out server.crt

# create a keystore and import certificate
keytool -import -noprompt -trustcacerts \
if [ "$(ls -A /keystore.jks)" ]; then
echo 'Keystore not empty, skipping initialization...'
else
echo 'Keystore empty, we run initialization...'
keytool -import -noprompt -trustcacerts \
-alias ${HTTPS_HOST} -file server.crt \
-keystore /keystore.jks -storepass ${PASSWORD}

fi
rm server.crt

JAVA_OPTS="$JAVA_OPTS -Djavax.net.ssl.keyStore=/keystore.jks -Djavax.net.ssl.keyStorePassword=$PASSWORD"
Expand Down

0 comments on commit a7d2543

Please sign in to comment.