Hello,
I've got a groovy script to create repositories or update a repository if some settings have changed. For hosted repositories, this works, but with proxied repositories, stopping/starting the repo gives a NullpointerException. I also get a Warning message in the nexus-ui: Invalid state: STOPPED; allowed: [STARTED] and need to restart nexus to get rid of the message. And sometimes all repositories and blobstores seems to be vanished (but are back after restarting nexus).
Error in nexus.log:
2017-10-31 13:25:25,597+0100 ERROR [qtp800605945-33] admin org.sonatype.nexus.extdirect.internal.ExtDirectServlet - Failed to invoke action method: coreui_Repository.coreui_Repository_readStatus, java-method: org.sonatype.nexus.coreui.RepositoryComponent.readStatus
java.lang.NullPointerException: null
at org.sonatype.nexus.repository.httpclient.internal.HttpClientFacetImpl.getStatus(HttpClientFacetImpl.java:154)
at org.sonatype.nexus.common.stateguard.MethodInvocationAction.run(MethodInvocationAction.java:39)
at org.sonatype.nexus.common.stateguard.StateGuard$GuardImpl.run(StateGuard.java:270)
at org.sonatype.nexus.common.stateguard.GuardedInterceptor.invoke(GuardedInterceptor.java:53)
Even if I comment the "existingRepository.update(configuration) statement, I still get the NullPointerException.
To run the script, first provision it and then run with provided central_repo.json. First run succeeds, 2nd run should just stop and start the repository if the json file has not changed. But it gives the NullPointerException instead.
Regards,
Mariska