[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: Debugging router hostname matching

Hi Henryk.

on Dienstag, 22. August 2017 at 18:03 was written:

> Hi,

> I have exposed service using the following command:

>   oc expose docker-registry
> --hostname=docker-registry-default.ec2-52-59-245-55.eu-central-1.compute.amazonaws.com.nip.io

> I can see route created properly:
> $ oc get routes
> NAME              HOST/PORT                                          
> docker-registry  
> docker-registry-default.ec2-52-59-245-55.eu-central-1.compute.amazonaws.com.nip.io
> docker-registry   5000-tcp                 None

> However it seems that router cannot match my hostname with the service:

> $ curl
> http://docker-registry-default.ec2-52-59-245-55.eu-central-1.compute.amazonaws.com.nip.io
> <html>
> <head><title>301 Moved Permanently</title></head>
> <body bgcolor="white">
> <center><h1>301 Moved Permanently</h1></center>
> <hr><center>nginx/1.4.6 (Ubuntu)</center>
> </body>
> </html>

Please can you use

curl -v http://docker-registry-default.ec2-52-59-245-55.eu-central-1.compute.amazonaws.com.nip.io
curl -v http://docker-registry-default.router.default.svc.cluster.local

Then we can see to which IP the name will be resolved

> Everything works fine when I expose service without --hostname option
> and rely on docker-registry-default.router.default.svc.cluster.local hostname.

> How can I debug why is that happening?

you can take a look into the router config.

oc get po -n default # => pick any router pod

oc rsh <POD> cat haproxy.config > router-config.txt

egrep registry router-config.txt

There should be a entry for the router.

> Many thanks!-- 
> Henryk Konsek

BTW. A oc version would also be nice.

Best Regards

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]