Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

ClosedChannelException after 30 seconds

Aperta
#658 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
25/100
Tipo di issue
Bug
Chiarezza
Da chiarire
Stato di attività
Ferma
Stack tecnologico
scala

Direzione di ricerca

Inizia riproducendo il problema con BlazeServerBuilder, il suo timeout di inattività di 45 secondi e il backend sttp cats-effect, esaminando al contempo i log di ClosedChannelException. Determina se il timeout causa le connessioni fallite alla GitHub API; il lavoro è completo quando la causa è stata identificata e la correzione appropriata è stata documentata o testata.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

module:async-http-client module:blaze-server

logs show:

22:29:50.969 [AsyncHttpClient-885-1] DEBUG org.asynchttpclient.netty.channel.ChannelManager - Adding key: https://api.github.com:443 for channel [id: 0xee990c27, L:/192.168.1.106:37390 - R:api.github.com/140.82.112.6:443]
22:29:50.988 [AsyncHttpClient-773-1] DEBUG io.netty.buffer.PoolThreadCache - Freed 27 thread-local buffer(s) from thread: AsyncHttpClient-773-1
22:29:50.993 [AsyncHttpClient-903-1] DEBUG org.asynchttpclient.netty.channel.NettyConnectListener - Using new Channel '[id: 0xa764e8b8, L:/192.168.1.106:37410 - R:api.github.com/140.82.112.6:443]' for 'GET' to '/repos/github/linux/contributors?page=3'
22:29:50.993 [AsyncHttpClient-903-1] DEBUG io.netty.handler.ssl.SslHandler - [id: 0xa764e8b8, L:/192.168.1.106:37410 - R:api.github.com/140.82.112.6:443] HANDSHAKEN: protocol:TLSv1.2 cipher suite:TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256
22:29:50.995 [AsyncHttpClient-901-1] DEBUG org.asynchttpclient.netty.channel.NettyConnectListener - Using new Channel '[id: 0x21e59fa8, L:/192.168.1.106:37406 - R:api.github.com/140.82.112.6:443]' for 'GET' to '/repos/github/government.github.com/contributors?page=9'
22:29:50.996 [AsyncHttpClient-901-1] DEBUG io.netty.handler.ssl.SslHandler - [id: 0x21e59fa8, L:/192.168.1.106:37406 - R:api.github.com/140.82.112.6:443] HANDSHAKEN: protocol:TLSv1.2 cipher suite:TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256
22:29:51.023 [AsyncHttpClient-923-1] DEBUG org.asynchttpclient.netty.channel.NettyConnectListener - Trying to recover from failing to connect channel [id: 0x4bd636a5, L:null ! R:api.github.com/140.82.112.6:443] with a retry value of true
22:29:51.023 [AsyncHttpClient-923-1] DEBUG org.asynchttpclient.netty.channel.NettyConnectListener - Failed to recover from connect exception: java.nio.channels.ClosedChannelException with channel [id: 0x4bd636a5, L:null ! R:api.github.com/140.82.112.6:443]
22:29:51.028 [AsyncHttpClient-927-1] DEBUG org.asynchttpclient.netty.channel.NettyConnectListener - Trying to recover from failing to connect channel [id: 0x5c1111d1, L:null ! R:api.github.com/140.82.112.6:443] with a retry value of true
22:29:51.028 [AsyncHttpClient-927-1] DEBUG org.asynchttpclient.netty.channel.NettyConnectListener - Failed to recover from connect exception: java.nio.channels.ClosedChannelException with channel [id: 0x5c1111d1, L:null ! R:api.github.com/140.82.112.6:443]

My Server is

    val builder = BlazeServerBuilder[F](global)
      .bindHttp(port, address)
      .withIdleTimeout(45.seconds)
      .withSocketKeepAlive(true)
      .withHttpApp(loggingApp).serve.drain

The idletimeout is 45 seconds.
I'm using version 0.22.8. I'm making requests to the github API via the sttp cats-effect backen if that makes a difference.

Lingua principale
Scala
Stelle
371
Fork
63
Merge medio
1g 18h
PR unite (30g)
8

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di http4s/blaze

Tutte le issue di http4s/blaze

Issue simili

Altre issue su Scala

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.