Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem during HTTPS redirection #952

Closed
nmengin opened this issue Dec 9, 2016 · 1 comment
Closed

Problem during HTTPS redirection #952

nmengin opened this issue Dec 9, 2016 · 1 comment
Labels
kind/bug/confirmed a confirmed bug (reproducible). priority/P0 needs hot fix status/5-frozen-due-to-age
Milestone

Comments

@nmengin
Copy link
Contributor

nmengin commented Dec 9, 2016

Description

Traefik used with Docker Swarm cluster (not swarm mode).
HTTP automatically redirected to HTTPS.
URL malformed during Rediirection.

Steps to reproduce

Traefik configuration

defaultEntryPoints = ["http", "https"]
[entryPoints]
   [entryPoints.http]
   address = ":80"
     [entryPoints.http.redirect]
       entryPoint = "https"
  [entryPoints.https]
    address = ":443"
    [entryPoints.https.tls]
      [[entryPoints.https.tls.certificates]]
         CertFile = "/certs/traefik/cert.pem"
         KeyFile = "/certs/traefik/key.pem"

Traefik docker-compose file

services:
  traefik:
...
    image: myimages/traefik:1.1.0.2
...
    ports:
      - "443:443"
      - "80:80"
    command: --docker=true --docker.endpoint="tcp://mySwarmMger:3376" --docker.exposedbydefault=false --docker.domain="mydomain.io" --docker.tls=true --docker.tls.ca=/certs/docker/ca.pem --docker.tls.cert=/certs/docker/cert.pem --docker.tls.key=/certs/docker/key.pem
...

Apache docker-compose file

services:
  http:
    image: myimages/http
    hostname: http
    container_name: c_http
    expose:
     - "80"
     - "443"
    networks:
     - traefik
    labels:
      - "traefik.port=80"
      - "traefik.frontend.rule=Host:2_8_9.mydomain.io"
      - "traefik.enable=true"
      - "traefik.docker.network=traefik_net"

Curl command : http://2_8_9.mydomain.io/

Result

* STATE: INIT => CONNECT handle 0x600057340; line 1397 (connection #-5000)
* Added connection 0. The cache now contains 1 members
*   Trying 10.206.3.76...
* TCP_NODELAY set
* STATE: CONNECT => WAITCONNECT handle 0x600057340; line 1450 (connection #0)
* Connected to 2_8_9.mydomain.io (10.206.3.76) port 80 (#0)
* STATE: WAITCONNECT => SENDPROTOCONNECT handle 0x600057340; line 1557 (connection #0)
* Marked for [keep alive]: HTTP default
* STATE: SENDPROTOCONNECT => DO handle 0x600057340; line 1575 (connection #0)
>GET / HTTP/1.1
>Host: 2_8_9.mydomain.io
>User-Agent: curl/7.50.3
>Accept: */*
>
* STATE: DO => DO_DONE handle 0x600057340; line 1654 (connection #0)
* STATE: DO_DONE => WAITPERFORM handle 0x600057340; line 1781 (connection #0)
* STATE: WAITPERFORM => PERFORM handle 0x600057340; line 1791 (connection #0)
* HTTP 1.1 or later with persistent connection, pipelining supported
< HTTP/1.1 302 Found
< Location: https://2:443_8_9.mydomain.io/
< Date: Thu, 08 Dec 2016 13:58:04 GMT
< Content-Length: 5
< Content-Type: text/plain; charset=utf-8
<
* Ignoring the response-body
* multi_done
* Curl_http_done: called premature == 0
* Connection #0 to host 2_8_9.mydomain.io left intact
* Issue another request to this URL: 'https://2:443_8_9.mydomain.io/'
* STATE: PERFORM => CONNECT handle 0x600057340; line 1931 (connection #-5000)
* Added connection 1. The cache now contains 2 members
* getaddrinfo(3) failed for 2:443
* Couldn't resolve host '2'
* Closing connection 1
* The cache now contains 1 members
* Expire cleared
curl: (6) Couldn't resolve host '2'

Apparently there is a problem with '_' in URL.

@emilevauge emilevauge added bug priority/P0 needs hot fix labels Dec 9, 2016
@emilevauge emilevauge added this to the 1.1 milestone Dec 9, 2016
@emilevauge
Copy link
Member

Fixed by #947

@ldez ldez added the kind/bug/confirmed a confirmed bug (reproducible). label Apr 29, 2017
@traefik traefik locked and limited conversation to collaborators Sep 1, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
kind/bug/confirmed a confirmed bug (reproducible). priority/P0 needs hot fix status/5-frozen-due-to-age
Projects
None yet
Development

No branches or pull requests

4 participants