Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

geoserver re-run fails trying to change they previously changed password #556

Open
vjrj opened this issue Mar 18, 2022 · 0 comments
Open

Comments

@vjrj
Copy link
Collaborator

vjrj commented Mar 18, 2022

This geoserver task works well initially:

- name: change root password
  uri:
    url: "{{ geoserver_url }}/rest/security/masterpw"
    method: "PUT"
    user: 'admin'
    password: 'geoserver'
    force_basic_auth: yes
    body: '{ "oldMasterPassword": "geoserver", "newMasterPassword": "{{ geoserver_password }}" }'
    status_code: 200
    body_format: json
  when: geoserver_password != "geoserver"
  tags:
    - password
    - geoserver

But repeating the install of spatial fails because oldMasterPassword is not geoserver as we changed it in the first run.

As a result geoserver does not start and the spatial playbook does not ends correctly.

Workaround, skip password tag.

Adding:

  ignore_errors: yes

does not work because the task is executed and later geoserver does not start with:

18-Mar-2022 08:05:22.400 SEVERE [espacial-es.l-a.site-startStop-1] org.apache.catalina.core.StandardContext.listenerStart Exception sending context initialized event to listener instance of class [org.geoserver.platform.GeoServerContextLoaderListener]
 org.springframework.beans.factory.BeanCreationException: Error occured reading security configuration; nested exception is java.io.IOException: Keystore was tampered with, or password was incorrect
        at org.geoserver.security.GeoServerSecurityManager.reload(GeoServerSecurityManager.java:434)
        at org.geoserver.security.GeoServerSecurityManager.onApplicationEvent(GeoServerSecurityManager.java:368)
        at org.springframework.context.event.SimpleApplicationEventMulticaster.doInvokeListener(SimpleApplicationEventMulticaster.java:172)
        at org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:165)
        at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:139)
        at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:393)
        at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:347)
        at org.geoserver.platform.GeoServerContextLoaderListener.contextInitialized(GeoServerContextLoaderListener.java:25)
        at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4770)
        at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5236)
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
        at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:754)
        at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:730)
        at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:734)
        at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:980)
        at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1852)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
        at java.lang.Thread.run(Thread.java:748)
Caused by: java.io.IOException: Keystore was tampered with, or password was incorrect

and the typical:

FAILED - RETRYING: wait for geoserver to come up (is espacial-es.l-a.site in /etc/hosts?) (113 retries left).
FAILED - RETRYING: wait for geoserver to come up (is espacial-es.l-a.site in /etc/hosts?) (112 retries left).
FAILED - RETRYING: wait for geoserver to come up (is espacial-es.l-a.site in /etc/hosts?) (111 retries left).
FAILED - RETRYING: wait for geoserver to come up (is espacial-es.l-a.site in /etc/hosts?) (110 retries left).
FAILED - RETRYING: wait for geoserver to come up (is espacial-es.l-a.site in /etc/hosts?) (109 retries left).
FAILED - RETRYING: wait for geoserver to come up (is espacial-es.l-a.site in /etc/hosts?) (108 retries left).
FAILED - RETRYING: wait for geoserver to come up (is espacial-es.l-a.site in /etc/hosts?) (107 retries left).
FAILED - RETRYING: wait for geoserver to come up (is espacial-es.l-a.site in /etc/hosts?) (106 retries left).
FAILED - RETRYING: wait for geoserver to come up (is espacial-es.l-a.site in /etc/hosts?) (105 retries left).
FAILED - RETRYING: wait for geoserver to come up (is espacial-es.l-a.site in /etc/hosts?) (104 retries left).
FAILED - RETRYING: wait for geoserver to come up (is espacial-es.l-a.site in /etc/hosts?) (103 retries left).
FAILED - RETRYING: wait for geoserver to come up (is espacial-es.l-a.site in /etc/hosts?) (102 retries left).
FAILED - RETRYING: wait for geoserver to come up (is espacial-es.l-a.site in /etc/hosts?) (101 retries left).

the workaround in this case in new LA portals is to remove /data/geoserver.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant