Hi, Please don't use "-I" option for the curl. "-I" option is sending different request.
Your command: # curl -vvv -Ik https://<master VIP>:8443/swaggerapi/oapi/v1 TOBE: # curl -vvv -k https://<master VIP>:8443/swaggerapi/oapi/v1 Best, Kenjiro On Wed, Feb 3, 2016 at 2:24 PM, Srinivas Naga Kotaru (skotaru) < skot...@cisco.com> wrote: > Tried all options. Below is output. Can you explain what proxy is doing > and how to check/configure and fix? Installation was default using ansible. > Since this is test setup, we didn’t optimized or tuned anything > > Sample API is working fine. > > # oc whoami -t > > #TOKEN=<TOKEN> > > > #curl -k https://mad-osshift-vip01.cisco.com:8443/api/v1 -H > "Authorization: Bearer $TOKEN > > > From laptop: > =========== > > # curl -vvv -Ik https://<master VIP>:8443/swaggerapi/oapi/v1 > * About to connect() to mad-osshift-master01.cisco.com port 8443 (#0) > * Trying 10.42.137.150... > * Connected to mad-osshift-master01.cisco.com (10.42.137.150) port 8443 > (#0) > * Initializing NSS with certpath: sql:/etc/pki/nssdb > * skipping SSL peer certificate verification > * NSS: client certificate not found (nickname not specified) > * SSL connection using TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 > * Server certificate: > * subject: CN=10.42.137.150 > * start date: Dec 02 18:27:54 2015 GMT > * expire date: Dec 01 18:27:55 2017 GMT > * common name: 10.42.137.150 > * issuer: CN=openshift-signer@1449080872 > > HEAD /swaggerapi/oapi/v1 HTTP/1.1 > > User-Agent: curl/7.29.0 > > Host: mad-osshift-master01.cisco.com:8443 > > Accept: */* > > > < HTTP/1.1 405 Method Not Allowed > HTTP/1.1 405 Method Not Allowed > < Date: Wed, 03 Feb 2016 05:17:25 GMT > Date: Wed, 03 Feb 2016 05:17:25 GMT > < Content-Length: 23 > Content-Length: 23 > < Content-Type: text/plain; charset=utf-8 > Content-Type: text/plain; charset=utf-8 > > < > * Connection #0 to host mad-osshift-master01.cisco.com left intact > > > From master host > ==============: > > # curl -vvv -Ik https://localhost:8443/swaggerapi/oapi/v1 > * About to connect() to localhost port 8443 (#0) > * Trying ::1... > * Connection refused > * Trying 127.0.0.1... > * Connected to localhost (127.0.0.1) port 8443 (#0) > * Initializing NSS with certpath: sql:/etc/pki/nssdb > * skipping SSL peer certificate verification > * NSS: client certificate not found (nickname not specified) > * SSL connection using TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 > * Server certificate: > * subject: CN=10.42.137.150 > * start date: Dec 02 18:27:54 2015 GMT > * expire date: Dec 01 18:27:55 2017 GMT > * common name: 10.42.137.150 > * issuer: CN=openshift-signer@1449080872 > > HEAD /swaggerapi/oapi/v1 HTTP/1.1 > > User-Agent: curl/7.29.0 > > Host: localhost:8443 > > Accept: */* > > > < HTTP/1.1 405 Method Not Allowed > HTTP/1.1 405 Method Not Allowed > < Date: Wed, 03 Feb 2016 05:19:01 GMT > Date: Wed, 03 Feb 2016 05:19:01 GMT > < Content-Length: 23 > Content-Length: 23 > < Content-Type: text/plain; charset=utf-8 > Content-Type: text/plain; charset=utf-8 > > < > * Connection #0 to host localhost left intact > > > # curl -Ik https://< <https://%3CHOST>MASTER HOST > IP>:8443/swaggerapi/oapi/v1 –vvv > > * About to connect() to 10.42.137.150 port 8443 (#0) > * Trying 10.42.137.150... > * Connected to 10.42.137.150 (10.42.137.150) port 8443 (#0) > * Initializing NSS with certpath: sql:/etc/pki/nssdb > * skipping SSL peer certificate verification > * NSS: client certificate not found (nickname not specified) > * SSL connection using TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 > * Server certificate: > * subject: CN=10.42.137.150 > * start date: Dec 02 18:27:54 2015 GMT > * expire date: Dec 01 18:27:55 2017 GMT > * common name: 10.42.137.150 > * issuer: CN=openshift-signer@1449080872 > > HEAD /swaggerapi/oapi/v1 HTTP/1.1 > > User-Agent: curl/7.29.0 > > Host: 10.42.137.150:8443 > > Accept: */* > > > < HTTP/1.1 405 Method Not Allowed > HTTP/1.1 405 Method Not Allowed > < Date: Wed, 03 Feb 2016 05:19:14 GMT > Date: Wed, 03 Feb 2016 05:19:14 GMT > < Content-Length: 23 > Content-Length: 23 > < Content-Type: text/plain; charset=utf-8 > Content-Type: text/plain; charset=utf-8 > > < > * Connection #0 to host 10.42.137.150 left intact > > > -- > *Srinivas Kotaru* > > From: Nakayama Kenjiro <nakayamakenj...@gmail.com> > Date: Tuesday, February 2, 2016 at 7:57 PM > To: skotaru <skot...@cisco.com> > Cc: "ccole...@redhat.com" <ccole...@redhat.com>, " > users@lists.openshift.redhat.com" <users@lists.openshift.redhat.com> > Subject: Re: swagger UI > > Hi, > > How about the output of curl with "-vvv". Please check if your curl is > trying to connect "127.0.0.1" or "master API". > And how about the access to the root path "/"? > > So, could please provide us with: > > $ curl -vvv -k https://localhost:8443/ > or > $ curl -vvv -k https://<MASTER_API_IP>:8443/ > > If it works fine, you are supposed to get following output. > > # curl -vvv -k https://localhost:8443/ > * About to connect() to localhost port 8443 (#0) > * Trying ::1... > * Connection refused > * Trying 127.0.0.1... > * Connected to localhost (127.0.0.1) port 8443 (#0) > * Initializing NSS with certpath: sql:/etc/pki/nssdb > * skipping SSL peer certificate verification > * NSS: client certificate not found (nickname not specified) > * SSL connection using TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 > * Server certificate: > * subject: CN=172.30.0.1 > * start date: Nov 30 02:47:38 2015 GMT > * expire date: Nov 29 02:47:39 2017 GMT > * common name: 172.30.0.1 > * issuer: CN=openshift-signer@1448851653 > > GET / HTTP/1.1 > > User-Agent: curl/7.29.0 > > Host: localhost:8443 > > Accept: */* > > > < HTTP/1.1 200 OK > < Content-Type: application/json > < Date: Fri, 08 Jan 2016 09:52:40 GMT > < Content-Length: 196 > < > { > "paths": [ > "/api", > "/api/v1", > "/controllers", > "/healthz", > "/healthz/ping", > "/logs/", > "/metrics", > "/ready", > "/oapi", > "/oapi/v1", > "/swaggerapi/" > ] > * Connection #0 to host localhost left intact > } > > > Running openshift enterprise 3.1.1. I remember 3.1 also had the same > issues. > > hmm... In that case, your environment proxy is causing this issue. We can > check by command (Add "-vvv" option). > > Thanks, > Kenjiro > > On Wed, Feb 3, 2016 at 12:44 PM, Srinivas Naga Kotaru (skotaru) < > skot...@cisco.com> wrote: > >> Clayton/Nakayama >> >> Still not working. Tried both localhost and public IP of the master host >> >> >> # curl -Ik https://localhost:8443/swaggerapi/oapi/v1 >> HTTP/1.1 405 Method Not Allowed >> Date: Wed, 03 Feb 2016 03:42:26 GMT >> Content-Length: 23 >> Content-Type: text/plain; charset=utf-8 >> >> # curl -Ik https://<IP>:8443/swaggerapi/oapi/v1 >> HTTP/1.1 405 Method Not Allowed >> Date: Wed, 03 Feb 2016 03:41:58 GMT >> Content-Length: 23 >> Content-Type: text/plain; charset=utf-8 >> >> Running openshift enterprise 3.1.1. I remember 3.1 also had the same >> issues. >> >> -- >> *Srinivas Kotaru* >> >> From: Nakayama Kenjiro <nakayamakenj...@gmail.com> >> Date: Tuesday, February 2, 2016 at 5:21 PM >> To: "ccole...@redhat.com" <ccole...@redhat.com> >> Cc: skotaru <skot...@cisco.com>, "users@lists.openshift.redhat.com" < >> users@lists.openshift.redhat.com> >> Subject: Re: swagger UI >> >> Yeah, please test with "localhost" after ssh into your master host. >> >> # ssh root@<MASTER_HOST> >> # curl -k https://localhost:8443/swaggerapi/oapi/v1 >> >> Kenjiro >> >> >> On Wed, Feb 3, 2016 at 9:18 AM, Clayton Coleman <ccole...@redhat.com> >> wrote: >> >>> Hrm - works locally, is that path allowed by your proxy? >>> >>> On Tue, Feb 2, 2016 at 7:16 PM, Srinivas Naga Kotaru (skotaru) < >>> skot...@cisco.com> wrote: >>> >>>> Thanks for quick reply >>>> >>>> Am getting method not allowed. Tried CLI and browser. Browser simply >>>> throwing a blank download page >>>> >>>> # curl -Ik https://<myvip>8443/swaggerapi/oapi/v1 >>>> >>>> >>>> HTTP/1.1 405 Method Not Allowed >>>> Date: Wed, 03 Feb 2016 00:15:20 GMT >>>> Content-Length: 23 >>>> Content-Type: text/plain; charset=utf-8 >>>> >>>> -- >>>> *Srinivas Kotaru* >>>> >>>> From: Nakayama Kenjiro <nakayamakenj...@gmail.com> >>>> Date: Tuesday, February 2, 2016 at 4:02 PM >>>> To: skotaru <skot...@cisco.com> >>>> Cc: "users@lists.openshift.redhat.com" < >>>> users@lists.openshift.redhat.com> >>>> Subject: Re: swagger UI >>>> >>>> Hi, >>>> >>>> > Does OSE master expose swagger-ui? >>>> >>>> Yes, it does. >>>> >>>> > Wondering we have to do anything to get it work. >>>> >>>> No, you don't need anything. >>>> >>>> Basically, you can access the API(openshift's) with this URL: >>>> >>>> curl -k https://<YOUR_MASTER_HOST>:8443/swaggerapi/oapi/v1 >>>> >>>> Could you please tell us what results you get by above curl? >>>> >>>> Thanks, >>>> Kenjiro >>>> >>>> >>>> On Wed, Feb 3, 2016 at 8:53 AM, Srinivas Naga Kotaru (skotaru) < >>>> skot...@cisco.com> wrote: >>>> >>>>> Does OSE master expose swagger-ui? I tested but not working. Wondering >>>>> we have to do anything to get it work. I feel this is good way to learn >>>>> and >>>>> use master API >>>>> >>>>> -- >>>>> *Srinivas Kotaru* >>>>> >>>>> _______________________________________________ >>>>> users mailing list >>>>> users@lists.openshift.redhat.com >>>>> http://lists.openshift.redhat.com/openshiftmm/listinfo/users >>>>> >>>>> >>>> >>>> >>>> -- >>>> Kenjiro NAKAYAMA <nakayamakenj...@gmail.com> >>>> GPG Key fingerprint = ED8F 049D E67A 727D 9A44 8E25 F44B E208 C946 5EB9 >>>> >>>> _______________________________________________ >>>> users mailing list >>>> users@lists.openshift.redhat.com >>>> http://lists.openshift.redhat.com/openshiftmm/listinfo/users >>>> >>>> >>> >> >> >> -- >> Kenjiro NAKAYAMA <nakayamakenj...@gmail.com> >> GPG Key fingerprint = ED8F 049D E67A 727D 9A44 8E25 F44B E208 C946 5EB9 >> > > > > -- > Kenjiro NAKAYAMA <nakayamakenj...@gmail.com> > GPG Key fingerprint = ED8F 049D E67A 727D 9A44 8E25 F44B E208 C946 5EB9 > -- Kenjiro NAKAYAMA <nakayamakenj...@gmail.com> GPG Key fingerprint = ED8F 049D E67A 727D 9A44 8E25 F44B E208 C946 5EB9
_______________________________________________ users mailing list users@lists.openshift.redhat.com http://lists.openshift.redhat.com/openshiftmm/listinfo/users