smengcl commented on pull request #10:
URL: 
https://github.com/apache/ozone-docker-runner/pull/10#issuecomment-1034184244


   To put that into reproducible steps:
   
   - ozone-docker-runner HEAD at 9eb62afda (the latest)
   - ozone HEAD at f757d9929c (master branch. no longer the latest but should 
still be relevant)
   
   ## Prepare
   
   ```bash
   # change directory to ozone project rooot
   $ mvn clean install -Pdist -DskipTests -e -Dmaven.javadoc.skip=true 
-Ddocker.ozone-runner.version=dev
   $ cd ./hadoop-ozone/dist/target/ozone-1.3.0-SNAPSHOT/compose/ozonesecure-ha
   $ docker-compose up -d
   # Wait for > 20 sec for the cluster to boot up
   $ docker-compose exec scm1.org bash
   ```
   
   ## In scm1.org
   
   ```bash
   bash-4.2$ hostname
   scm1.org
   bash-4.2$ kinit -k HTTP/[email protected] -t /etc/security/keytabs/HTTP.keytab
   bash-4.2$ klist
   Ticket cache: FILE:/tmp/krb5cc_1000
   Default principal: HTTP/[email protected]
   
   Valid starting     Expires            Service principal
   02/09/22 20:48:34  02/10/22 20:48:34  krbtgt/[email protected]
        renew until 02/16/22 20:48:34
   ```
   
   ## Auth via SPNEGO to S3G web endpoint (SUCCESS)
   
   ### Got 302 (as expected) 
   
   ```bash
   bash-4.2$ curl -v --negotiate -u : http://s3g:9878/
   * About to connect() to s3g port 9878 (#0)
   *   Trying 172.25.0.114...
   * Connected to s3g (172.25.0.114) port 9878 (#0)
   > GET / HTTP/1.1
   > User-Agent: curl/7.29.0
   > Host: s3g:9878
   > Accept: */*
   >
   < HTTP/1.1 302 Found
   < Date: Wed, 09 Feb 2022 20:49:21 GMT
   < Cache-Control: no-cache
   < Expires: Wed, 09 Feb 2022 20:49:21 GMT
   < Date: Wed, 09 Feb 2022 20:49:21 GMT
   < Pragma: no-cache
   < Content-Type: text/plain;charset=utf-8
   < X-Content-Type-Options: nosniff
   < X-FRAME-OPTIONS: SAMEORIGIN
   < X-XSS-Protection: 1; mode=block
   < Location: http://s3g:9878/static/
   < Content-Length: 0
   <
   * Connection #0 to host s3g left intact
   ```
   
   ### Got 401, then 200 (as expected)
   
   ```bash
   bash-4.2$ curl -v --negotiate -u : -I http://s3g:9878/static/index.html
   * About to connect() to s3g port 9878 (#0)
   *   Trying 172.25.0.114...
   * Connected to s3g (172.25.0.114) port 9878 (#0)
   > HEAD /static/index.html HTTP/1.1
   > User-Agent: curl/7.29.0
   > Host: s3g:9878
   > Accept: */*
   >
   < HTTP/1.1 401 Authentication required
   HTTP/1.1 401 Authentication required
   < X-Content-Type-Options: nosniff
   X-Content-Type-Options: nosniff
   < X-FRAME-OPTIONS: SAMEORIGIN
   X-FRAME-OPTIONS: SAMEORIGIN
   < X-XSS-Protection: 1; mode=block
   X-XSS-Protection: 1; mode=block
   < WWW-Authenticate: Negotiate
   WWW-Authenticate: Negotiate
   < Set-Cookie: hadoop.auth=; Path=/; HttpOnly
   Set-Cookie: hadoop.auth=; Path=/; HttpOnly
   < Cache-Control: must-revalidate,no-cache,no-store
   Cache-Control: must-revalidate,no-cache,no-store
   < Content-Type: text/html;charset=iso-8859-1
   Content-Type: text/html;charset=iso-8859-1
   < Content-Length: 459
   Content-Length: 459
   
   <
   * Connection #0 to host s3g left intact
   * Issue another request to this URL: 'http://s3g:9878/static/index.html'
   * Found bundle for host s3g: 0x1c78fa0
   * Re-using existing connection! (#0) with host s3g
   * Connected to s3g (172.25.0.114) port 9878 (#0)
   * Server auth using GSS-Negotiate with user ''
   > HEAD /static/index.html HTTP/1.1
   > Authorization: Negotiate 
YIICZAYJKoZIhvcSAQICAQBuggJTMIICT6ADAgEFoQMCAQ6iBwMFACAAAACjggFjYYIBXzCCAVugAwIBBaENGwtFWEFNUExFLkNPTaIWMBSgAwIBA6ENMAsbBEhUVFAbA3MzZ6OCASswggEnoAMCARKhAwIBAaKCARkEggEVA1aHDpCGx0z92AGtdDVaTTtYLV6kx71gw7ctlXzjpZ7Qi4ovEbtdrTahf9tsff6o+uOH8QIa5t0FxCAjOh7XqxpW7iQqTXIGXni3zOXzvb1vAvvOHafKNwkL7I3msMh2EqG09QIHgAPaccjXVr3/fX5CJjyfY+Hl1bmfrcHRpreXHgx98JIZusIgbYEYqGWxMRpzRNdkOScxTUj1OXY6V5urZqjJGbl8UdUZW1sW9V5ZO/IPgrYglP6PddGt5khii6UgqjeX3gq3XAniQT0PGiYOjUa9Rmr4PjZginT13mYjagf09tHBkmzFOUSPRWttJWWxqVVJZykF1uKsdWutDPsyHZm10EK8r0I0rcTlqm3kOl/6U6SB0jCBz6ADAgESooHHBIHEM20mz4GQOFbbpotjrdAJO9mQa4kTZJ0hLYjq3QzNAqQhHppYV/FEp69MXLBZNlJCBMcp1bHMfbR6TBNnSlOsCJP9C+udYIjDPaAuAY/EJXxktg/lMlzl1eZSBV+q66Dm7pJq0sxk/nZLv/plUJYZGqrfJTFj1JeFcVN1ukc6gGGqR4doFQq/pbwUSzTbCvfzOmH65GPsbXEyTVt7Lx5KhdZ5wGlh2UuQ6073sLNz7uziVPYv4LAzHJ1OjQjN7JokjX3EyQ==
   > User-Agent: curl/7.29.0
   > Host: s3g:9878
   > Accept: */*
   >
   < HTTP/1.1 200 OK
   HTTP/1.1 200 OK
   < Date: Wed, 09 Feb 2022 20:50:13 GMT
   Date: Wed, 09 Feb 2022 20:50:13 GMT
   < Content-Type: text/html
   Content-Type: text/html
   < X-Content-Type-Options: nosniff
   X-Content-Type-Options: nosniff
   < X-FRAME-OPTIONS: SAMEORIGIN
   X-FRAME-OPTIONS: SAMEORIGIN
   < X-XSS-Protection: 1; mode=block
   X-XSS-Protection: 1; mode=block
   < WWW-Authenticate: Negotiate 
YGoGCSqGSIb3EgECAgIAb1swWaADAgEFoQMCAQ+iTTBLoAMCARKiRARCtXuBXd5k+Bf8joVJCUHitxob0QQ6HN0Q9zhCyqZaNAV9qzWKbbArpj5UE8u2wy82jitx4ORmbNskWQjX0xNwThSE
   WWW-Authenticate: Negotiate 
YGoGCSqGSIb3EgECAgIAb1swWaADAgEFoQMCAQ+iTTBLoAMCARKiRARCtXuBXd5k+Bf8joVJCUHitxob0QQ6HN0Q9zhCyqZaNAV9qzWKbbArpj5UE8u2wy82jitx4ORmbNskWQjX0xNwThSE
   < Set-Cookie: 
hadoop.auth="u=root&p=HTTP/[email protected]&t=kerberos&e=1644475813277&s=oxSVRo1+T5bFFmluutqHdv/0vRm1xGcApucXw9gix/s=";
 Path=/; HttpOnly
   Set-Cookie: 
hadoop.auth="u=root&p=HTTP/[email protected]&t=kerberos&e=1644475813277&s=oxSVRo1+T5bFFmluutqHdv/0vRm1xGcApucXw9gix/s=";
 Path=/; HttpOnly
   < Last-Modified: Wed, 09 Feb 2022 12:15:20 GMT
   Last-Modified: Wed, 09 Feb 2022 12:15:20 GMT
   < Accept-Ranges: bytes
   Accept-Ranges: bytes
   < Content-Length: 3106
   Content-Length: 3106
   
   <
   * Closing connection 0
   ```
   
   ## Auth via SPNEGO to scm1.org web endpoint (401 only, FAIL)
   
   ```bash
   bash-4.2$ curl -v --negotiate -u : http://scm1.org:9876/
   * About to connect() to scm1.org port 9876 (#0)
   *   Trying 172.25.0.116...
   * Connected to scm1.org (172.25.0.116) port 9876 (#0)
   > GET / HTTP/1.1
   > User-Agent: curl/7.29.0
   > Host: scm1.org:9876
   > Accept: */*
   >
   < HTTP/1.1 401 Authentication required
   < Pragma: no-cache
   < X-Content-Type-Options: nosniff
   < X-FRAME-OPTIONS: SAMEORIGIN
   < X-XSS-Protection: 1; mode=block
   < Pragma: no-cache
   < X-Content-Type-Options: nosniff
   < X-FRAME-OPTIONS: SAMEORIGIN
   < X-XSS-Protection: 1; mode=block
   * gss_init_sec_context() failed: : Server krbtgt/[email protected] not found 
in Kerberos database
   < WWW-Authenticate: Negotiate
   < Set-Cookie: hadoop.auth=; Path=/; HttpOnly
   < Cache-Control: must-revalidate,no-cache,no-store
   < Content-Type: text/html;charset=iso-8859-1
   < Content-Length: 442
   <
   <html>
   <head>
   <meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>
   <title>Error 401 Authentication required</title>
   </head>
   <body><h2>HTTP ERROR 401 Authentication required</h2>
   <table>
   <tr><th>URI:</th><td>/</td></tr>
   <tr><th>STATUS:</th><td>401</td></tr>
   <tr><th>MESSAGE:</th><td>Authentication required</td></tr>
   
<tr><th>SERVLET:</th><td>org.eclipse.jetty.servlet.DefaultServlet-37986daf</td></tr>
   </table>
   
   </body>
   </html>
   * Connection #0 to host scm1.org left intact
   ```
   
   Same responose when trying to access http://scm1.org:9876/conf , 
http://scm1.org:9876/jmx etc. The root cause is explained in the previous 
commennt.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to