'nexus not accepting metadata file upload from maven
I setup a docker nexus with this docker-compose.yml:
version: "3"
services:
nexus:
restart: always
image: sonatype/nexus3
container_name: nexus
volumes:
- "nexus-data:/nexus-data"
- "nexus-work:/sonatype-work"
ports:
- "8070:8081"
networks:
- frontproxy_default
environment:
- VIRTUAL_PORT=8081
- VIRTUAL_HOST=nexus.kreth-development.de
- LETSENCRYPT_HOST=nexus.kreth-development.de
- [email protected]
volumes:
nexus-data:
driver: local
driver_opts:
type: none
device: /mnt/storagespace/nexus/data
o: bind
nexus-work:
driver: local
driver_opts:
type: none
device: /mnt/storagespace/nexus/work
o: bind
repo_org_github:
driver: local
driver_opts:
type: none
device: /mnt/storagespace/nexus/repo_org_github
o: bind
nexus-etc:
driver: local
driver_opts:
type: none
device: /mnt/storagespace/nexus/conf/etc
o: bind
networks:
frontproxy_default:
external: true
I defined a user with nx-repository-view---* Privilege (and one with admim).
With mvn deploy -DskipTests -D"maven.install.skip"=true I get this error:
Downloading from nexus-snapshots: https://nexus.kreth-development.de/repository/maven-snapshots/de/kreth/clubhelper/clubhelper.parent/0.3.1-SNAPSHOT/maven-metadata.xml
Uploading to nexus-snapshots: https://nexus.kreth-development.de/repository/maven-snapshots/de/kreth/clubhelper/clubhelper.parent/0.3.1-SNAPSHOT/clubhelper.parent-0.3.1-20220427.210030-1.pom
Uploaded to nexus-snapshots: https://nexus.kreth-development.de/repository/maven-snapshots/de/kreth/clubhelper/clubhelper.parent/0.3.1-SNAPSHOT/clubhelper.parent-0.3.1-20220427.210030-1.pom (5.0 kB at 5.0 kB/s)
Downloading from nexus-snapshots: https://nexus.kreth-development.de/repository/maven-snapshots/de/kreth/clubhelper/clubhelper.parent/maven-metadata.xml
Uploading to nexus-snapshots: https://nexus.kreth-development.de/repository/maven-snapshots/de/kreth/clubhelper/clubhelper.parent/0.3.1-SNAPSHOT/maven-metadata.xml
Uploading to nexus-snapshots: https://nexus.kreth-development.de/repository/maven-snapshots/de/kreth/clubhelper/clubhelper.parent/maven-metadata.xml
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.8.2:deploy (default-deploy) on project clubhelper.parent: Failed to deploy metadata: Could not transfer metadata de.kreth.clubhelper:clubhelper.parent:0.3.1-SNAPSHOT/maven-metadata.xml from/to nexus-snapshots (https://nexus.kreth-development.de/repository/maven-snapshots/): transfer failed for https://nexus.kreth-development.de/repository/maven-snapshots/de/kreth/clubhelper/clubhelper.parent/0.3.1-SNAPSHOT/maven-metadata.xml, status: 500 Server Error -> [Help 1]
The nexus logs shows this:
2022-04-27 20:07:20,683+0000 WARN [qtp186251445-1145] markus org.sonatype.nexus.repository.httpbridge.internal.ViewServlet - Failure servicing: PUT /repository/maven-snapshots/de/kreth/clubhelper/clubhelper.parent/maven-metadata.xml
com.orientechnologies.orient.core.exception.OStorageException: Cannot put key value entry in index
DB name="component"
at com.orientechnologies.orient.core.storage.impl.local.OAbstractPaginatedStorage.doUpdateIndexEntry(OAbstractPaginatedStorage.java:2422)
at com.orientechnologies.orient.core.storage.impl.local.OAbstractPaginatedStorage.updateIndexEntry(OAbstractPaginatedStorage.java:2308)
at com.orientechnologies.orient.core.index.OIndexMultiValues.put(OIndexMultiValues.java:187)
at com.orientechnologies.orient.core.index.OIndexMultiValues.put(OIndexMultiValues.java:44)
at com.orientechnologies.orient.core.index.OIndexAbstract.putInSnapshot(OIndexAbstract.java:956)
at com.orientechnologies.orient.core.index.OIndexAbstract.applyIndexTxEntry(OIndexAbstract.java:790)
at com.orientechnologies.orient.core.index.OIndexAbstract.addTxOperation(OIndexAbstract.java:764)
at com.orientechnologies.orient.core.storage.impl.local.OAbstractPaginatedStorage.commitIndexes(OAbstractPaginatedStorage.java:1904)
at com.orientechnologies.orient.core.storage.impl.local.OAbstractPaginatedStorage.commit(OAbstractPaginatedStorage.java:1861)
at com.orientechnologies.orient.core.tx.OTransactionOptimistic.doCommit(OTransactionOptimistic.java:541)
at com.orientechnologies.orient.core.tx.OTransactionOptimistic.commit(OTransactionOptimistic.java:99)
at com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx.commit(ODatabaseDocumentTx.java:2908)
at com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx.commit(ODatabaseDocumentTx.java:2870)
at org.sonatype.nexus.repository.storage.StorageTxImpl.commit(StorageTxImpl.java:196)
at sun.reflect.GeneratedMethodAccessor272.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.sonatype.nexus.common.stateguard.SimpleMethodInvocation.proceed(SimpleMethodInvocation.java:53)
at org.sonatype.nexus.common.stateguard.MethodInvocationAction.run(MethodInvocationAction.java:39)
at org.sonatype.nexus.common.stateguard.StateGuard$TransitionImpl.run(StateGuard.java:193)
at org.sonatype.nexus.common.stateguard.TransitionsInterceptor.invoke(TransitionsInterceptor.java:57)
at org.sonatype.nexus.common.stateguard.StateGuardAspect$1.invoke(StateGuardAspect.java:66)
at com.sun.proxy.$Proxy222.commit(Unknown Source)
at org.sonatype.nexus.transaction.TransactionalWrapper.proceedWithTransaction(TransactionalWrapper.java:69)
at org.sonatype.nexus.transaction.TransactionInterceptor.proceedWithTransaction(TransactionInterceptor.java:66)
at org.sonatype.nexus.transaction.TransactionInterceptor.invoke(TransactionInterceptor.java:55)
at org.sonatype.nexus.repository.maven.internal.orient.MavenFacetImpl.put(MavenFacetImpl.java:324)
at org.sonatype.nexus.repository.maven.internal.hosted.HostedHandler.doPut(HostedHandler.java:91)
at org.sonatype.nexus.repository.maven.internal.hosted.HostedHandler.handle(HostedHandler.java:63)
at org.sonatype.nexus.repository.view.Context.proceed(Context.java:88)
at org.sonatype.nexus.repository.storage.LastDownloadedHandler.handle(LastDownloadedHandler.java:59)
******************************
[SNIP]
******************************
at org.sonatype.nexus.repository.view.handlers.TimingHandler.handle(TimingHandler.java:58)
at org.sonatype.nexus.repository.view.Context.proceed(Context.java:88)
at org.sonatype.nexus.repository.view.Context.start(Context.java:179)
at org.sonatype.nexus.repository.view.Router.dispatch(Router.java:65)
at org.sonatype.nexus.repository.view.ConfigurableViewFacet.dispatch(ConfigurableViewFacet.java:52)
at org.sonatype.nexus.repository.view.ConfigurableViewFacet.dispatch(ConfigurableViewFacet.java:43)
at org.sonatype.nexus.repository.httpbridge.internal.ViewServlet.dispatchAndSend(ViewServlet.java:213)
at org.sonatype.nexus.repository.httpbridge.internal.ViewServlet.doService(ViewServlet.java:175)
at org.sonatype.nexus.repository.httpbridge.internal.ViewServlet.service(ViewServlet.java:127)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
at com.google.inject.servlet.ServletDefinition.doServiceImpl(ServletDefinition.java:290)
at com.google.inject.servlet.ServletDefinition.doService(ServletDefinition.java:280)
at com.google.inject.servlet.ServletDefinition.service(ServletDefinition.java:184)
at com.google.inject.servlet.DynamicServletPipeline.service(DynamicServletPipeline.java:71)
at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:85)
at org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:112)
******************************
[SNIP]
******************************
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:883)
at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:1034)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.NullPointerException: null
at com.orientechnologies.orient.core.db.record.ridbag.sbtree.OIndexRIDContainerSBTree.<init>(OIndexRIDContainerSBTree.java:72)
at com.orientechnologies.orient.core.db.record.ridbag.sbtree.OIndexRIDContainer.convertToSbTree(OIndexRIDContainer.java:248)
at com.orientechnologies.orient.core.db.record.ridbag.sbtree.OIndexRIDContainer.checkTopThreshold(OIndexRIDContainer.java:219)
at com.orientechnologies.orient.core.db.record.ridbag.sbtree.OIndexRIDContainer.add(OIndexRIDContainer.java:158)
at com.orientechnologies.orient.core.db.record.ridbag.sbtree.OIndexRIDContainer.add(OIndexRIDContainer.java:45)
at com.orientechnologies.orient.core.index.OIndexMultiValues$1.call(OIndexMultiValues.java:179)
at com.orientechnologies.orient.core.storage.impl.local.OAbstractPaginatedStorage.doUpdateIndexEntry(OAbstractPaginatedStorage.java:2404)
... 144 common frames omitted
2022-04-27 20:08:45,540+0000 INFO [SessionValidationThread-1] *UNKNOWN org.apache.shiro.session.mgt.AbstractValidatingSessionManager - Validating all active sessions...
2022-04-27 20:08:45,542+0000 INFO [SessionValidationThread-1] *UNKNOWN org.apache.shiro.session.mgt.AbstractValidatingSessionManager - Finished session validation. No sessions were stopped.
2022-04-27 20:10:00,011+0000 INFO [quartz-9-thread-20] *SYSTEM org.sonatype.nexus.quartz.internal.task.QuartzTaskInfo - Task 'Storage facet cleanup' [repository.storage-facet-cleanup] state change WAITING -> RUNNING
2022-04-27 20:10:00,022+0000 INFO [quartz-9-thread-20] *SYSTEM org.sonatype.nexus.quartz.internal.task.QuartzTaskInfo - Task 'Storage facet cleanup' [repository.storage-facet-cleanup] state change RUNNING -> WAITING (OK)
I tried with all Privileges and repaired the database following
https://issues.sonatype.org/browse/NEXUS-18036
I successfully tried a manual upload via Web Ui to the release Repository to proove it's no disk space problem. This is not possible to the snapshot repository, as I learned.
This is the relevant section in my nginx default.conf:
server {
server_name nexus.kreth-development.de;
listen 443 ssl http2 ;
access_log /var/log/nginx/access.log vhost;
ssl_session_timeout 5m;
ssl_session_cache shared:SSL:50m;
ssl_session_tickets off;
ssl_certificate /etc/nginx/certs/nexus.kreth-development.de.crt;
ssl_certificate_key /etc/nginx/certs/nexus.kreth-development.de.key;
ssl_dhparam /etc/nginx/certs/nexus.kreth-development.de.dhparam.pem;
ssl_stapling on;
ssl_stapling_verify on;
ssl_trusted_certificate /etc/nginx/certs/nexus.kreth-development.de.chain.pem;
add_header Strict-Transport-Security "max-age=31536000" always;
include /etc/nginx/vhost.d/default;
location / {
proxy_pass http://nexus.kreth-development.de;
}
}
What are possible causes for this error? What can I do to solve this?
Any suggestions are appreciated. Thanks.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|