For HTTP POST request net::ERR_CONNECTION_RESET

What did you do?

I try to post this here But Bot Closed it.

I am trying to install Docker Hub
which runs on port 3000 for http and 3001 for https.

I need to run just HTTP version on LocalNetwork.

I am getting network error in browser console when upload test is running.

What did you see instead?

What version of Traefik are you using?

Version:      2.8.0
Codename:     vacherin
Go version:   go1.17.11
Built:        2022-06-29T15:43:58Z
OS/Arch:      linux/amd64

What is your environment & configuration?

version: "3.3"

services:

  traefik:
    image: "traefik:v2.8"
    container_name: "traefik"
    command:
      - "--log.level=DEBUG"
      - "--api.insecure=true"
      - "--providers.docker=true"
      - "--providers.docker.exposedbydefault=false"
      - "--entrypoints.web.address=:80"
    ports:
      - "5000:80"
      - "5001:8080"
     
    volumes:
      - "/var/run/docker.sock:/var/run/docker.sock:ro"

  openspeedtest:
    image: "openspeedtest/latest"
    container_name: "speedtest-service"
    labels:
      - "traefik.enable=true"
      - "traefik.http.routers.openspeedtest.rule=Host(`unraid.vishnu.pro`)"
      - "traefik.http.routers.openspeedtest.entrypoints=web"

time="2022-07-09T08:37:05Z" level=debug msg="vulcand/oxy/roundrobin/rr: begin ServeHttp on request" Request="{\"Method\":\"POST\",\"URL\":{\"Scheme\":\"\",\"Opaque\":\"\",\"User\":null,\"Host\":\"\",\"Path\":\"/upload\",\"RawPath\":\"\",\"ForceQuery\":false,\"RawQuery\":\"n=0.36725841504914936\",\"Fragment\":\"\",\"RawFragment\":\"\"},\"Proto\":\"HTTP/1.1\",\"ProtoMajor\":1,\"ProtoMinor\":1,\"Header\":{\"Accept\":[\"*/*\"],\"Accept-Encoding\":[\"gzip, deflate\"],\"Accept-Language\":[\"en-US,en;q=0.9,ml;q=0.8\"],\"Connection\":[\"keep-alive\"],\"Content-Length\":[\"31457280\"],\"Content-Type\":[\"application/octet-stream\"],\"Cookie\":[\"_ga=GA1.1.915523062.1654603567; _ga_M7SQP9HBT3=GS1.1.1656487738.10.1.1656488034.0; unraid_9ab9515587850653f020d57cf5338fbe=91c99aa696758bc05c3574b741d5f9d4\"],\"Dnt\":[\"1\"],\"Origin\":[\"http://unraid.vishnu.pro:5000\"],\"Referer\":[\"http://unraid.vishnu.pro:5000/?t=u\"],\"User-Agent\":[\"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/103.0.0.0 Safari/537.36\"],\"X-Forwarded-Host\":[\"unraid.vishnu.pro:5000\"],\"X-Forwarded-Port\":[\"5000\"],\"X-Forwarded-Proto\":[\"http\"],\"X-Forwarded-Server\":[\"884efa581f66\"],\"X-Real-Ip\":[\"192.168.1.9\"]},\"ContentLength\":31457280,\"TransferEncoding\":null,\"Host\":\"unraid.vishnu.pro:5000\",\"Form\":null,\"PostForm\":null,\"MultipartForm\":null,\"Trailer\":null,\"RemoteAddr\":\"192.168.1.9:62347\",\"RequestURI\":\"/upload?n=0.36725841504914936\",\"TLS\":null}"

Hello,

I tested your configuration locally and I don't reproduce your problem.

Have you tested that on several browsers?

I think you have a network issue or you don't have enough resources (RAM, CPU) to handle the load.

Note: I tested on Firefox, Firefox Dev Edition, and Chrome.

docker-compose.yml
version: "3.9"

services:
  traefik:
    image: traefik:v2.8.0
    container_name: traefik
    command:
      - --log.level=INFO
      - --api.insecure=true
      - --providers.docker=true
      - --providers.docker.exposedbydefault=false
      - --entrypoints.web.address=:80
    ports:
      - 5000:80
      - 8080:8080
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock:ro

  openspeedtest:
    image: openspeedtest/latest
    container_name: speedtest-service
    labels:
      traefik.enable: 'true'
      traefik.http.routers.openspeedtest.rule: Host(`openspeedtest.localhost`)
      traefik.http.routers.openspeedtest.entrypoints: web
Browser consoles


Hello,

Network error occurs when performing on HTTP. @Idez Your image shows you are on HTTPS connection.

1 Like

I was testing this on my Unraid Server using Portainer.

Now i run this on my M1 MacMini and got same error.

Many other people reported me the same.

If you run this on FireFox you may not see the error.

But upload speed will be unrealistically high.

this is 1GbE

Posted this Last Year Unrealisticly high upload measurements · Issue #4 · openspeedtest/Speed-Test · GitHub

I don't know, what went wrong.

Safari

Chrome Dev
also got same issue

Tested on Unraid Server, Found Same Issue
Tested on M1 MacMini, Found Same Issue.

Actually something is wrong, or consistently i am doing something wrong..


FireFox is not showing secure of me, if i load the page from another IP, I think for localhost it will show secure logo. But i did't get 200 or send full 30Mb of data, connection is reseting on FireFox too.

I try this docker compose on Unraid , M1MacMini, LG Gram (Windows )

Tested on Chrome, Chrome Dev, Safari. We can see Errors, on Firefox it will not show error, but not showing 200.

Tested this on a Brand New Linode

Please run a test and check your browser console on Chrome , Safari , Edge etc. @Mercury

if you look at firefox console, you can see that each request only transferred less than 5 Mb, it should be 30Mb per request.

I don't know why FireFox is showing secure icon for HTTP connection ??
Edit : I think it is because of localhost connection.
If i remember correctly, when i was debugging for HTTPS last year, i noticed, traefik is sending TLS handshake to HTTP server for post request, or something similar.

I don't know why i need to add
"traefik.http.middlewares.limit.buffering.maxRequestBodyBytes
now it is working for me.

mytraefik yml


version: "3.9"
services:
  traefik:
    image: traefik:v2.8.0
    container_name: traefik
    command:
      - --log.level=INFO
      - --api.insecure=true
      - --providers.docker=true
      - --providers.docker.exposedbydefault=false
      - --entrypoints.web.address=:80
      - --entrypoints.websecure.address=:443
    ports:
      - 5000:80
      - 5001:443
      - 8080:8080
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock:ro
  openspeedtest:
    image: openspeedtest/latest
    container_name: speedtest-service
    labels:
      - "traefik.enable=true"
      - "traefik.http.routers.openspeedtest.rule=Host(`192.168.1.15`)"
      - "traefik.http.routers.openspeedtest.entrypoints=web"
      - "traefik.http.middlewares.limit.buffering.maxRequestBodyBytes=10000000000"
      - "traefik.http.routers.openspeedtest.middlewares=limit"
      - "traefik.http.routers.openspeedtest-https.rule=Host(`192.168.1.15`)"
      - "traefik.http.routers.openspeedtest-https.entrypoints=websecure"
      # - "traefik.http.middlewares.limit.buffering.maxRequestBodyBytes=10000000000"
      - "traefik.http.routers.openspeedtest-https.middlewares=limit"
      - "traefik.http.routers.openspeedtest-https.tls=true"
      - "traefik.http.routers.openspeedtest-https.tls.certresolver=leresolver"

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.