Skip to content

HTTP error messages: "Server never wrote a response" #2734

@Alseidon

Description

@Alseidon

When starting Pluto today, I encountered some errors. Pluto starts nonetheless and works just fine, but this happened every time I started Pluto again.

Here are the error messages:

julia> using Pluto

julia> Pluto.run()
[ Info: Loading...
┌ Error: handle_connection handler error. 
│ 
│ ===========================
│ HTTP Error message:
│ 
│ ERROR: Server never wrote a response
│ Stacktrace:
│  [1] error(s::String)
│    @ Base ./error.jl:35
│  [2] handle_connection(f::Function, c::HTTP.Connections.Connection{Sockets.TCPSocket}, listener::HTTP.Servers.Listener{Nothing, Sockets.TCPServer}, readtimeout::Int64, access_log::Nothing)
│    @ HTTP.Servers ~/.julia/packages/HTTP/SN7VW/src/Servers.jl:453
│  [3] macro expansion
│    @ ~/.julia/packages/HTTP/SN7VW/src/Servers.jl:386 [inlined]
│  [4] (::HTTP.Servers.var"#16#17"{Pluto.var"#446#456"{Pluto.ServerSession, Pluto.var"#343#345"{Pluto.var"#346#348"{HTTP.Handlers.Router{typeof(Pluto.default_404), typeof(HTTP.Handlers.default405), Nothing}}, Pluto.ServerSession}}, HTTP.Servers.Listener{Nothing, Sockets.TCPServer}, Set{HTTP.Connections.Connection}, Int64, Nothing, Base.Semaphore, HTTP.Connections.Connection{Sockets.TCPSocket}})()
│    @ HTTP.Servers ./task.jl:514
└ @ HTTP.Servers ~/.julia/packages/HTTP/SN7VW/src/Servers.jl:465
┌ Error: error while handling connection. 
│ 
│ ===========================
│ HTTP Error message:
│ 
│ ERROR: IOError: write: broken pipe (EPIPE)
│ Stacktrace:
│   [1] uv_write(s::Sockets.TCPSocket, p::Ptr{UInt8}, n::UInt64)
│     @ Base ./stream.jl:1066
│   [2] unsafe_write(s::Sockets.TCPSocket, p::Ptr{UInt8}, n::UInt64)
│     @ Base ./stream.jl:1120
│   [3] unsafe_write
│     @ ~/.julia/packages/HTTP/SN7VW/src/Connections.jl:129 [inlined]
│   [4] write
│     @ ./strings/io.jl:244 [inlined]
│   [5] write
│     @ ./io.jl:676 [inlined]
│   [6] unsafe_write(http::HTTP.Streams.Stream{HTTP.Messages.Request, HTTP.Connections.Connection{Sockets.TCPSocket}}, p::Ptr{UInt8}, n::UInt64)
│     @ HTTP.Streams ~/.julia/packages/HTTP/SN7VW/src/Streams.jl:95
│   [7] write
│     @ ./strings/io.jl:244 [inlined]
│   [8] handle_connection(f::Function, c::HTTP.Connections.Connection{Sockets.TCPSocket}, listener::HTTP.Servers.Listener{Nothing, Sockets.TCPServer}, readtimeout::Int64, access_log::Nothing)
│     @ HTTP.Servers ~/.julia/packages/HTTP/SN7VW/src/Servers.jl:470
│   [9] macro expansion
│     @ ~/.julia/packages/HTTP/SN7VW/src/Servers.jl:386 [inlined]
│  [10] (::HTTP.Servers.var"#16#17"{Pluto.var"#446#456"{Pluto.ServerSession, Pluto.var"#343#345"{Pluto.var"#346#348"{HTTP.Handlers.Router{typeof(Pluto.default_404), typeof(HTTP.Handlers.default405), Nothing}}, Pluto.ServerSession}}, HTTP.Servers.Listener{Nothing, Sockets.TCPServer}, Set{HTTP.Connections.Connection}, Int64, Nothing, Base.Semaphore, HTTP.Connections.Connection{Sockets.TCPSocket}})()
│     @ HTTP.Servers ./task.jl:514
│ 
│ caused by: Server never wrote a response
│ Stacktrace:
│  [1] error(s::String)
│    @ Base ./error.jl:35
│  [2] handle_connection(f::Function, c::HTTP.Connections.Connection{Sockets.TCPSocket}, listener::HTTP.Servers.Listener{Nothing, Sockets.TCPServer}, readtimeout::Int64, access_log::Nothing)
│    @ HTTP.Servers ~/.julia/packages/HTTP/SN7VW/src/Servers.jl:453
│  [3] macro expansion
│    @ ~/.julia/packages/HTTP/SN7VW/src/Servers.jl:386 [inlined]
│  [4] (::HTTP.Servers.var"#16#17"{Pluto.var"#446#456"{Pluto.ServerSession, Pluto.var"#343#345"{Pluto.var"#346#348"{HTTP.Handlers.Router{typeof(Pluto.default_404), typeof(HTTP.Handlers.default405), Nothing}}, Pluto.ServerSession}}, HTTP.Servers.Listener{Nothing, Sockets.TCPServer}, Set{HTTP.Connections.Connection}, Int64, Nothing, Base.Semaphore, HTTP.Connections.Connection{Sockets.TCPSocket}})()
│    @ HTTP.Servers ./task.jl:514
└ @ HTTP.Servers ~/.julia/packages/HTTP/SN7VW/src/Servers.jl:483

Then some Gtk warnings, and finally the server starts just fine. I can run notebooks normally, so I am not sure if this is important or not, but thought I would signal it anyway.

I am using Pluto v0.19.32 on:

julia> versioninfo()
Julia Version 1.9.4
Commit 8e5136fa297 (2023-11-14 08:46 UTC)
Build Info:
  Official https://julialang.org/ release
Platform Info:
  OS: Linux (x86_64-linux-gnu)
  CPU: 12 × 13th Gen Intel(R) Core(TM) i7-1365U
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-14.0.6 (ORCJIT, goldmont)
  Threads: 1 on 12 virtual cores

EDIT: this stopped happening after some restarts, I don't know how to reproduce the bug, maybe I should close the issue?

Metadata

Metadata

Assignees

No one assigned

    Labels

    HTTP/WSThe connection between backend and frontendother packagesIntegration with other Julia packages

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions