Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RTMP Ingest Crashes with "panic: interface conversion" Error (Various Camera Sources) #759

Closed
Yazdani2424 opened this issue May 17, 2024 · 0 comments
Labels
bug Program error or software error or software anomaly.

Comments

@Yazdani2424
Copy link

am using Restreamer (datarhei/restreamer:vaapi-latest) on a Ubunto 22.04 system with Docker. I have configured various camera models to stream directly to Restreamer using the RTMP protocol, but the restreamer-ui:ingest process repeatedly crashes with the following error:
panic: interface conversion: interface {} is nil, not flvio.AMFMap
This seems to occur whenever an RTMP stream is initiated, regardless of the camera model or connection method used. Prior to the crash, the logs show a "NOTFOUND" action for the RTMP stream.

Steps to Reproduce:

1.Basic Command (Successful):

docker run -d -p 8080:8080 datarhei/restreamer:vaapi-latest
(Container runs as confirmed by docker ps)

2.Add Volumes (Successful):

docker run -d -p 8080:8080 -v /opt/core/config:/core/config -v /opt/core/data:/core/data datarhei/restreamer:vaapi-latest
(Container runs as confirmed by docker ps)

3.Add Privileged Mode (Successful):

docker run -d -p 8080:8080 -v /opt/core/config:/core/config -v /opt/core/data:/core/data --privileged datarhei/restreamer:vaapi-latest
(Container runs as confirmed by docker ps)

4.Expose Additional Ports (Failure):

docker run -d -p 8080:8080 -p 8181:8181 -p 1935:1935 -p 1936:1936 -p 6000:6000/udp -v /opt/core/config:/core/config -v /opt/core/data:/core/data --privileged datarhei/restreamer:vaapi-latest
(Container exits immediately, not visible in docker ps)

Expected Behavior:

The container should continue to run after exposing additional ports.

Actual Behavior:

The container exits immediately when additional ports are exposed.

Logs:
`root@Restreamer:~# docker logs 905ad556b2a7
ts=2024-05-17T12:28:26Z level=INFO component="Import" msg="Database import" version="v1"
ts=2024-05-17T12:28:26Z level=INFO component="Import" msg="Checking for database ..." version="v1"
ts=2024-05-17T12:28:26Z level=INFO component="Import" msg="Database doesn't exist and nothing will be imported" database="/core/config/v1.json" version="v1"
ts=2024-05-17T12:28:26Z level=INFO component="Migration" msg="Migrating processes ..."
ts=2024-05-17T12:28:26Z level=INFO component="Migration" msg="Migrating processes done"
ts=2024-05-17T12:28:26Z level=INFO component="Migration" msg="Completed"
ts=2024-05-17T12:28:26Z level=INFO component="Core" application="datarhei-core" arch="linux/amd64" branch="main" build="2024-04-05T10:14:25Z" commit="781c98f2be11b406262daa9244042f6537394c5e" compiler="go1.22.2" license="Apache License Version 2.0" repository="https://github.com/datarhei/core" version="16.15.0"
ts=2024-05-17T12:28:26Z level=INFO component="Core" msg="Read config file" path="/core/config/config.json"
ts=2024-05-17T12:28:26Z level=INFO component="Process" msg="Created" id="restreamer-ui:ingest:4337b13e-fb9b-426f-9858-e044692522c4_snapshot"
ts=2024-05-17T12:28:26Z level=INFO component="Process" msg="Created" id="restreamer-ui:ingest:4337b13e-fb9b-426f-9858-e044692522c4"
ts=2024-05-17T12:28:26Z level=INFO component="HTTP" msg="Server started" address=":8080"
ts=2024-05-17T12:28:26Z level=INFO component="RTMP" msg="Server started" address=":1935"
ts=2024-05-17T12:28:26Z level=INFO component="Process" msg="Starting" id="restreamer-ui:ingest:4337b13e-fb9b-426f-9858-e044692522c4_snapshot"
ts=2024-05-17T12:28:26Z level=INFO component="Process" msg="Started" id="restreamer-ui:ingest:4337b13e-fb9b-426f-9858-e044692522c4_snapshot"
ts=2024-05-17T12:28:26Z level=INFO component="Process" msg="Starting" id="restreamer-ui:ingest:4337b13e-fb9b-426f-9858-e044692522c4"
ts=2024-05-17T12:28:26Z level=INFO component="Process" msg="Failed" id="restreamer-ui:ingest:4337b13e-fb9b-426f-9858-e044692522c4_snapshot"
ts=2024-05-17T12:28:26Z level=INFO component="Process" msg="Stopped" id="restreamer-ui:ingest:4337b13e-fb9b-426f-9858-e044692522c4_snapshot"
ts=2024-05-17T12:28:26Z level=INFO component="Process" msg="Scheduling restart in 1m0s" id="restreamer-ui:ingest:4337b13e-fb9b-426f-9858-e044692522c4_snapshot"
ts=2024-05-17T12:28:26Z level=INFO component="Process" msg="Started" id="restreamer-ui:ingest:4337b13e-fb9b-426f-9858-e044692522c4"
ts=2024-05-17T12:28:26Z level=INFO component="RTMP" action="NOTFOUND" address=":1935" client="[::1]:41426" path="/webcam/4337b13e-fb9b-426f-9858-e044692522c4.stream" who="PLAY"
ts=2024-05-17T12:28:26Z level=INFO component="Process" msg="Failed" id="restreamer-ui:ingest:4337b13e-fb9b-426f-9858-e044692522c4"
ts=2024-05-17T12:28:26Z level=INFO component="Process" msg="Stopped" id="restreamer-ui:ingest:4337b13e-fb9b-426f-9858-e044692522c4"
ts=2024-05-17T12:28:26Z level=INFO component="Process" msg="Scheduling restart in 15s" id="restreamer-ui:ingest:4337b13e-fb9b-426f-9858-e044692522c4"
panic: interface conversion: interface {} is nil, not flvio.AMFMap

goroutine 84 [running]:
github.com/datarhei/joy4/format/rtmp.(*Conn).handleMsg(0xc0004fe1a0, 0x121b60?, 0xc0?, 0x80?, {0xc000436180, 0x1e, 0x1e})
    github.com/datarhei/[email protected]/format/rtmp/rtmp.go:1672 +0x877
github.com/datarhei/joy4/format/rtmp.(*Conn).readChunk(0xc0004fe1a0)
    github.com/datarhei/[email protected]/format/rtmp/rtmp.go:1541 +0xeb4
github.com/datarhei/joy4/format/rtmp.(*Conn).pollMsg(0xc0004fe1a0)
    github.com/datarhei/[email protected]/format/rtmp/rtmp.go:379 +0x8d
github.com/datarhei/joy4/format/rtmp.(*Conn).pollAVTag(...)
    github.com/datarhei/[email protected]/format/rtmp/rtmp.go:362
github.com/datarhei/joy4/format/rtmp.(*Conn).probe(0xc0004fe1a0)
    github.com/datarhei/[email protected]/format/rtmp/rtmp.go:695 +0x1d2
github.com/datarhei/joy4/format/rtmp.(*Conn).prepare(0xc0004fe1a0, 0x3, 0x1)
    github.com/datarhei/[email protected]/format/rtmp/rtmp.go:948 +0x5b
github.com/datarhei/joy4/format/rtmp.(*Conn).Streams(...)
    github.com/datarhei/[email protected]/format/rtmp/rtmp.go:961
github.com/datarhei/core/v16/rtmp.(*server).handlePublish(0xc0004a5260, 0xc0004fe1a0)
    github.com/datarhei/core/v16/rtmp/rtmp.go:471 +0x1c5
github.com/datarhei/joy4/format/rtmp.(*Server).handleConn(0xc0005e3090, 0xc0004fe1a0)
    github.com/datarhei/[email protected]/format/rtmp/rtmp.go:86 +0xa3
github.com/datarhei/joy4/format/rtmp.(*Server).Serve.func1()
    github.com/datarhei/[email protected]/format/rtmp/rtmp.go:177 +0x25
created by github.com/datarhei/joy4/format/rtmp.(*Server).Serve in goroutine 36
    github.com/datarhei/[email protected]/format/rtmp/rtmp.go:176 +0x19c
root@Restreamer:~#`

Additional Information:

Restreamer version: datarhei/restreamer:vaapi-latest
Docker version: 26.1.2
Operating System: UBUNTU 22.04

Please investigate why exposing the additional ports (8181, 1935, 1936, 6000) causes the Restreamer container to exit immediately. This information suggests that there might be a conflict with the specific port configuration or something else interfering with the container's ability to start when these ports are exposed.

Thank you!

I hope this more detailed issue description helps the Restreamer developers pinpoint the cause of the problem. Let me know if you have any other questions.

@Yazdani2424 Yazdani2424 added the bug Program error or software error or software anomaly. label May 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Program error or software error or software anomaly.
Projects
None yet
Development

No branches or pull requests

1 participant