-
-
Notifications
You must be signed in to change notification settings - Fork 5.4k
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
Docker source station cluster, two-way streaming cannot be played simultaneously #1501
Comments
First praise, the description is very clear, I will see if I can reproduce it.
|
Unable to reproduce the issue, please provide:
|
Also, could you please provide some additional information on how to start SRS using Docker?
|
https://hub.docker.com/r/ossrs/srs Launch Docker according to the instructions here.
|
docker pull ossrs/srs:3.0 |
docker run -v /root/config.conf:/srs/conf/docker.conf -p 1935:1935 -p 8080:8080 -p 9090:9090 ossrs/srs:3.0 |
servA,IP 192.168.0.60
servB
edge
|
The log of Edge has a warning:
In fact, the IP assigned by Docker for all three servers is this:
This will result in connecting to oneself, causing a timeout of 5000ms with no data. 107 is the origin link.
It is connected to serverA. The logs are as follows:
The address returned by serverA is this docker IP, which is 172.17.0.2. In other words:
There are two remaining issues to investigate:
|
Only one video can be played, which is ServA's. The address returned by ServA for ServB is incorrect, so it cannot be played. The reason why the problem could not be reproduced is because the docker containers were deployed on the same machine, which means that the containers can communicate with each other. In other words, all the docker containers are in the same internal network, so the problem could not be reproduced.
|
@zynfly You're right, I confirmed the first issue, srs-docker also has a problem. 107 is the origin link, accessing serverA, and being redirected to serverB (172.17.0.4).
serverA returns the docker IP of serverB (172.17.0.4).
However, edge and serverB are running in the same docker, as @zynfly mentioned, so they can communicate with each other.
|
Second question, from the logs, it appears that there has never been a successful playback of video/test2.
|
When the origin server cluster redirects, it returns the IP to the client (usually the edge) in the following order: For example, when the stream is on server B and the edge accesses server A, server A will return server B's address to the edge through RTMP Redirect.
The following are definitions of "localhost" and "loopback":
|
In Docker or NAT network environment, there are no accessible addresses. All network card addresses are internal addresses and cannot be accessed externally. In Docker environment, the accessible IP should be the host machine IP, while in NAT environment, the accessible IP is the gateway IP.
|
@zynfly, what you said is the second situation mentioned above. You can read it. The rules mentioned above can support your requirements, as well as support having a direct public IP, which means a non-docker situation.
|
Docker image: https://github.com/ossrs/srs-docker#aliyun Fixed in v3.0-a3, 3.0.67 Redirect edge to serverB (19351) on serverB.
The edge first connects to serverA (172.17.0.3:19350), and then connects to serverB (172.17.0.2:19351).
Verification passed.
|
Moved to #464 (comment) |
Regarding the storage issue of the origin server cluster, please refer to: #1595 (comment) Regarding the API issue of the origin server cluster, please refer to: #1607 (comment)
|
1 similar comment
Regarding the storage issue of the origin server cluster, please refer to: #1595 (comment) Regarding the API issue of the origin server cluster, please refer to: #1607 (comment)
|
Overview
Deployment of Two Origin Server Clusters and an Edge Server Using Docker
Deploy two origin server clusters and an edge server using Docker. The two streaming sources will be pushed to the two origin servers respectively, and VLC will play the RTMP stream from the edge server.
Question
Occasionally, we can play together, but most of the time we can only play videos from one source site.
Deployment Environment
Origin Server, EDGE:
CentOS 7 (virtual machine), pulled SRS 3.0 from Docker Hub.
Configuration file for origin server A:
Configuration file for origin server B:
Edge configuration file:
Live streaming:
Windows 10 (Virtual Machine), OBS Studio 24.0.3,
Streaming test1 configuration:
Streaming test2 configuration:
Player:
win10 (local), VLC media player 3.0.8
test1 playback:
test2 playback:
TRANS_BY_GPT3
The text was updated successfully, but these errors were encountered: