srs
srs copied to clipboard
edge One of the servers is shut down and unable to stream.
Please describe the issue you are facing.
Two servers, named A and B, are set up on the edge. Server A is down, while server B is functioning normally. The ports are not causing any issues. When trying to stream to server B, it fails and continuously displays the message "Disconnected. Reconnecting...". However, after starting server A, the streaming works fine.
-
SRS Version:
4.0.205 -
SRS Config:
cat ./conf/origin.cluster.edge.conf
listen 1935;
max_connections 1000;
pid objs/edge.pid;
daemon off;
#srs_log_tank file;
#srs_log_file ./objs/edge.log
srs_log_tank console;
http_server {
enabled on;
listen 8081;
dir ./objs/nginx/html;
}
vhost __defaultVhost__ {
http_remux{
enabled on;
mount [vhost]/[app]/[stream].flv;
hstrs on;
}
cluster {
mode remote;
origin 192.168.0.195:19350 192.168.0.55:19350;
}
}
vhost 192.168.0.55 {
http_remux{
enabled on;
mount [vhost]/[app]/[stream].flv;
hstrs on;
}
cluster {
mode remote;
origin 192.168.0.195:19350 192.168.0.55:19350;
}
}
cat ./conf/origin.cluster.serverA.conf
listen 19350;
max_connections 1000;
daemon on;
#srs_log_tank console;
srs_log_tank file;
srs_log_file ./objs/srs.log
pid ./objs/origin.cluster.serverA.pid;
http_api {
enabled on;
listen 9090;
}
vhost __defaultVhost__ {
cluster {
mode local;
origin_cluster on;
coworkers 192.168.0.195:9090;
}
}
Replay:
> Please describe how to replay the bug? (重现Bug的步骤)
1 Set up 2 servers as edge servers. 2 Start the service. 3 Shut down one of the machines. 4 Push the stream to the other machine.
> Please describe your expectation. I would like to see if SRS has a ping mechanism, so that if the server is shut down, it will directly return as unresponsive. At the same time, I hope to be able to solve this problem. Thank you.
TRANS_BY_GPT3
coworkers 192.168.0.195:9090;
only one
TRANS_BY_GPT3
coworkers 192.168.0.195:9090;
Only one. Isn't this supposed to be filled with the IP address of another machine?
TRANS_BY_GPT3
In addition, the configuration file origin.cluster.serverA.conf of another server is the same except for the IP.
TRANS_BY_GPT3
I didn't understand the meaning.
TRANS_BY_GPT3
I didn't understand what it means.
-
Set up two servers as edge servers. One server should start with the configuration file
origin.cluster.serverA.confandorigin.cluster.edge.conf, while the other server should start with the configuration fileorigin.cluster.serverA.confand configure coworkers. Both servers should be running on ports 19350 and 9090. -
Shut down one of the machines to turn off the server (ping is not reachable).
-
Attempting to stream to port 19350 of the other server will not be successful using OBS streaming.
TRANS_BY_GPT3