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

Wrong stream status in database #6999

Open
SebastienGautier opened this issue Feb 4, 2025 · 1 comment
Open

Wrong stream status in database #6999

SebastienGautier opened this issue Feb 4, 2025 · 1 comment
Assignees

Comments

@SebastienGautier
Copy link

Short description

We've had this issue a few times now where the stream status in the database does not reflect reality.
Last night a customer tried to stream but his connection got refused "because it's streaming" when it was not. In that specific case it somehow solved itself but I can't say how.
I suspect this is due to autoscaling shutting down the instance and not letting it update the state in the database.

We've had similar issues in the past.
I also have another example in mind where it was the opposite, the stream was ingesting properly but the status was "finished" in mongo.

Environment

  • Operating system and version: Ubuntu 22.04
  • Java version: openjdk 17.0.12
  • Ant Media Server version: 2.12.0
  • Browser name and version: unrelated

Expected behavior

When trying to stream we should be able to even if the database reports the stream as already broadcasting when it's actually not

Actual behavior

AMS refused the connection

Logs

[AMS] 2025-02-04 05:17:58,436 [NioProcessor-10] INFO  o.r.server.net.rtmp.BaseRTMPHandler - connectionClosed: VWPZYY0TVSVOS
[AMS] 2025-02-04 05:17:58,436 [RTMPConnectionExecutor-1] ERROR o.red5.server.stream.StreamService - You are not allowed to publish the stream ca629c14-47bc-2d27-bfb9-123456789101
[AMS] 2025-02-04 05:17:58,436 [NioProcessor-10] INFO  o.r.s.net.rtmp.RTMPMinaConnection - Connection is closed: VWPZYY0TVSVOS
[AMS] 2025-02-04 05:17:58,436 [RTMPConnectionExecutor-1] INFO  o.r.server.net.rtmp.BaseRTMPHandler - connectionClosed: VWPZYY0TVSVOS
[AMS] 2025-02-04 05:17:58,435 [RTMPConnectionExecutor-1] INFO  i.a.e.webrtc.WebRTCApplication - W3C x-category:session x-event:disconnect c-ip:192.168.222.187 c-client-id:4991
[AMS] 2025-02-04 05:17:58,435 [RTMPConnectionExecutor-1] INFO  i.a.s.AcceptOnlyStreamsInDataStore - Does not accept stream:ca629c14-47bc-2d27-bfb9-123456789101 because it's streaming

Do you check the status on a regular basis when ingesting a stream, if it does not have the broadcasting status then update it ?
Do you check the updateTime when a new connection comes to allow it if the updateTime is older than let's say 15 seconds ?
If not what do you think of my proposal or do you have better ideas to handle these cases ?

Regards,
Sébastien

@burak-58 burak-58 moved this to Next Sprint in Ant Media Server Feb 11, 2025
@burak-58 burak-58 self-assigned this Feb 11, 2025
@burak-58 burak-58 moved this from Next Sprint to 🔖 Sprint in Ant Media Server Feb 11, 2025
@burak-58
Copy link
Contributor

We discussed with @SebastienGautier in a meeting. There is already a control for checking broadcast status as suggested. We will observe the issue and check the logs with the latest version. I will close this for now and we can reopen if we encounter the issue again.

@burak-58 burak-58 moved this from 🔖 Sprint to After sprint in Ant Media Server Feb 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: After sprint
Development

No branches or pull requests

2 participants