0

I've successfully built and installed the Nexus blobstore-google-cloud plugin, taken from the latest versions in the master branch for that plugin in github. It's installed in Nexus 3.15.2, running on a GCP hosted VM. The service account associated with the VM has been granted Project Admin role, simply to rule out permissions being the cause of the problem we're seeing. Using the gcloud util I extracted the key file for this service account, and have set the GOOGLE_APPLICATION_CREDENTIALS variable to point to it. The GCP project has the storage and datastore APIs enabled, and a datastore DB created.

When I go through the Web UI, logged in as the default admin user, and try to create the Google Blobstore, I enter a name for the blobstore, the name of the bucket I want it to use, and path to the JSON keyfile. This results in a popup saying

"DANGER: org.sonatype.nexus.blobstore.AccumulatingBlobStoreMetrics.<init>(JJJZ)V"

This is all the popup gives. Looking in the nexus log file I see a trace

2019-02-05 16:14:57,179+0000 INFO  [qtp388567085-41]  admin org.sonatype.nexus.blobstore.gcloud.internal.GoogleCloudBlobStoreMetricsStore - Blob store metrics file GoogleCloudPropertiesFile{key=503C640E-3D9DB697-52F06C80-C51BBC0D-94D378F5-metrics.properties} not found - initializing at zero.
2019-02-05 16:14:57,439+0000 ERROR [qtp388567085-41]  admin org.sonatype.nexus.extdirect.internal.ExtDirectExceptionHandler - Failed to invoke action method: coreui_Blobstore.create, java-method: org.sonatype.nexus.coreui.BlobStoreComponent.create
java.lang.NoSuchMethodError: org.sonatype.nexus.blobstore.AccumulatingBlobStoreMetrics.<init>(JJJZ)V
        at org.sonatype.nexus.blobstore.gcloud.internal.GoogleCloudBlobStoreMetricsStore.getCombinedMetrics(GoogleCloudBlobStoreMetricsStore.java:136)
        at org.sonatype.nexus.blobstore.gcloud.internal.GoogleCloudBlobStoreMetricsStore.getMetrics(GoogleCloudBlobStoreMetricsStore.java:132)
        at org.sonatype.nexus.common.stateguard.MethodInvocationAction.run(MethodInvocationAction.java:39)
        at org.sonatype.nexus.common.stateguard.StateGuard$GuardImpl.run(StateGuard.java:272)
        at org.sonatype.nexus.common.stateguard.GuardedInterceptor.invoke(GuardedInterceptor.java:53)
        at org.sonatype.nexus.blobstore.gcloud.internal.GoogleCloudBlobStore.getMetrics(GoogleCloudBlobStore.java:318)
        at org.sonatype.nexus.common.stateguard.MethodInvocationAction.run(MethodInvocationAction.java:39)
        at org.sonatype.nexus.common.stateguard.StateGuard$GuardImpl.run(StateGuard.java:272)
        at org.sonatype.nexus.common.stateguard.GuardedInterceptor.invoke(GuardedInterceptor.java:53)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:98)
        at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325)
        at org.codehaus.groovy.runtime.metaclass.MethodMetaProperty$GetBeanMethodMetaProperty.getProperty(MethodMetaProperty.java:76)
@                                                                                                                   

In the instance above I was pointing at an already existing GCP bucket, however I get the same when I allow the plugin to create its own bucket.

I've also tried this test with and without env var GOOGLE_APPLICATION_CREDENTIALS set, and with that set but leaving the path to the key file set and unset, it doesn't appear to make any difference.

I've run the plugins integration tests, they all pass. I can see folders being created within the GCP bucket by Nexus, so it appears able to access it, but the blobstore never appears in the blobstores list.

Does anyone have any ideas to help trace down the fault?

Thanks

  • For the benefit of any reading this, the root cause was that I was not using the master version of the plugin, but instead tag 0.3.0. Switching to latest master and this fault goes away. I did try 0.3.0 with Nexus 3.13 and all newer versions, without success. – Steven Edgar Feb 06 '19 at 11:45
  • Support for Nexus Repository Manager 3.15 was just merged this past week, be sure to update to the 0.4.0 release. Thanks! – nblair Mar 09 '19 at 14:29

0 Answers0