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

Using domain name to push stream to SRS, then forwarding to Alibaba Cloud CDN failed. #2130

Closed
langyastudio opened this issue Jan 6, 2021 · 14 comments
Assignees
Labels
Bug It might be a bug. TransByAI Translated by AI/GPT.
Milestone

Comments

@langyastudio
Copy link

langyastudio commented Jan 6, 2021

Background:

  1. Built SRS media streaming service on ECS server.
    Domain name: srs.xxx.com
  2. Created a streaming domain in Alibaba Cloud CDN Live Center.
    Domain name: cloud-push.xxx.com
  3. Business requirement:
    Push local streams to SRS media streaming service (srs.xxx.com), and then forward them to Alibaba Cloud CDN (cloud-push.xxx.com) to achieve the demand for large-scale live broadcasting.
  4. Version:
    Tested with version 3.0.156.

Problem:

  1. When using the domain name srs.xxx.com, the SRS media streaming server reports forward-related errors, indicating that the forward operation has failed.
    rtmp://srs.xxx.com/live/stream?key=9aa98e26&token=aNc28YIy
    Problem:
  2. When using an IP address, the forward operation is successful.
    rtmp://IP/live/stream?key=9aa98e26&token=aNc28YIy
    Problem:
  3. Key Configuration
    For testing convenience, the push verification of Alibaba Cloud CDN has been disabled.
vhost __defaultVhost__ {
    enabled on;
    forward {
        enabled on;     
        destination cloud-push.xxx.com;
    }
}

Problem:
4. Error message for domain failure:
image

Originally posted by @langyastudio in #1202 (comment)

TRANS_BY_GPT3

@BradChan
Copy link

BradChan commented Jan 7, 2021

The same mistake

TRANS_BY_GPT3

@lingfengfushui
Copy link

lingfengfushui commented Jan 13, 2021

I also encountered a similar problem. I tried several versions of 3.0, but it's the same: streaming with IP to SRS, then forwarding to other CDN domains works fine, and watching with VLC is normal. However, streaming with a domain to SRS, then forwarding to other CDN domains, the logs do not show any abnormalities, but VLC cannot open it. I contacted the technical personnel on the other side and they said they did not receive the stream.

TRANS_BY_GPT3

@langyastudio
Copy link
Author

langyastudio commented Jan 15, 2021

In addition, it is also important to improve the success rate and stability of the forward.

@liguocahng #1202 (comment)
The problem still exists (not reproducible every time):
Streaming to SRS, then forwarding to Alibaba Cloud server through configuration file, the online stream is not displayed on the Alibaba Cloud server, but the resource monitoring in the domain management shows resource flow, and the video cannot be played.

TRANS_BY_GPT3

@langyastudio
Copy link
Author

langyastudio commented Jan 15, 2021

@winlinvip, please pay attention to this issue.

TRANS_BY_GPT3

@liguocahng
Copy link

liguocahng commented Jan 29, 2021

I solved this problem using 2.0 at that time, but 3.0 cannot push the stream.

TRANS_BY_GPT3

@langyastudio
Copy link
Author

langyastudio commented Jan 29, 2021

Thank you.
I am using version 3.0.156. Today, I contacted Alibaba Cloud technical support:

  1. Forwarding to Alibaba Cloud - actual streaming success, but playback failure.
  2. Alibaba Cloud technical staff feedback:
    The obtained IP is 127.0.0.1.
    The forward may carry the vhost parameter, asking me to remove it and try again.

TRANS_BY_GPT3

@liguocahng
Copy link

liguocahng commented Jan 29, 2021

I asked the personnel from Alibaba Cloud to help me for two days. The result they gave seemed to indicate that there was a problem with the stream, as the bandwidth was detected but the stream couldn't be played. Later, I tried it myself and found that using version 2.0 for streaming worked. You can try streaming with version 2.0.

TRANS_BY_GPT3

@lingfengfushui
Copy link

lingfengfushui commented Feb 22, 2021

I solved this problem using 2.0 at that time, but 3.0 cannot push the stream up.

Which version of 2.0 did you use? I tried several versions of 2.0, but it seems that neither using a domain name nor an IP address worked.

TRANS_BY_GPT3

@winlinvip winlinvip added the Bug It might be a bug. label Feb 28, 2021
@winlinvip
Copy link
Member

winlinvip commented Feb 28, 2021

I will see if I can reproduce it, it is possible that it failed due to the vhost.

TRANS_BY_GPT3

@winlinvip
Copy link
Member

Dup to #1202

@winlinvip
Copy link
Member

winlinvip commented Mar 17, 2021

Fixed in SRS 5.0.1

@BenLocal
Copy link

BenLocal commented Jun 15, 2021

@liguocahng Thank you
I am using version 3.0.156. Today, I contacted Alibaba Cloud technical support:

  1. Forwarding to Alibaba Cloud - the actual push is successful, but playback fails
  2. Alibaba Cloud technical personnel feedback
    The obtained IP is 127.0.0.1
    Forwarding may carry the vhost parameter, they asked me to remove it and try again.

I encountered the same error with version v3.0-r5. How was it resolved now?

TRANS_BY_GPT3

@langyastudio
Copy link
Author

langyastudio commented Jun 16, 2021

@BenLocal
Still waiting for the author to resolve this issue #1342.

TRANS_BY_GPT3

@MuffinK
Copy link

MuffinK commented Oct 28, 2021

@liguocahng Thank you @BenLocal
I am using version 3.0.156. Today I contacted Alibaba Cloud technical support:

  1. Forwarding to Alibaba Cloud - actual streaming is successful, but playback fails
  2. Feedback from Alibaba Cloud's technical staff
    The IP obtained is 127.0.0.1
    Forwarding may carry vhost parameters, they asked me to remove and try again.

I encountered the same error with version v3.0-r5. May I know how it was resolved now?

You can try including the CDN domain as the vhost when pushing the stream.
For example:
rtmp://srs.xxx.com/live/stream?key=9aa98e26&token=aNc28YIy &vhost=cloud-push.xxx.com

TRANS_BY_GPT3

@winlinvip winlinvip changed the title 使用域名推流到srs,再forward到阿里云CDN失败 Using domain name to push stream to SRS, then forwarding to Alibaba Cloud CDN failed. Jul 27, 2023
@winlinvip winlinvip added the TransByAI Translated by AI/GPT. label Jul 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug It might be a bug. TransByAI Translated by AI/GPT.
Projects
None yet
Development

No branches or pull requests

10 participants