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

HTTP 500 for yum install involving relative URLs

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Done
    • Priority: 4 - Normal
    • Resolution: Duplicate
    • Affects Version/s: 6.9.1
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None
    • Severity:
      Medium

      Description

      We have a google-rpm-remote repository set up in Artifactory pointing to https://packages.cloud.google.com/yum.

      This repository is then used as a YUM repository on CentOS 7 configured via /etc/yum.repos.d/artifactory.repo as follows:

      [artifactory-kubernetes]
      name=Kubernetes
      baseurl=http://server/artifactory/google-rpm-remote/repos/kubernetes-el$releasever-$basearch
      gpgcheck=1
      repo_gpgcheck=1
      gpgkey=http://server/artifactory/google-rpm-remote/doc/yum-key.gpg http://server/artifactory/google-rpm-remote/doc/rpm-package-key.gpg
      enabled=1
      

      Trying to install kubectl via yum then results in an HTTP 500:

      [root@61831ee05fc0 tmp]# yum install -v kubectl
      Loading "fastestmirror" plugin
      Loading "ovl" plugin
      Config time: 0.010
      rpmdb time: 0.000
      ovl: Copying up (0) files from OverlayFS lower layer
      Yum version: 3.4.3
      Setting up Package Sacks
      Loading mirror speeds from cached hostfile
      pkgsack time: 0.019
      Obs Init time: 0.189
      Resolving Dependencies
      --> Running transaction check
      ---> Package kubectl.x86_64 0:1.14.1-0 will be installed
      Checking deps for kubectl.x86_64 0:1.14.1-0 - u
      --> Finished Dependency Resolution
      Dependency Process ending
      Depsolve time: 0.450
      
      Dependencies Resolved
      
      ===================================================================================================================
       Package                Arch                  Version                  Repository                             Size
      ===================================================================================================================
      Installing:
       kubectl                x86_64                1.14.1-0                 artifactory-kubernetes                9.5 M
      
      Transaction Summary
      ===================================================================================================================
      Install  1 Package
      
      Total download size: 9.5 M
      Installed size: 41 M
      Is this ok [y/d/N]: y
      Downloading packages:
      5c6cb3beb5142fa21020e2116824ba FAILED
      http://server/artifactory/google-rpm-remote/repos/kubernetes-el7-x86_64/../../pool/5c6cb3beb5142fa21020e2116824ba77a2d1389a3321601ea53af5ceefe70ad1-kubectl-1.14.1-0.x86_64.rpm: [Errno 14] HTTP Error 500 - Internal Server Error
      Trying other mirror.
      
      
      Error downloading packages:
        kubectl-1.14.1-0.x86_64: [Errno 256] No more mirrors to try.
      

      The suspicion is that the underlying problem is due to a HTTP HEAD request involving relative paths (".."):

      [root@61831ee05fc0 tmp]# curl -v -X HEAD http://server/artifactory/google-rpm-remote/repos/kubernetes-el7-x86_64/../../pool/5c6cb3beb5142fa21020e2116824ba77a2d1389a3321601ea53af5ceefe70ad1-kubectl-1.14.1-0.x86_64.rpm
      * About to connect() to server port 80 (#0)
      *   Trying 10.41.39.204...
      * Connected to server (10.41.39.204) port 80 (#0)
      > HEAD /artifactory/google-rpm-remote/repos/kubernetes-el7-x86_64/../../pool/5c6cb3beb5142fa21020e2116824ba77a2d1389a3321601ea53af5ceefe70ad1-kubectl-1.14.1-0.x86_64.rpm HTTP/1.1
      > User-Agent: curl/7.29.0
      > Host: server
      > Accept: */*
      >
      < HTTP/1.1 500 Internal Server Error
      < Server: Artifactory/6.9.1
      < X-Artifactory-Id: ec5c83f75b7cc22b:-5916bdf:16a25f51a05:-8000
      < Content-Type: application/json;charset=ISO-8859-1
      < Transfer-Encoding: chunked
      < Date: Fri, 03 May 2019 14:13:34 GMT
      < Connection: close
      <
      * transfer closed with outstanding read data remaining
      * Closing connection 0
      curl: (18) transfer closed with outstanding read data remaining
      

      HTTP GET requests involving relative paths seem to work fine. Also, when resolving the relative paths manually HTTP HEAD requests seem to be fine:

      [root@61831ee05fc0 tmp]# curl -v -X HEAD http://server/artifactory/google-rpm-remote/pool/5c6cb3beb5142fa21020e2116824ba77a2d1389a3321601ea53af5ceefe70ad1-kubectl-1.14.1-0.x86_64.rpm                            * About to connect() to server port 80 (#0)
      *   Trying 10.41.39.204...
      * Connected to server (10.41.39.204) port 80 (#0)
      > HEAD /artifactory/google-rpm-remote/pool/5c6cb3beb5142fa21020e2116824ba77a2d1389a3321601ea53af5ceefe70ad1-kubectl-1.14.1-0.x86_64.rpm HTTP/1.1
      > User-Agent: curl/7.29.0
      > Host: server
      > Accept: */*
      >
      < HTTP/1.1 200 OK
      < Server: Artifactory/6.9.1
      < X-Artifactory-Id: ec5c83f75b7cc22b:-5916bdf:16a25f51a05:-8000
      < Last-Modified: Fri, 03 May 2019 13:25:39 GMT
      < ETag: 4f9c06e8ff7cee112cf9aa94038c7622d4d4fd7a
      < X-Checksum-Sha1: 4f9c06e8ff7cee112cf9aa94038c7622d4d4fd7a
      < X-Checksum-Sha256: 5c6cb3beb5142fa21020e2116824ba77a2d1389a3321601ea53af5ceefe70ad1
      < X-Checksum-Md5: 45048c02f6606e95c9d789c63063d424
      < Accept-Ranges: bytes
      < X-Artifactory-Filename: 5c6cb3beb5142fa21020e2116824ba77a2d1389a3321601ea53af5ceefe70ad1-kubectl-1.14.1-0.x86_64.rpm
      < Content-Disposition: attachment; filename="5c6cb3beb5142fa21020e2116824ba77a2d1389a3321601ea53af5ceefe70ad1-kubectl-1.14.1-0.x86_64.rpm"; filename*=UTF-8''5c6cb3beb5142fa21020e2116824ba77a2d1389a3321601ea53af5ceefe70ad1-kubectl-1.14.1-0.x86_64.rpm
      < Content-Type: application/x-rpm
      < Content-Length: 9976450
      < Date: Fri, 03 May 2019 14:16:22 GMT
      <
      

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned
              Reporter:
              mstuder Martin Studer
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Sync Status

                  Connection: RTFACT Sync
                  RTMID-19135 -
                  SYNCHRONIZED
                  • Last Sync Date: