Uploaded image for project: 'Dev - Nexus Repo'
  1. Dev - Nexus Repo
  2. NEXUS-32531

conan search results with 500 internal error

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Cannot Reproduce
    • Affects Version/s: 3.38.0
    • Fix Version/s: 3.39.0
    • Component/s: conan
    • Labels:
    • Notability:
      3

      Description

      ISSUE:
      Conan search on a hosted repository results with 500 internal error

       

      ERROR:

      $ conan search -r nexusk8s cas*
      
      ERROR: HTTPSConnectionPool(host='nexus-svc', port=443): Max retries exceeded with url: /repository/conan-hosted-repo/v1/conans/search?q=cas%2A (Caused by ResponseError('too many 500 error responses')). [Remote: nexusk8s]
      

       

      nexus logs has below errors

       

      192.168.0.1 - user1 [27/May/2022:07:38:04 +0000] "GET /repository/conan-hosted-repo/v1/conans/search?q=cas%2A HTTP/1.1" 500 - 1805 10307 "Conan/1.48.1 (Linux 5.13.0-40-generic; Python 3.8.10; x86_64)" [qtp1487753172-77471]
      
      2022-05-27 07:38:04,395+0000 WARN  [qtp1487753172-77471]  user1 org.sonatype.nexus.repository.httpbridge.internal.ViewServlet - Failure servicing: GET /repository/conan-hosted-repo/v1/conanser1/search?q=cas%2A
      java.lang.NumberFormatException: For input string: "93b9b9eb9a7ecb06197b635e26f99f4d"
          at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
          at java.lang.Long.parseLong(Long.java:592)
          at java.lang.Integer.parseUnsignedInt(Integer.java:679)
          at org.sonatype.nexus.repository.content.store.InternalIds.toInternalId(InternalIds.java:57)
          at org.sonatype.nexus.repository.content.fluent.internal.FluentComponentsImpl.find(FluentComponentsImpl.java:130)
          at com.sonatype.repository.conan.internal.datastore.search.ConanSearchFacetImpl.getComponent(ConanSearchFacetImpl.java:92)
          at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193)
          at java.util.Iterator.forEachRemaining(Iterator.java:116)
      

       

      CAUSE:

      Suspecting the external ID nexus generating is large for unsigned integer.

      jshell> import static java.lang.Integer.parseUnsignedInt;
         ...>
      
      jshell> parseUnsignedInt("93b9b9eb9a7ecb06197b635e26f99f4", 16)
      |  Exception java.lang.NumberFormatException: For input string: "93b9b9eb9a7ecb06197b635e26f99f4"
      |        at NumberFormatException.forInputString (NumberFormatException.java:65)
      |        at Long.parseLong (Long.java:692)
      |        at Integer.parseUnsignedInt (Integer.java:834)
      |        at (#4:1)
      

       

      EXPECTED RESULT:

      Better handling of the nexus generated external IDs and not failing

       

      POTENTIAL WORKAROUND:

      Upgrade to 3.39 version or above

       

        Attachments

          Activity

            People

            Assignee:
            sshamrai Sergii Shamrai
            Reporter:
            sappusamy Srinivasan Appusamy
            CC:
            Jason Julian
            Last Updated By:
            Sergii Shamrai Sergii Shamrai
            Owner:
            Sergii Shamrai Sergii Shamrai
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Date of First Response:

                tigCommentSecurity.panel-title