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

Creating semaphore failed when trying to push RTMP stream from Axis camera #31

Closed
zocker-160 opened this issue Nov 18, 2021 · 7 comments

Comments

@zocker-160
Copy link

zocker-160 commented Nov 18, 2021

I am on a Debian machine and I am getting the following errors when trying to pull the video stream from an Axis camera

Mon 15 Nov 2021, 17:20:12 | WARN | Input for stream multicast uncleanly shut down! Restarting...
Mon 15 Nov 2021, 17:20:12 | FAIL | Creating semaphore /MstSTAT failed: No such file or directory
Mon 15 Nov 2021, 17:20:07 | FAIL | Creating copy of semaphore /MstUSERmulticast failed: No such file or directory
Mon 15 Nov 2021, 17:20:02 | FAIL | Creating semaphore /MstUSERmulticast failed: No such file or directory
Mon 15 Nov 2021, 17:19:57 | WARN | Could not get stream 'multicast' config!
Mon 15 Nov 2021, 17:11:02 | ACCS | Session <d0cbc190c1de060b40ec2ede70ae0485> kirche (MP4) from 62.178.79.107 ended after 993s, avg 482KB/s up 0KB/s down. Tags: [UA:Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/95.0.4638.69 Safari/537.36 Edg/95.0.1020.53]
Mon 15 Nov 2021, 17:10:46 | FAIL | onFail 'kirche': Could not connect to stream
Mon 15 Nov 2021, 17:10:26 | WARN | Timestamps went from 0 to 1871710 (increased): rewriting timestamps for continuity
Mon 15 Nov 2021, 17:10:19 | ACCS | Session <b685ea8c3ff9be5dd914bdeb9801243d> kirche (INPUT:RTMP) from 62.157.176.34 ended after 2s, avg 0KB/s up 0KB/s down.
Mon 15 Nov 2021, 17:10:11 | ACCS | Session <16431b88d22512c3a71de65fa4592c27> kirche (INPUT:RTMP) from 62.157.176.34 ended after 1s, avg 3KB/s up 3KB/s down.
Mon 15 Nov 2021, 17:10:05 | ACCS | Session <a7bb8de404de83591b870c7485857229> kirche (INPUT:RTMP) from 62.157.176.34 ended after 1772s, avg 0KB/s up 513KB/s down.
Mon 15 Nov 2021, 17:10:01 | WARN | Dropping input track 1: disconnect request from buffer
Mon 15 Nov 2021, 17:10:01 | WARN | Dropping input track 0: disconnect request from buffer
Mon 15 Nov 2021, 17:10:00 | WARN | Dropping kirche (AAC) track 1@k840 (nextP=4294967295, lastP=810): disappeared from metadata
Mon 15 Nov 2021, 17:10:00 | WARN | Dropping kirche (H264) track 0@k860 (nextP=4294967295, lastP=858): disappeared from metadata
Mon 15 Nov 2021, 17:10:00 | WARN | Erasing kirche track 1 (audio/AAC) because not updated for 51s (> 50s)
Mon 15 Nov 2021, 17:10:00 | WARN | Erasing kirche track 0 (video/H264) because not updated for 51s (> 50s)
Mon 15 Nov 2021, 17:09:57 | WARN | Input for stream multicast uncleanly shut down! Restarting...
Mon 15 Nov 2021, 17:09:57 | FAIL | Creating semaphore /MstSTAT failed: No such file or directory
Mon 15 Nov 2021, 17:09:52 | FAIL | Creating copy of semaphore /MstUSERmulticast failed: No such file or directory
Mon 15 Nov 2021, 17:09:47 | FAIL | Creating semaphore /MstUSERmulticast failed: No such file or directory
Mon 15 Nov 2021, 17:09:42 | WARN | Could not get stream 'multicast' config!
Mon 15 Nov 2021, 17:09:41 | ACCS | Session <d4632f503a2fca015614e416bb1315f2> kirche (INPUT:RTMP) from 62.157.176.34 ended after 1s, avg 3KB/s up 3KB/s down.
Mon 15 Nov 2021, 17:09:30 | WARN | Waiting for lookahead (5000ms in 2 tracks) timed out - resetting lookahead!
Mon 15 Nov 2021, 17:09:30 | WARN | Track 0: 1795360 <= 1795360

any ideas what could be the cause of this issue?

@Rokamun
Copy link
Contributor

Rokamun commented Nov 18, 2021

Hey there,

Could you perhaps grab the log from the access log or MistController directly? If you're running MistServer as a service you should be able to get it with:

journalctl -fn 500 --unit=mistserver

Could you also share which stream this is about and how it's set up (sourcewise)?
We don't currently support RTMP pull input, so I assume this is about the stream "kirche" that looks like a RTMP push input stream. It reports back that it hasn't been updated for 50 seconds. However the semaphore error messages around it look like shared memory is deleted.

MistServer heavily relies on shared memory as it contains both the settings and the stream data. I vaguely remember that Debian 10 deletes shared memory when you log off as root. I'm not sure if that might be the case here. Either way you will probably need to shut down MistServer and reboot it if shared memory has been completely deleted.

@zocker-160 zocker-160 changed the title Creating semaphore failed when trying to pull RTMP stream from Axis camera Creating semaphore failed when trying to push RTMP stream from Axis camera Nov 18, 2021
@zocker-160
Copy link
Author

zocker-160 commented Nov 18, 2021

thank you for this very fast reply.

Yes you are right I meant "push" not pull.

The stream on the management interface looks like this:

Screenshot_20211118_145547

Could this also be caused by a permission issue?

What would your recommendations be to mitigate the shared memory issue?

PS: I am using the pro version if that is of any relevance

EDIT: I will provide you with the journalctl soon

@Rokamun
Copy link
Contributor

Rokamun commented Nov 18, 2021

The shared memory issue is something you can test. Simply ssh into the server as root while the stream is in use then log off with ctrl+d. If the stream drops you'll know it is the issue.

Recommendations would probably be best after we know it's the issue :)

@zocker-160
Copy link
Author

I just did a test and the same error occur when trying to preview an SRT stream.

I will test the log off during stream as soon as possible, thanks for the quick answers!

@Rokamun
Copy link
Contributor

Rokamun commented Nov 18, 2021

Just to be sure:
Do restart MistServer if you think shared memory has been deleted. MistServer will definitely not perform correctly if this happens. And yeah it won't matter what kind of stream input it is, all will fail in this case

@Rokamun
Copy link
Contributor

Rokamun commented Dec 13, 2021

I'm closing the issue as there hasn't been an update for 25 days now. If you still have this issue please feel free to re-open it!

@Rokamun Rokamun closed this as completed Dec 13, 2021
@zocker-160
Copy link
Author

@Rokamun oh I forgot about this issue, sorry!

The problem was solved by rebooting and running MistServer as a service instead of in a terminal.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants