Uploaded image for project: 'Artifactory Binary Repository'
  1. Artifactory Binary Repository
  2. RTFACT-17512

Artifactory should be able to proxy Nexus PyPi repositories

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Resolution: Cannot Reproduce
    • Affects Version/s: None
    • Fix Version/s: 7.10.1
    • Component/s: None
    • Labels:
    • Severity:
      Medium

      Description

      See ticket 88979 for further details.

      This behavior seems to occur due to the way Nexus accepting the requests for pypi packages. It is expecting a trailing ‘/’ at the end for the request after the package name.

      For example:
      Request directly to pypi.org:

      $curl https://pypi.org/simple/jquery -L 
      <!DOCTYPE html> 
      <html> 
       <head> 
       <title>Links for jquery</title> 
       </head> 
       <body> 
       <h1>Links for jquery</h1> 
       <a href="https://files.pythonhosted.org/packages/39/7b/4e17464ae4abec40262254982bc9d730f890534132943369c37d61c149a9/jquery-1.1.2w2-py2.4.egg#sha256=d52dfeb864d02c039c6b5ca03a610a69e7f8b1ccdb38ce8d7ce
      aa87b6da04833">jquery-1.1.2w2-py2.4.egg</a><br/> 
       <a href="https://files.pythonhosted.org/packages/8b/be/2ef41715970fbd790531c73154977a9716d917ad85a8bd6ec8ffa2736c6f/jquery-1.1.2w2-py2.5.egg#sha256=4e38029c3ad400f7eb7eecd127c9e43d489001d3296b78ecb0a
      b1d2c8e6d7876">jquery-1.1.2w2-py2.5.egg</a><br/> 
       <a href="https://files.pythonhosted.org/packages/53/ba/f0ada5233ffa66ac4aa7832e80bc6c8f201bb9d35be391cd58d8236c2abc/jquery-1.1.2w2.zip#sha256=40ea16cf4bec0516354db2658e60f396bab465e612250b0cac200c85f
      e654ea5">jquery-1.1.2w2.zip</a><br/> 
       <a href="https://files.pythonhosted.org/packages/3c/f3/8a1027eab8f3d5f4155680edf3cffddcbc1b831b1b61e9cbe1efd4976bd3/jquery-1.1.2-py2.4.egg#sha256=6b4e6195a9c620b5eba587122252f79deed51d0530b122ded8ddb
      3f23e427e19">jquery-1.1.2-py2.4.egg</a><br/> 
       <a href="https://files.pythonhosted.org/packages/4e/37/d40289b12527d92ce5709d4c56f8dc3579b79f7ebd9a91680ec2062f2e1f/jquery-1.1.2-py2.5.egg#sha256=3234f250aad11a960ab44d960c46b85b7fb91801bfa271086f340
      9c5c386daf4">jquery-1.1.2-py2.5.egg</a><br/> 
       <a href="https://files.pythonhosted.org/packages/68/7f/fca294cb82170b8a53e9fdafa2fea4610089233ca54fcb8ee7aa0f45b877/jquery-1.1.2.zip#sha256=87aab9837d527daddbe9928bf3f058d2bf614cdde62202621fbb066f0e6
      a4a22">jquery-1.1.2.zip</a><br/> 
       <a href="https://files.pythonhosted.org/packages/40/75/f2525a856335b132fc2c144d0140e4d7061d6d9252619fd878fcc0bbff1d/jquery-1.2.1a-py2.5.egg#sha256=f7ca67d740d7dbc3e573777b42c4453e4fc2892d5ec0e0fc1841
      4b17c0b0c466">jquery-1.2.1a-py2.5.egg</a><br/> 
       <a href="https://files.pythonhosted.org/packages/1d/06/3e78a1e92f76f788745b3a00cad2dbdda031785c2c8f1f8c76d9bbe10e8b/jquery1.2.1a.zip#sha256=9afefef38aff59834c7d7e7cf3c9181d74cbe43b7b680ee10d8929f9bb6
      a08ef">jquery1.2.1a.zip</a><br/> 
       <a href="https://files.pythonhosted.org/packages/53/12/5b4e1559af82503a204ae7991637def7837e044d36e12b1cea0cf236e24c/jquery-1.2.2-py2.5.egg#sha256=0a1e93b6ec4b8a5eb2021f1472430b0d7fa44035b3c514b3ce39d
      be03e42e639">jquery-1.2.2-py2.5.egg</a><br/> 
       <a href="https://files.pythonhosted.org/packages/f7/73/71ea43bf4e83472569ed70b3a5adf6a153fee27f79a9268dc0143f499516/jquery-1.2.2.zip#sha256=6fc4b7a3a49e3ad3710bacb4fef1a27857a4d749379e3b0e81de9c9a9d8
      b293e">jquery-1.2.2.zip</a><br/> 
       <a href="https://files.pythonhosted.org/packages/01/23/ab5a3fd5277db608eee2126273ce5e45ba0deb2d47498fa86466fb6be37c/jquery-1.2.3-py2.5.egg#sha256=9bbb45b3dee08357ba7122f03e155a4fe29f1777784fff500dcca
      02f9380c2a6">jquery-1.2.3-py2.5.egg</a><br/> 
       <a href="https://files.pythonhosted.org/packages/05/45/9a6d7ff770b1279c901c8dfca1f9a9d6c9822d75a2bad834d0e2ddd4f8cd/jquery-1.2.3.zip#sha256=f9a33626652fab9ac76a9e4a9a271d0c47cb2ff292692463a70f7585166
      f03d4">jquery-1.2.3.zip</a><br/> 
       </body> 
      </html> 
      <!--SERIAL 793689-->
      

      Request to a remote repository in Artifactory which points to pypi.org:

      $curl http://35.205.201.148:8081/artifactory/api/pypi/pypi-remote/simple/jquery -L 
       
      <html><head><title>Simple Index</title><meta name="api-version" value="2" /></head><body> 
      <a href="../../packages/3c/f3/8a1027eab8f3d5f4155680edf3cffddcbc1b831b1b61e9cbe1efd4976bd3/jquery-1.1.2-py2.4.egg#sha256=6b4e6195a9c620b5eba587122252f79deed51d0530b122ded8ddb3f23e427e19" rel="internal" >
      jquery-1.1.2-py2.4.egg</a><br/> 
      <a href="../../packages/4e/37/d40289b12527d92ce5709d4c56f8dc3579b79f7ebd9a91680ec2062f2e1f/jquery-1.1.2-py2.5.egg#sha256=3234f250aad11a960ab44d960c46b85b7fb91801bfa271086f3409c5c386daf4" rel="internal" >
      jquery-1.1.2-py2.5.egg</a><br/> 
      <a href="../../packages/68/7f/fca294cb82170b8a53e9fdafa2fea4610089233ca54fcb8ee7aa0f45b877/jquery-1.1.2.zip#sha256=87aab9837d527daddbe9928bf3f058d2bf614cdde62202621fbb066f0e6a4a22" rel="internal" >jquery
      -1.1.2.zip</a><br/> 
      <a href="../../packages/39/7b/4e17464ae4abec40262254982bc9d730f890534132943369c37d61c149a9/jquery-1.1.2w2-py2.4.egg#sha256=d52dfeb864d02c039c6b5ca03a610a69e7f8b1ccdb38ce8d7ceaa87b6da04833" rel="internal"
      >jquery-1.1.2w2-py2.4.egg</a><br/> 
      <a href="../../packages/8b/be/2ef41715970fbd790531c73154977a9716d917ad85a8bd6ec8ffa2736c6f/jquery-1.1.2w2-py2.5.egg#sha256=4e38029c3ad400f7eb7eecd127c9e43d489001d3296b78ecb0ab1d2c8e6d7876" rel="internal"
      >jquery-1.1.2w2-py2.5.egg</a><br/> 
      <a href="../../packages/53/ba/f0ada5233ffa66ac4aa7832e80bc6c8f201bb9d35be391cd58d8236c2abc/jquery-1.1.2w2.zip#sha256=40ea16cf4bec0516354db2658e60f396bab465e612250b0cac200c85fe654ea5" rel="internal" >jque
      ry-1.1.2w2.zip</a><br/> 
      <a href="../../packages/40/75/f2525a856335b132fc2c144d0140e4d7061d6d9252619fd878fcc0bbff1d/jquery-1.2.1a-py2.5.egg#sha256=f7ca67d740d7dbc3e573777b42c4453e4fc2892d5ec0e0fc18414b17c0b0c466" rel="internal"
      >jquery-1.2.1a-py2.5.egg</a><br/> 
      <a href="../../packages/53/12/5b4e1559af82503a204ae7991637def7837e044d36e12b1cea0cf236e24c/jquery-1.2.2-py2.5.egg#sha256=0a1e93b6ec4b8a5eb2021f1472430b0d7fa44035b3c514b3ce39dbe03e42e639" rel="internal" >
      jquery-1.2.2-py2.5.egg</a><br/> 
      <a href="../../packages/f7/73/71ea43bf4e83472569ed70b3a5adf6a153fee27f79a9268dc0143f499516/jquery-1.2.2.zip#sha256=6fc4b7a3a49e3ad3710bacb4fef1a27857a4d749379e3b0e81de9c9a9d8b293e" rel="internal" >jquery
      -1.2.2.zip</a><br/> 
      <a href="../../packages/01/23/ab5a3fd5277db608eee2126273ce5e45ba0deb2d47498fa86466fb6be37c/jquery-1.2.3-py2.5.egg#sha256=9bbb45b3dee08357ba7122f03e155a4fe29f1777784fff500dcca02f9380c2a6" rel="internal" >
      jquery-1.2.3-py2.5.egg</a><br/> 
      <a href="../../packages/05/45/9a6d7ff770b1279c901c8dfca1f9a9d6c9822d75a2bad834d0e2ddd4f8cd/jquery-1.2.3.zip#sha256=f9a33626652fab9ac76a9e4a9a271d0c47cb2ff292692463a70f7585166f03d4" rel="internal" >jquery
      -1.2.3.zip</a><br/> 
      <a href="../../packages/1d/06/3e78a1e92f76f788745b3a00cad2dbdda031785c2c8f1f8c76d9bbe10e8b/jquery1.2.1a.zip#sha256=9afefef38aff59834c7d7e7cf3c9181d74cbe43b7b680ee10d8929f9bb6a08ef" rel="internal" >jquery
      1.2.1a.zip</a><br/> 
      </body></html>
      

      Request to a remote repository in Nexus which points to pypi.org:

      $curl http://35.189.226.212:8081/repository/pypi-remtoe/simple/jquery -L
       
      <!DOCTYPE html>
      <html>
      <head>
       <title>404 - Nexus Repository Manager</title>
       <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
       
       <!--[if lt IE 9]>
       <script>(new Image).src="http://35.189.226.212:8081/favicon.ico?3.13.0-01"</script>
       <![endif]-->
       <link rel="icon" type="image/png" href="http://35.189.226.212:8081/favicon-32x32.png?3.13.0-01" sizes="32x32">
       <link rel="mask-icon" href="http://35.189.226.212:8081/safari-pinned-tab.svg?3.13.0-01" color="#5bbad5">
       <link rel="icon" type="image/png" href="http://35.189.226.212:8081/favicon-16x16.png?3.13.0-01" sizes="16x16">
       <link rel="shortcut icon" href="http://35.189.226.212:8081/favicon.ico?3.13.0-01">
       <meta name="msapplication-TileImage" content="http://35.189.226.212:8081/mstile-144x144.png?3.13.0-01">
       <meta name="msapplication-TileColor" content="#00a300">
       
       <link rel="stylesheet" type="text/css" href="http://35.189.226.212:8081/static/css/nexus-content.css?3.13.0-01"/>
      </head>
      <body>
      <div class="nexus-header">
       <a href="http://35.189.226.212:8081">
       <div class="product-logo">
       <img src="http://35.189.226.212:8081/static/images/nexus.png?3.13.0-01"/>
       </div>
       <div class="product-id">
       <div class="product-id__line-1">
       <span class="product-name">Nexus Repository Manager</span>
       </div>
       <div class="product-id__line-2">
       <span class="product-spec">OSS 3.13.0-01</span>
       </div>
       </div>
       </a>
      </div>
       
      <div class="nexus-body">
       <div class="content-header">
       <img src="http://35.189.226.212:8081/static/rapture/resources/icons/x32/exclamation.png?3.13.0-01"/>
       <span class="title">Error 404</span>
       <span class="description">Not Found</span>
       </div>
       <div class="content-body">
       <div class="content-section">
       Not Found
       </div>
       </div>
      </div>
      </body>
      </html>
      

      As you can see the package cannot be found and get a “404”
      However a request to a remote repository in Nexus which points to pypi.org with a trailing ‘/’:

      $ curl http://35.189.226.212:8081/repository/pypi-remtoe/simple/jquery/ -L
       
      <html>
      <head><title>Links for jquery</title>
       <meta name="api-version" value="2"/>
      </head>
      <body><h1>Links for jquery</h1>
       <a href="../../packages/39/7b/4e17464ae4abec40262254982bc9d730f890534132943369c37d61c149a9/jquery-1.1.2w2-py2.4.egg#sha256=d52dfeb864d02c039c6b5ca03a610a69e7f8b1ccdb38ce8d7ceaa87b6da04833" rel="internal">jquery-1.1.2w2-py2.4.egg</a><br/>
       <a href="../../packages/8b/be/2ef41715970fbd790531c73154977a9716d917ad85a8bd6ec8ffa2736c6f/jquery-1.1.2w2-py2.5.egg#sha256=4e38029c3ad400f7eb7eecd127c9e43d489001d3296b78ecb0ab1d2c8e6d7876" rel="internal">jquery-1.1.2w2-py2.5.egg</a><br/>
       <a href="../../packages/53/ba/f0ada5233ffa66ac4aa7832e80bc6c8f201bb9d35be391cd58d8236c2abc/jquery-1.1.2w2.zip#sha256=40ea16cf4bec0516354db2658e60f396bab465e612250b0cac200c85fe654ea5" rel="internal">jquery-1.1.2w2.zip</a><br/>
       <a href="../../packages/3c/f3/8a1027eab8f3d5f4155680edf3cffddcbc1b831b1b61e9cbe1efd4976bd3/jquery-1.1.2-py2.4.egg#sha256=6b4e6195a9c620b5eba587122252f79deed51d0530b122ded8ddb3f23e427e19" rel="internal">jquery-1.1.2-py2.4.egg</a><br/>
       <a href="../../packages/4e/37/d40289b12527d92ce5709d4c56f8dc3579b79f7ebd9a91680ec2062f2e1f/jquery-1.1.2-py2.5.egg#sha256=3234f250aad11a960ab44d960c46b85b7fb91801bfa271086f3409c5c386daf4" rel="internal">jquery-1.1.2-py2.5.egg</a><br/>
       <a href="../../packages/68/7f/fca294cb82170b8a53e9fdafa2fea4610089233ca54fcb8ee7aa0f45b877/jquery-1.1.2.zip#sha256=87aab9837d527daddbe9928bf3f058d2bf614cdde62202621fbb066f0e6a4a22" rel="internal">jquery-1.1.2.zip</a><br/>
       <a href="../../packages/40/75/f2525a856335b132fc2c144d0140e4d7061d6d9252619fd878fcc0bbff1d/jquery-1.2.1a-py2.5.egg#sha256=f7ca67d740d7dbc3e573777b42c4453e4fc2892d5ec0e0fc18414b17c0b0c466" rel="internal">jquery-1.2.1a-py2.5.egg</a><br/>
       <a href="../../packages/1d/06/3e78a1e92f76f788745b3a00cad2dbdda031785c2c8f1f8c76d9bbe10e8b/jquery1.2.1a.zip#sha256=9afefef38aff59834c7d7e7cf3c9181d74cbe43b7b680ee10d8929f9bb6a08ef" rel="internal">jquery1.2.1a.zip</a><br/>
       <a href="../../packages/53/12/5b4e1559af82503a204ae7991637def7837e044d36e12b1cea0cf236e24c/jquery-1.2.2-py2.5.egg#sha256=0a1e93b6ec4b8a5eb2021f1472430b0d7fa44035b3c514b3ce39dbe03e42e639" rel="internal">jquery-1.2.2-py2.5.egg</a><br/>
       <a href="../../packages/f7/73/71ea43bf4e83472569ed70b3a5adf6a153fee27f79a9268dc0143f499516/jquery-1.2.2.zip#sha256=6fc4b7a3a49e3ad3710bacb4fef1a27857a4d749379e3b0e81de9c9a9d8b293e" rel="internal">jquery-1.2.2.zip</a><br/>
       <a href="../../packages/01/23/ab5a3fd5277db608eee2126273ce5e45ba0deb2d47498fa86466fb6be37c/jquery-1.2.3-py2.5.egg#sha256=9bbb45b3dee08357ba7122f03e155a4fe29f1777784fff500dcca02f9380c2a6" rel="internal">jquery-1.2.3-py2.5.egg</a><br/>
       <a href="../../packages/05/45/9a6d7ff770b1279c901c8dfca1f9a9d6c9822d75a2bad834d0e2ddd4f8cd/jquery-1.2.3.zip#sha256=f9a33626652fab9ac76a9e4a9a271d0c47cb2ff292692463a70f7585166f03d4" rel="internal">jquery-1.2.3.zip</a><br/>
       </body>
      </html>
       

      The above request with a trailing ‘/’ is successful.

      As Artifactory does not add a trailing ‘/’ in the request after the package name, the package cannot be found when requesting a pypi package from a remote repository in Artifactory which points to pypi repository in Nexus.

        Attachments

          Issue Links

            Activity

                People

                Assignee:
                yevdoa Yevdo Abramov
                Reporter:
                joe.henshaw Joe Henshaw
                Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                  Dates

                  Created:
                  Updated:
                  Resolved: