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

Can't access remote repository using cookie management

    Details

    • Type: Bug
    • Status: Open
    • Priority: Normal
    • Resolution: Unresolved
    • Affects Version/s: 5.4.6, 5.10.2
    • Fix Version/s: None
    • Labels:
      None
    • Environment:

      Description

      I'm trying to access Oracle's maven repository, configured as a remote repository according to Artifactory docs.

      It seems that the Oracle repos doesn't accept HTTP HEAD requests and that makes Artifactory think the desired resources don't exist. Accessing the URL queried in a browser works.

      Log output on DEBUG loglevel when accessing a jar from the Oracle repository:

      {{2017-08-30 09:39:38,485 [http-nio-8081-exec-4] [DEBUG] (o.a.w.s.RepoFilter :101) - Entering request GET (a.b.c.d) /oracle/com/oracle/jdbc/ojdbc8_g/12.2.0.1/ojdbc8_g-12.2.0.1.jar.
      2017-08-30 09:39:38,488 [http-nio-8081-exec-4] [DEBUG] (o.a.r.RepoRequestContext:73) - c180c782 get user oracle:com/oracle/jdbc/ojdbc8_g/12.2.0.1/ojdbc8_g-12.2.0.1.jar Received request
      2017-08-30 09:39:38,493 [http-nio-8081-exec-4] [DEBUG] (o.a.r.RepoRequestContext:73) - c180c782 get user oracle:com/oracle/jdbc/ojdbc8_g/12.2.0.1/ojdbc8_g-12.2.0.1.jar Request source = 140.78.4.205, Last modified = 01-01-70 00:59:59 +01:00, If modified since = -1, Thread name = http-nio-8081-exec-4
      2017-08-30 09:39:38,493 [http-nio-8081-exec-4] [DEBUG] (o.a.r.RepoRequestContext:73) - c180c782 get user oracle:com/oracle/jdbc/ojdbc8_g/12.2.0.1/ojdbc8_g-12.2.0.1.jar Executing any BeforeDownloadRequest user plugins that may exist
      2017-08-30 09:39:38,494 [http-nio-8081-exec-4] [DEBUG] (o.a.r.RepoRequestContext:73) - c180c782 get user oracle:com/oracle/jdbc/ojdbc8_g/12.2.0.1/ojdbc8_g-12.2.0.1.jar Retrieving info from {} repository '{}' type
      2017-08-30 09:39:38,502 [http-nio-8081-exec-4] [DEBUG] (o.a.a.m.ModuleInfoUtils:348) - Could not transform com/oracle/jdbc/ojdbc8_g/12.2.0.1/ojdbc8_g-12.2.0.1.jar to a valid module info.
      2017-08-30 09:39:38,504 [http-nio-8081-exec-4] [DEBUG] (o.a.a.m.ModuleInfoUtils:348) - Could not transform com/oracle/jdbc/ojdbc8_g/12.2.0.1/ojdbc8_g-12.2.0.1.jar to a valid module info.
      2017-08-30 09:39:38,506 [http-nio-8081-exec-4] [DEBUG] (o.a.a.m.ModuleInfoUtils:348) - Could not transform com/oracle/jdbc/ojdbc8_g/12.2.0.1/ojdbc8_g-12.2.0.1.jar to a valid module info.
      2017-08-30 09:39:38,508 [http-nio-8081-exec-4] [DEBUG] (o.a.s.d.u.JdbcHelper:62) - Executing SQL: 'SELECT * FROM nodes WHERE repo = 'oracle-cache' AND node_path = 'com/oracle/jdbc/ojdbc8_g/12.2.0.1' AND node_name = 'ojdbc8_g-12.2.0.1.jar''.
      2017-08-30 09:39:38,509 [http-nio-8081-exec-4] [DEBUG] (o.a.s.d.u.JdbcHelper:170) - Query returned in 610673 nanos : 'SELECT * FROM nodes WHERE repo = 'oracle-cache' AND node_path = 'com/oracle/jdbc/ojdbc8_g/12.2.0.1' AND node_name = 'ojdbc8_g-12.2.0.1.jar''
      2017-08-30 09:39:38,509 [http-nio-8081-exec-4] [DEBUG] (o.a.r.RepoRequestContext:73) - c180c782 get user oracle:com/oracle/jdbc/ojdbc8_g/12.2.0.1/ojdbc8_g-12.2.0.1.jar Unable to find resource in oracle-cache:com/oracle/jdbc/ojdbc8_g/12.2.0.1/ojdbc8_g-12.2.0.1.jar
      2017-08-30 09:39:38,510 [http-nio-8081-exec-4] [DEBUG] (o.a.r.RepoRequestContext:73) - c180c782 get user oracle:com/oracle/jdbc/ojdbc8_g/12.2.0.1/ojdbc8_g-12.2.0.1.jar Executing any AltRemotePath user plugins that may exist
      2017-08-30 09:39:38,511 [http-nio-8081-exec-4] [DEBUG] (o.a.r.RepoRequestContext:73) - c180c782 get user oracle:com/oracle/jdbc/ojdbc8_g/12.2.0.1/ojdbc8_g-12.2.0.1.jar Appending matrix params to remote request URL
      2017-08-30 09:39:38,512 [http-nio-8081-exec-4] [DEBUG] (o.a.r.RepoRequestContext:73) - c180c782 get user oracle:com/oracle/jdbc/ojdbc8_g/12.2.0.1/ojdbc8_g-12.2.0.1.jar Using remote request URL - https://maven.oracle.com/com/oracle/jdbc/ojdbc8_g/12.2.0.1/ojdbc8_g-12.2.0.1.jar
      2017-08-30 09:39:38,515 [http-nio-8081-exec-4] [DEBUG] (o.a.r.RepoRequestContext:73) - c180c782 get user oracle:com/oracle/jdbc/ojdbc8_g/12.2.0.1/ojdbc8_g-12.2.0.1.jar Executing HEAD request to https://maven.oracle.com/com/oracle/jdbc/ojdbc8_g/12.2.0.1/ojdbc8_g-12.2.0.1.jar
      2017-08-30 09:39:38,515 [http-nio-8081-exec-4] [DEBUG] (o.j.c.h.a.PreemptiveAuthInterceptor:61) - Updating credentials for host https://maven.oracle.com
      2017-08-30 09:39:39,544 [http-nio-8081-exec-4] [DEBUG] (o.j.c.h.a.PreemptiveAuthInterceptor:61) - Updating credentials for host https://www.oracle.com
      2017-08-30 09:39:39,601 [http-nio-8081-exec-4] [DEBUG] (o.a.r.RepoRequestContext:73) - c180c782 get user oracle:com/oracle/jdbc/ojdbc8_g/12.2.0.1/ojdbc8_g-12.2.0.1.jar Received status {} (message: 503) on remote info request - returning unfound resource
      2017-08-30 09:39:39,601 [http-nio-8081-exec-4] [DEBUG] (o.a.r.RepoRequestContext:73) - c180c782 get user oracle:com/oracle/jdbc/ojdbc8_g/12.2.0.1/ojdbc8_g-12.2.0.1.jar Unable to find resource remotely - adding to the missed retrieval cache.
      2017-08-30 09:39:39,603 [http-nio-8081-exec-4] [DEBUG] (o.a.r.RepoRequestContext:73) - c180c782 get user oracle:com/oracle/jdbc/ojdbc8_g/12.2.0.1/ojdbc8_g-12.2.0.1.jar Requested resource is found = false
      2017-08-30 09:39:39,604 [http-nio-8081-exec-4] [DEBUG] (o.a.r.RepoRequestContext:73) - c180c782 get user oracle:com/oracle/jdbc/ojdbc8_g/12.2.0.1/ojdbc8_g-12.2.0.1.jar Request is HEAD = false
      2017-08-30 09:39:39,604 [http-nio-8081-exec-4] [DEBUG] (o.a.r.RepoRequestContext:73) - c180c782 get user oracle:com/oracle/jdbc/ojdbc8_g/12.2.0.1/ojdbc8_g-12.2.0.1.jar Request is for a checksum = false
      2017-08-30 09:39:39,604 [http-nio-8081-exec-4] [DEBUG] (o.a.r.RepoRequestContext:73) - c180c782 get user oracle:com/oracle/jdbc/ojdbc8_g/12.2.0.1/ojdbc8_g-12.2.0.1.jar Target repository is not remote or doesn't store locally = false
      2017-08-30 09:39:39,604 [http-nio-8081-exec-4] [DEBUG] (o.a.a.r.ArtifactoryRequestBase:149) - Neither If-Modified-Since nor Last-Modified are set
      2017-08-30 09:39:39,604 [http-nio-8081-exec-4] [DEBUG] (o.a.a.r.ArtifactoryRequestBase:135) - Check isNewerThan. resourceLastModified=0, roundedResourceLastModified=0, modificationTime=-1
      2017-08-30 09:39:39,604 [http-nio-8081-exec-4] [DEBUG] (o.a.r.RepoRequestContext:73) - c180c782 get user oracle:com/oracle/jdbc/ojdbc8_g/12.2.0.1/ojdbc8_g-12.2.0.1.jar Requested resource was not modified = false
      2017-08-30 09:39:39,604 [http-nio-8081-exec-4] [DEBUG] (o.a.r.RepoRequestContext:73) - c180c782 get user oracle:com/oracle/jdbc/ojdbc8_g/12.2.0.1/ojdbc8_g-12.2.0.1.jar Responding with unfound resource
      2017-08-30 09:39:39,604 [http-nio-8081-exec-4] [DEBUG] (o.a.r.RepoRequestContext:73) - c180c782 get user oracle:com/oracle/jdbc/ojdbc8_g/12.2.0.1/ojdbc8_g-12.2.0.1.jar Setting default response status to '404' reason to 'Resource not found'
      2017-08-30 09:39:39,604 [http-nio-8081-exec-4] [DEBUG] (o.a.r.RepoRequestContext:73) - c180c782 get user oracle:com/oracle/jdbc/ojdbc8_g/12.2.0.1/ojdbc8_g-12.2.0.1.jar Response is an instance of UnfoundRepoResourceReason
      2017-08-30 09:39:39,605 [http-nio-8081-exec-4] [DEBUG] (o.a.r.RepoRequestContext:73) - c180c782 get user oracle:com/oracle/jdbc/ojdbc8_g/12.2.0.1/ojdbc8_g-12.2.0.1.jar Configured to hide un-authorized resources = false
      2017-08-30 09:39:39,605 [http-nio-8081-exec-4] [DEBUG] (o.a.r.RepoRequestContext:73) - c180c782 get user oracle:com/oracle/jdbc/ojdbc8_g/12.2.0.1/ojdbc8_g-12.2.0.1.jar Original response status is auth related = false
      2017-08-30 09:39:39,605 [http-nio-8081-exec-4] [DEBUG] (o.a.r.RepoRequestContext:73) - c180c782 get user oracle:com/oracle/jdbc/ojdbc8_g/12.2.0.1/ojdbc8_g-12.2.0.1.jar Using original response status of '404' and message 'Service Unavailable'
      2017-08-30 09:39:39,605 [http-nio-8081-exec-4] [DEBUG] (o.a.r.RepoRequestContext:73) - c180c782 get user oracle:com/oracle/jdbc/ojdbc8_g/12.2.0.1/ojdbc8_g-12.2.0.1.jar Sending error with status 404 and message 'Service Unavailable'
      2017-08-30 09:39:39,605 [http-nio-8081-exec-4] [DEBUG] (o.a.r.RepoRequestContext:73) - c180c782 get user oracle:com/oracle/jdbc/ojdbc8_g/12.2.0.1/ojdbc8_g-12.2.0.1.jar Executing any AfterDownloadErrorAction user plugins that may exist
      2017-08-30 09:39:39,605 [http-nio-8081-exec-4] [DEBUG] (o.a.r.RepoRequestContext:73) - c180c782 get user oracle:com/oracle/jdbc/ojdbc8_g/12.2.0.1/ojdbc8_g-12.2.0.1.jar Response code wasn't modified by the user plugins
      2017-08-30 09:39:39,606 [http-nio-8081-exec-4] [DEBUG] (o.a.r.RepoRequestContext:73) - c180c782 get user oracle:com/oracle/jdbc/ojdbc8_g/12.2.0.1/ojdbc8_g-12.2.0.1.jar Sending response with the status '404' and the message 'Service Unavailable'
      2017-08-30 09:39:39,606 [http-nio-8081-exec-4] [DEBUG] (o.a.e.DownloadServiceImpl:458) - Sending HTTP error code 404: Service Unavailable
      2017-08-30 09:39:39,647 [http-nio-8081-exec-4] [DEBUG] (o.a.w.s.a.ArtifactoryAuthenticationFilterChain:185) - Filter responded with code 404, skipping result interception}}

      Furthermore, HttpClient complains about cookies and spams the logs with this:

      (o.a.h.c.p.ResponseProcessCookies:129) - Invalid cookie header: "Set-Cookie: IntradocAuth=Basic; path=/; Expires=Thu, 30 Aug 2018 07:25:55 GMT; HttpOnly". Invalid 'expires' attribute: Thu, 30 Aug 2018 07:25:55 GMT

      This doesn't seem to impact querying remote repositories though.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              fuero Robert Führicht
            • Votes:
              4 Vote for this issue
              Watchers:
              10 Start watching this issue

              Dates

              • Created:
                Updated: