Icecast server reading: context canceled

1. The problem I’m having:

I am running an icecast streaming server on port 8000.

I have set up an icecast server and I use caddy to stream with ssl.
Everything works fine but I see this message every second on the debug output.

2. Error messages and/or full log output:

{"level":"error","ts":1716198459.171986,"logger":"http.handlers.reverse_proxy","msg":"aborting with incomplete response","upstream":"icecast:8000","duration":0.001905052,"request":{"remote_ip":"100.200.12.32","remote_port":"56794","client_ip":"100.200.12.32","proto":"HTTP/1.1","method":"GET","host":"my.server.tld:8443","uri":"/mountpoint1","headers":{"X-Forwarded-Proto":["https"],"X-Forwarded-Host":["my.server.tld:8443"],"User-Agent":["iTunes/12.6.1.25"],"Icy-Metadata":["1"],"Accept":["*/*"],"Accept-Encoding":["gzip, deflate"],"X-Forwarded-For":["100.200.12.32"]},"tls":{"resumed":false,"version":772,"cipher_suite":4865,"proto":"","server_name":"my.server.tld"}},"error":"reading: context canceled"}

3. Caddy version:

2.7.6

4. How I installed and ran Caddy:

a. System environment:

Ubuntu
docker compose

b. Command:

docker compose up -d && docker compose logs -f

c. Service/unit/compose file:

services:
  caddy:
    image: caddy
    container_name: caddy
    restart: unless-stopped
    volumes:
      - ./data:/data
      - ./config:/config
      - ./log:/var/log/caddy
      - ./Caddyfile:/etc/caddy/Caddyfile
      - /srv/www:/var/www/html
    ports:
      - 80:80
      - 443:443
      - 443:443/udp
      - 8443:8443 # for icecast ssl

d. My complete Caddy config:

{
	email me@myemail.com
}

https://my.server.tld:8443 {
	log {
		output discard
	}
	reverse_proxy icecast:8000 {
	}
}

That usually means either the client or the upstream caused the connection to close before Caddy was done proxying the whole response. I couldn’t say why that happens, but either the client or upstream is misbehaving for some reason. I think. Hard to say, really.

1 Like

Thank you. I 'll try to change the streaming encoders and see how it goes.

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