Hi,
I have a node web application with self-signed tls cert running on docker-compose and traefik. I am able to connect to the web application, but whenever I try to make a POST request from the browser I'm getting Error: connect ECONNREFUSED 127.0.0.1:443
. I'm wondering what are some possible reasons for this error? From my understanding traefik should be expose on :443, and it seems to not be able to connect.
This is the output of the curl:
kakwong at LM-NYB-21014311 in ~/code/shabu on dev
$ curl -v -d 'username=kortina&password=tv' -kL dev.app.com/login
* Trying 127.0.0.1...
* TCP_NODELAY set
* Connected to dev.app.com (127.0.0.1) port 80 (#0)
> POST /login HTTP/1.1
> Host: dev.app.com
> User-Agent: curl/7.54.0
> Accept: */*
> Content-Length: 28
> Content-Type: application/x-www-form-urlencoded
>
* upload completely sent off: 28 out of 28 bytes
< HTTP/1.1 307 Temporary Redirect
< Location: https://dev.app.com/login
< Date: Thu, 24 Oct 2019 16:50:18 GMT
< Content-Length: 18
< Content-Type: text/plain; charset=utf-8
<
* Ignoring the response-body
* Connection #0 to host dev.app.com left intact
* Issue another request to this URL: 'https://dev.app.com/login'
* Trying 127.0.0.1...
* TCP_NODELAY set
* Connected to dev.app.com (127.0.0.1) port 443 (#1)
* ALPN, offering h2
* ALPN, offering http/1.1
* Cipher selection: ALL:!EXPORT:!EXPORT40:!EXPORT56:!aNULL:!LOW:!RC4:@STRENGTH
* successfully set certificate verify locations:
* CAfile: /etc/ssl/cert.pem
CApath: none
* TLSv1.2 (OUT), TLS handshake, Client hello (1):
* TLSv1.2 (IN), TLS handshake, Server hello (2):
* TLSv1.2 (IN), TLS handshake, Certificate (11):
* TLSv1.2 (IN), TLS handshake, Server key exchange (12):
* TLSv1.2 (IN), TLS handshake, Server finished (14):
* TLSv1.2 (OUT), TLS handshake, Client key exchange (16):
* TLSv1.2 (OUT), TLS change cipher, Client hello (1):
* TLSv1.2 (OUT), TLS handshake, Finished (20):
* TLSv1.2 (IN), TLS change cipher, Client hello (1):
* TLSv1.2 (IN), TLS handshake, Finished (20):
* SSL connection using TLSv1.2 / ECDHE-RSA-AES256-GCM-SHA384
* ALPN, server accepted to use h2
* Server certificate:
* subject: CN=TRAEFIK DEFAULT CERT
* start date: Oct 24 16:23:31 2019 GMT
* expire date: Oct 23 16:23:31 2020 GMT
* issuer: CN=TRAEFIK DEFAULT CERT
* SSL certificate verify result: unable to get local issuer certificate (20), continuing anyway.
* Using HTTP2, server supports multi-use
* Connection state changed (HTTP/2 confirmed)
* Copying HTTP/2 data in stream buffer to connection buffer after upgrade: len=0
* Using Stream ID: 1 (easy handle 0x7fbd3f803c00)
> POST /login HTTP/2
> Host: dev.app.com
> User-Agent: curl/7.54.0
> Accept: */*
> Content-Length: 28
> Content-Type: application/x-www-form-urlencoded
>
* Connection state changed (MAX_CONCURRENT_STREAMS updated)!
* We are completely uploaded and fine
< HTTP/2 500
< access-control-allow-origin: https://dev.app.com
< content-type: application/json; charset=utf-8
< date: Thu, 24 Oct 2019 16:50:18 GMT
< etag: W/"22-vuNxeJ3uUTtL9oPjN9SXLohrZi8"
< set-cookie: v_id=fp01-6ce67451-9edb-4ef7-9999-80e3e790294e; Max-Age=157680000; Domain=dev.app.com; Path=/; Expires=Tue, 22 Oct 2024 16:50:18 GMT
< vary: X-HTTP-Method-Override, Origin
< x-powered-by: Express
< content-length: 34
<
* Connection #1 to host dev.app.com left intact
{"error":"There was an an error."}
Thanks!