sonatype-nexus-community / nexus-repository-composer

Composer support for the Nexus Repository Manager (work in progress!)
Eclipse Public License 1.0
214 stars 81 forks source link

Nexus: Upload results in 500 Internal Server Error` response #81

Closed goot1 closed 3 years ago

goot1 commented 3 years ago

When upload something I get the following error

$ composer nexus-push --url https://nexus.xxxx/repository/composer-own 1.0.0 Execute the Nexus Push for the URL https://nexus.xxxx/repository/composer-own/packages/upload/koj/sswagger/1.0.0...

[GuzzleHttp\Exception\ServerException]
Server error: PUT https://nexus.xxxx/repository/composer-own/packages/upload/koj/sswagger/1.0.0 resulted in a 500 Internal Server Error response

The Serverlogs:

nexus_nexus.1.ifkz4a0ayc5e@prod3.koj-entwicklung.com    | 2020-10-02 20:29:41,360+0000 INFO  [jetty-main-1] *SYSTEM org.eclipse.jetty.server.Server - Started @34614ms
nexus_nexus.1.ifkz4a0ayc5e@prod3.koj-entwicklung.com    | 2020-10-02 20:29:41,360+0000 INFO  [jetty-main-1] *SYSTEM org.sonatype.nexus.bootstrap.jetty.JettyServer -
nexus_nexus.1.ifkz4a0ayc5e@prod3.koj-entwicklung.com    | -------------------------------------------------
nexus_nexus.1.ifkz4a0ayc5e@prod3.koj-entwicklung.com    |
nexus_nexus.1.ifkz4a0ayc5e@prod3.koj-entwicklung.com    | Started Sonatype Nexus OSS 3.28.0-01
nexus_nexus.1.ifkz4a0ayc5e@prod3.koj-entwicklung.com    |
nexus_nexus.1.ifkz4a0ayc5e@prod3.koj-entwicklung.com    | -------------------------------------------------
nexus_nexus.1.ifkz4a0ayc5e@prod3.koj-entwicklung.com    | 2020-10-02 20:30:00,012+0000 INFO  [quartz-8-thread-5] *SYSTEM org.sonatype.nexus.quartz.internal.task.QuartzTaskInfo - Task 'Storage facet cleanup' [repository.storage-facet-cleanup] state change WAITING -> RUNNIN
G
nexus_nexus.1.ifkz4a0ayc5e@prod3.koj-entwicklung.com    | 2020-10-02 20:30:00,021+0000 INFO  [quartz-8-thread-5] *SYSTEM org.sonatype.nexus.quartz.internal.task.QuartzTaskInfo - Task 'Storage facet cleanup' [repository.storage-facet-cleanup] state change RUNNING -> WAITIN
G (OK)
nexus_nexus.1.ifkz4a0ayc5e@prod3.koj-entwicklung.com    | 2020-10-02 20:34:11,957+0000 INFO  [qtp690519849-190] *UNKNOWN org.apache.shiro.session.mgt.AbstractValidatingSessionManager - Enabling session validation scheduler...
nexus_nexus.1.ifkz4a0ayc5e@prod3.koj-entwicklung.com    | 2020-10-02 20:34:11,962+0000 INFO  [qtp690519849-190] *UNKNOWN org.ehcache.jsr107.ConfigurationMerger - Configuration of cache shiro-activeSessionCache will be supplemented by template nexus-default
nexus_nexus.1.ifkz4a0ayc5e@prod3.koj-entwicklung.com    | 2020-10-02 20:34:11,965+0000 INFO  [qtp690519849-190] *UNKNOWN org.ehcache.core.EhcacheManager - Cache 'shiro-activeSessionCache' created in EhcacheManager.
nexus_nexus.1.ifkz4a0ayc5e@prod3.koj-entwicklung.com    | 2020-10-02 20:34:11,965+0000 INFO  [qtp690519849-190] *UNKNOWN org.ehcache.jsr107.Eh107CacheManager - Registering Ehcache MBean javax.cache:type=CacheConfiguration,CacheManager=file./opt/sonatype/nexus/etc/fabric/e
hcache.xml,Cache=shiro-activeSessionCache
nexus_nexus.1.ifkz4a0ayc5e@prod3.koj-entwicklung.com    | 2020-10-02 20:34:11,965+0000 INFO  [qtp690519849-190] *UNKNOWN org.ehcache.jsr107.Eh107CacheManager - Registering Ehcache MBean javax.cache:type=CacheStatistics,CacheManager=file./opt/sonatype/nexus/etc/fabric/ehca
che.xml,Cache=shiro-activeSessionCache
nexus_nexus.1.ifkz4a0ayc5e@prod3.koj-entwicklung.com    | 2020-10-02 20:34:11,973+0000 INFO  [qtp690519849-190] *UNKNOWN org.sonatype.nexus.internal.security.anonymous.AnonymousManagerImpl - Using default configuration: OrientAnonymousConfiguration{enabled=true, userId='a
nonymous', realmName='NexusAuthorizingRealm'}
nexus_nexus.1.ifkz4a0ayc5e@prod3.koj-entwicklung.com    | 2020-10-02 20:34:33,017+0000 INFO  [qtp690519849-63] admin org.sonatype.nexus.rapture.internal.security.SessionServlet - Created session for user: admin
nexus_nexus.1.ifkz4a0ayc5e@prod3.koj-entwicklung.com    | 2020-10-02 20:34:55,667+0000 INFO  [qtp690519849-193] admin org.sonatype.nexus.internal.security.anonymous.AnonymousManagerImpl - Saving configuration: OrientAnonymousConfiguration{enabled=false, userId='anonymous'
, realmName='NexusAuthorizingRealm'}
nexus_nexus.1.ifkz4a0ayc5e@prod3.koj-entwicklung.com    | 2020-10-02 20:35:21,441+0000 INFO  [qtp690519849-61] admin org.sonatype.nexus.repository.manager.internal.RepositoryManagerImpl - Creating repository: composer-own -> OrientConfiguration{repositoryName='composer-ow
n', recipeName='composer-hosted', attributes={storage={blobStoreName=default, strictContentTypeValidation=true, writePolicy=ALLOW}}}
nexus_nexus.1.ifkz4a0ayc5e@prod3.koj-entwicklung.com    | 2020-10-02 20:35:21,471+0000 INFO  [elasticsearch[8A17084F-5D15BDF6-61B480B6-BF94180A-E9A93704][clusterService#updateTask][T#1]] *SYSTEM org.elasticsearch.cluster.metadata - [8A17084F-5D15BDF6-61B480B6-BF94180A-E9A
93704] [2402c4013f3b1e1584b0abb7790689b9adeb375e] creating index, cause [api], templates [], shards [1]/[0], mappings [component]
nexus_nexus.1.ifkz4a0ayc5e@prod3.koj-entwicklung.com    | 2020-10-02 20:35:21,516+0000 INFO  [elasticsearch[8A17084F-5D15BDF6-61B480B6-BF94180A-E9A93704][clusterService#updateTask][T#1]] *SYSTEM org.elasticsearch.cluster.routing.allocation - [8A17084F-5D15BDF6-61B480B6-BF
94180A-E9A93704] Cluster health status changed from [RED] to [GREEN] (reason: [shards started [[2402c4013f3b1e1584b0abb7790689b9adeb375e][0]] ...]).
nexus_nexus.1.ifkz4a0ayc5e@prod3.koj-entwicklung.com    | 2020-10-02 20:36:24,835+0000 INFO  [periodic-7-thread-1] *SYSTEM org.sonatype.nexus.rapture.internal.HealthCheckCacheManager - Health check status changed from false to true for Default Admin Credentials
nexus_nexus.1.ifkz4a0ayc5e@prod3.koj-entwicklung.com    | 2020-10-02 20:37:25,189+0000 ERROR [qtp690519849-196] *SYSTEM org.sonatype.nexus.internal.web.ErrorPageServlet - Unexpected exception
nexus_nexus.1.ifkz4a0ayc5e@prod3.koj-entwicklung.com    | java.lang.NoSuchMethodError: org.sonatype.nexus.repository.storage.StorageFacet.createTempBlob(Lorg/sonatype/nexus/repository/view/Payload;Ljava/lang/Iterable;)Lorg/sonatype/nexus/repository/storage/TempBlob;
nexus_nexus.1.ifkz4a0ayc5e@prod3.koj-entwicklung.com    |       at org.sonatype.nexus.repository.composer.internal.ComposerContentFacetImpl.put(ComposerContentFacetImpl.java:100)
nexus_nexus.1.ifkz4a0ayc5e@prod3.koj-entwicklung.com    |       at org.sonatype.nexus.repository.composer.internal.ComposerHostedFacetImpl.upload(ComposerHostedFacetImpl.java:56)
nexus_nexus.1.ifkz4a0ayc5e@prod3.koj-entwicklung.com    |       at org.sonatype.nexus.transaction.TransactionalWrapper.proceedWithTransaction(TransactionalWrapper.java:57)
nexus_nexus.1.ifkz4a0ayc5e@prod3.koj-entwicklung.com    |       at org.sonatype.nexus.transaction.TransactionInterceptor.proceedWithTransaction(TransactionInterceptor.java:66)
nexus_nexus.1.ifkz4a0ayc5e@prod3.koj-entwicklung.com    |       at org.sonatype.nexus.transaction.TransactionInterceptor.invoke(TransactionInterceptor.java:55)
nexus_nexus.1.ifkz4a0ayc5e@prod3.koj-entwicklung.com    |       at org.sonatype.nexus.repository.composer.internal.ComposerHostedUploadHandler.handle(ComposerHostedUploadHandler.java:53)
nexus_nexus.1.ifkz4a0ayc5e@prod3.koj-entwicklung.com    |       at org.sonatype.nexus.repository.view.Context.proceed(Context.java:86)
nexus_nexus.1.ifkz4a0ayc5e@prod3.koj-entwicklung.com    |       at org.sonatype.nexus.repository.storage.UnitOfWorkHandler.handle(UnitOfWorkHandler.java:39)
nexus_nexus.1.ifkz4a0ayc5e@prod3.koj-entwicklung.com    |       at org.sonatype.nexus.repository.view.Context.proceed(Context.java:86)
nexus_nexus.1.ifkz4a0ayc5e@prod3.koj-entwicklung.com    |       at org.sonatype.nexus.repository.view.handlers.ContentHeadersHandler.handle(ContentHeadersHandler.java:46)
nexus_nexus.1.ifkz4a0ayc5e@prod3.koj-entwicklung.com    |       at org.sonatype.nexus.repository.view.Context.proceed(Context.java:86)
nexus_nexus.1.ifkz4a0ayc5e@prod3.koj-entwicklung.com    |       at org.sonatype.nexus.repository.http.PartialFetchHandler.handle(PartialFetchHandler.java:59)
nexus_nexus.1.ifkz4a0ayc5e@prod3.koj-entwicklung.com    |       at org.sonatype.nexus.repository.view.Context.proceed(Context.java:86)
nexus_nexus.1.ifkz4a0ayc5e@prod3.koj-entwicklung.com    |       at org.sonatype.nexus.repository.view.handlers.ConditionalRequestHandler.handle(ConditionalRequestHandler.java:72)
nexus_nexus.1.ifkz4a0ayc5e@prod3.koj-entwicklung.com    |       at org.sonatype.nexus.repository.view.Context.proceed(Context.java:86)
nexus_nexus.1.ifkz4a0ayc5e@prod3.koj-entwicklung.com    |       at com.sonatype.nexus.clm.internal.orient.FirewallContributedHandler.handle(FirewallContributedHandler.java:101)
nexus_nexus.1.ifkz4a0ayc5e@prod3.koj-entwicklung.com    |       at org.sonatype.nexus.repository.view.Context.proceed(Context.java:86)
nexus_nexus.1.ifkz4a0ayc5e@prod3.koj-entwicklung.com    |       at org.sonatype.nexus.repository.view.handlers.HandlerContributor.handle(HandlerContributor.java:67)
nexus_nexus.1.ifkz4a0ayc5e@prod3.koj-entwicklung.com    |       at org.sonatype.nexus.repository.view.Context.proceed(Context.java:86)
nexus_nexus.1.ifkz4a0ayc5e@prod3.koj-entwicklung.com    |       at org.sonatype.nexus.repository.view.handlers.ExceptionHandler.handle(ExceptionHandler.java:42)
nexus_nexus.1.ifkz4a0ayc5e@prod3.koj-entwicklung.com    |       at org.sonatype.nexus.repository.view.Context.proceed(Context.java:86)
nexus_nexus.1.ifkz4a0ayc5e@prod3.koj-entwicklung.com    |       at org.sonatype.nexus.repository.security.SecurityHandler.handle(SecurityHandler.java:51)
nexus_nexus.1.ifkz4a0ayc5e@prod3.koj-entwicklung.com    |       at org.sonatype.nexus.repository.view.Context.proceed(Context.java:86)
nexus_nexus.1.ifkz4a0ayc5e@prod3.koj-entwicklung.com    |       at org.sonatype.nexus.repository.view.Context$proceed.call(Unknown Source)
nexus_nexus.1.ifkz4a0ayc5e@prod3.koj-entwicklung.com    |       at org.sonatype.nexus.repository.composer.internal.ComposerRecipeSupport$_closure1.doCall(ComposerRecipeSupport.groovy:110)
nexus_nexus.1.ifkz4a0ayc5e@prod3.koj-entwicklung.com    |       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

COPY nexus-repository-composer-0.0.7-bundle.kar /opt/sonatype/nexus/deploy/

COPY nexus-repository-composer-0.0.8-bundle.kar /opt/sonatype/nexus/deploy/

----

Stack-Deployment:

version: "3.1" services: nexus:

image: sonatype/nexus3

image: registry.swarm.xxxx:5443/nexus3composer
#image: sonatype/nexus:oss
volumes:
  - artifactory5_data:/nexus-data
networks:
  - traefik-public
deploy:
  labels:
    - traefik.enable=true
    - traefik.docker.network=traefik-public
    - traefik.constraint-label=traefik-public
    - traefik.http.routers.nexus-http.rule=Host(`${DOMAIN?Variable not set}`)
    - traefik.http.routers.nexus-http.entrypoints=http
    - traefik.http.routers.nexus-http.middlewares=https-redirect
    - traefik.http.routers.nexus-https.rule=Host(`${DOMAIN?Variable not set}`)
    - traefik.http.routers.nexus-https.entrypoints=https
    - traefik.http.routers.nexus-https.tls=true
    - traefik.http.routers.nexus-https.tls.certresolver=le
    - traefik.http.services.nexus.loadbalancer.server.port=8081
  placement:
    constraints:
      - node.role == manager

networks: traefik-public: external: true

volumes: artifactory5_data: driver: local driver_opts: type: nfs4 o: "addr=127.0.0.1" device: ":/nexus/data"



Nexus-Konfiguration:
![Unbenannt](https://user-images.githubusercontent.com/29673369/94968069-88e85b00-0500-11eb-922c-582b1d3dd28d.png)

----
dooleydiligent commented 3 years ago

Same error for me - also on Sonatype Nexus OSS 3.28.0-01 Have tried with .kar versions 0.0.5 thru 0.0.8 and even built 0.0.9 from source but all ended up with the same NoSuchMethod exception.

ihard commented 3 years ago

In version 3.28, composer-proxy also broke down (the 500th error).

aornatovskyy commented 3 years ago

@goot1 @ihard @dooleydiligent Hi! Can someone check the latest composer? link if everything is ok. we will close the issue.

ihard commented 3 years ago

@aornatovskyy All works, thank you!

boniek83 commented 3 years ago

@aornatovskyy Works for me as well. Thanks!

aornatovskyy commented 3 years ago

Thanks, guys! Going to close an issue.