PatrickRoumanoff / nexus-crowd-plugin

Sonatype Nexus plugin for Atlassian Crowd integration
http://patrickroumanoff.github.io/nexus-crowd-plugin/
40 stars 20 forks source link

Crowd returned HTTP error code:404 - Not Found #31

Closed ghenadiibatalski closed 6 years ago

ghenadiibatalski commented 7 years ago

Hello, i've found following exception in the output, although the functionality seems not to be impaired.

I'm running on Nexus 3.4.0 Crowd 2.12.0 and nexus-crowd-plugin-3.3.1

2017-07-19 13:31:26,781+0000 ERROR [qtp1853710113-47] *UNKNOWN org.sonatype.nexus.plugins.crowd.client.rest.RestClient - Error occured while consuming Crowd REST service
nexus_1          | java.rmi.RemoteException: Crowd returned HTTP error code:404 - Not Found
nexus_1          | org.apache.http.client.entity.DecompressingEntity@20b6668a
nexus_1          |      at org.sonatype.nexus.plugins.crowd.client.rest.RestClient.handleHTTPError(RestClient.java:490)
nexus_1          |      at org.sonatype.nexus.plugins.crowd.client.rest.RestClient.getGroupsFromCrowdLoop(RestClient.java:401)
nexus_1          |      at org.sonatype.nexus.plugins.crowd.client.rest.RestClient.getNestedGroups(RestClient.java:206)
nexus_1          |      at org.sonatype.nexus.plugins.crowd.client.rest.CachingRestClient.getNestedGroups(CachingRestClient.java:70)
nexus_1          |      at org.sonatype.nexus.plugins.crowd.security.CrowdAuthenticatingRealm.doGetAuthorizationInfo(CrowdAuthenticatingRealm.java:83)

Regards

MarcoLotz commented 6 years ago

Same here, with nexus3 3.3.1 and Crowd 2.11.2 - throws the 404 exception but still works as intended. Any update on how to fix that exception?

MarcoLotz commented 6 years ago

For future readers: I have solved this problem by using this plugin instead: https://github.com/pingunaut/nexus3-crowd-plugin

It is a fork from this repo.

flopma commented 6 years ago

I will take a look at this. Any clues how to reproduce this may been helpful. Thank you

flopma commented 6 years ago

@ghenadiibatalski Can you please set the logging level of package org.sonatype.nexus.plugins.crowd.client.rest to TRACE and report please? I am interested by the full URL (the parameters) of the call made to Crowd which is failing. Thx

flopma commented 6 years ago

Seems the plugin error code handling is to be improved. The error 404 returned by Crowd correspond in your case to a non existent user in Crowd (such as default Nexus anonymous user). I will improve the code of the plugin are release a newer version. Thank you

flopma commented 6 years ago

Related to #29

Should be fixed with version 3.6.2 https://github.com/PatrickRoumanoff/nexus-crowd-plugin/releases/tag/nexus-crowd-plugin-3.6.2

Please reopen if not and thank you for your feedback