sonatype-nexus-community / nexus-blobstore-google-cloud

Nexus Repository Manager Blobstore backed by Google Cloud Storage
https://help.sonatype.com/en/configuring-blob-stores.html#google-cloud-blob-store
Eclipse Public License 1.0
39 stars 16 forks source link

DatastoreException when uploading artifact #19

Closed tsbatista closed 5 years ago

tsbatista commented 5 years ago
com.google.cloud.datastore.DatastoreException: The project XXX does not exist or it does not contain an active Cloud Datastore or Cloud Firestore database. Please visit http://console.cloud.google.com to create a project or https://console.cloud.google.com/datastore/setup?project=XXX to add a Cloud Datastore or Cloud Firestore database. Note that Cloud Datastore or Cloud Firestore always have an associated App Engine app and this app must not be disabled.
    at com.google.cloud.datastore.spi.v1.HttpDatastoreRpc.translate(HttpDatastoreRpc.java:129)
    at com.google.cloud.datastore.spi.v1.HttpDatastoreRpc.commit(HttpDatastoreRpc.java:155)
    at com.google.cloud.datastore.DatastoreImpl$4.call(DatastoreImpl.java:485)
    at com.google.cloud.datastore.DatastoreImpl$4.call(DatastoreImpl.java:482)
    at com.google.api.gax.retrying.DirectRetryingExecutor.submit(DirectRetryingExecutor.java:89)
    at com.google.cloud.RetryHelper.run(RetryHelper.java:74)
    at com.google.cloud.RetryHelper.runWithRetries(RetryHelper.java:51)
    at com.google.cloud.datastore.DatastoreImpl.commit(DatastoreImpl.java:481)
    at com.google.cloud.datastore.DatastoreImpl.commitMutation(DatastoreImpl.java:475)
    at com.google.cloud.datastore.DatastoreImpl.delete(DatastoreImpl.java:460)
    at org.sonatype.nexus.blobstore.gcloud.internal.DeletedBlobIndex.remove(DeletedBlobIndex.java:62)
    at org.sonatype.nexus.blobstore.gcloud.internal.GoogleCloudBlobStore.deleteHard(GoogleCloudBlobStore.java:304)
    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.repository.storage.TempBlob.close(TempBlob.java:86)
    at org.sonatype.nexus.repository.maven.internal.MavenFacetImpl.put(MavenFacetImpl.java:203)
    at org.sonatype.nexus.repository.maven.internal.hosted.HostedHandler.doPut(HostedHandler.java:92)
    <removed a lot on non interesting stack trace here> 
    at java.lang.Thread.run(Thread.java:748)
Caused by: com.google.datastore.v1.client.DatastoreException: The project XXX does not exist or it does not contain an active Cloud Datastore or Cloud Firestore database. Please visit http://console.cloud.google.com to create a project or https://console.cloud.google.com/datastore/setup?project=XXX to add a Cloud Datastore or Cloud Firestore database. Note that Cloud Datastore or Cloud Firestore always have an associated App Engine app and this app must not be disabled.
    at com.google.datastore.v1.client.RemoteRpc.makeException(RemoteRpc.java:226)
    at com.google.datastore.v1.client.RemoteRpc.makeException(RemoteRpc.java:275)
    at com.google.datastore.v1.client.RemoteRpc.call(RemoteRpc.java:186)
    at com.google.datastore.v1.client.Datastore.commit(Datastore.java:87)
    at com.google.cloud.datastore.spi.v1.HttpDatastoreRpc.commit(HttpDatastoreRpc.java:153)
    ... 130 common frames omitted

well, to use nexus at all we need to be able to upload artifacts

Id say this is most likely a documentation bug, you do not state that this service is required in the README, how much data to expect there, nor how to set it up permission wise.

While I have your attention... Should I go for a datastore or a firestore account? when visiting the suggested URL thats the first question google asks and I have no idea if they are API compatible.

nblair commented 5 years ago

Thanks for opening this! It's true, you do need access to Datastore for the blobstore to be able to track the ids of blobs that have been "soft-deleted" (for eventual async reaping).

This is definitely a documentation bug, I admit we could use some improvements on listing the access needed. I'll see what I can add today, suggestions/ideas welcome.