Glimesh / rtmp-ingest

RTMP Ingest for Glimesh.tv -- Work in progress!
MIT License
8 stars 3 forks source link

Broken pipe for chunk writer #19

Open clone1018 opened 2 years ago

clone1018 commented 2 years ago

Seems this is on the RTMP side, not sure how the chunk writer breaks or why the connection doesn't fail. Seems like this is a cause for memory leaks too.

Connect(Error): ResponseBody = &message.NetConnectionConnectResult{Properties:message.NetConnectionConnectResultProperties{FMSVer:\"GO-RTMP/0,0,0,0\", Capabilities:31, Mode:1}, Information:message.NetConnectionConnectResultInformation{Level:\"error\", Code:\"NetConnection.Connect.Failed\", Description:\"Connection failed.\", Data:amf0.ECMAArray{\"type\":\"go-rtmp\", \"version\":\"master\"}}}, Err = write tcp rtmp:edge:61800: write: broken pipe

Failed to wait chunk writer
github.com/yutopp/go-rtmp.(*ChunkStreamer).NewChunkWriter
    /root/go/pkg/mod/github.com/!glimesh/go-rtmp@v0.0.2-0.20220916155712-4f0095b34ee6/chunk_streamer.go:164
github.com/yutopp/go-rtmp.(*ChunkStreamer).Write
    /root/go/pkg/mod/github.com/!glimesh/go-rtmp@v0.0.2-0.20220916155712-4f0095b34ee6/chunk_streamer.go:119
github.com/yutopp/go-rtmp.(*Stream).Write
    /root/go/pkg/mod/github.com/!glimesh/go-rtmp@v0.0.2-0.20220916155712-4f0095b34ee6/stream.go:305
github.com/yutopp/go-rtmp.(*Stream).WriteSetPeerBandwidth
    /root/go/pkg/mod/github.com/!glimesh/go-rtmp@v0.0.2-0.20220916155712-4f0095b34ee6/stream.go:53
github.com/yutopp/go-rtmp.(*serverControlNotConnectedHandler).onCommand
    /root/go/pkg/mod/github.com/!glimesh/go-rtmp@v0.0.2-0.20220916155712-4f0095b34ee6/server_control_not_connected_handler.go:82
github.com/yutopp/go-rtmp.(*streamHandler).handleCommand
    /root/go/pkg/mod/github.com/!glimesh/go-rtmp@v0.0.2-0.20220916155712-4f0095b34ee6/stream_handler.go:207
github.com/yutopp/go-rtmp.(*streamHandler).Handle
    /root/go/pkg/mod/github.com/!glimesh/go-rtmp@v0.0.2-0.20220916155712-4f0095b34ee6/stream_handler.go:82
github.com/yutopp/go-rtmp.(*Stream).handle
    /root/go/pkg/mod/github.com/!glimesh/go-rtmp@v0.0.2-0.20220916155712-4f0095b34ee6/stream.go:309
github.com/yutopp/go-rtmp.(*Conn).handleMessage
    /root/go/pkg/mod/github.com/!glimesh/go-rtmp@v0.0.2-0.20220916155712-4f0095b34ee6/conn.go:192
github.com/yutopp/go-rtmp.(*Conn).runHandleMessageLoop
    /root/go/pkg/mod/github.com/!glimesh/go-rtmp@v0.0.2-0.20220916155712-4f0095b34ee6/conn.go:167
github.com/yutopp/go-rtmp.(*Conn).handleMessageLoop
    /root/go/pkg/mod/github.com/!glimesh/go-rtmp@v0.0.2-0.20220916155712-4f0095b34ee6/conn.go:151
github.com/yutopp/go-rtmp.(*serverConn).Serve
    /root/go/pkg/mod/github.com/!glimesh/go-rtmp@v0.0.2-0.20220916155712-4f0095b34ee6/server_conn.go:64
github.com/yutopp/go-rtmp.(*Server).handleConn
    /root/go/pkg/mod/github.com/!glimesh/go-rtmp@v0.0.2-0.20220916155712-4f0095b34ee6/server.go:116
runtime.goexit
    /usr/local/go/src/runtime/asm_amd64.s:1581
clone1018 commented 2 years ago

WriteSetPeerBandwidth seems to be the call that failed in this particular case.