srs icon indicating copy to clipboard operation
srs copied to clipboard

edge One of the servers is shut down and unable to stream.

Open godfery opened this issue 3 years ago • 5 comments

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.

  1. SRS Version: 4.0.205

  2. 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

godfery avatar Jun 24 '22 03:06 godfery

coworkers 192.168.0.195:9090;

only one

TRANS_BY_GPT3

jinleileiking avatar Jun 24 '22 05:06 jinleileiking

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

godfery avatar Jun 24 '22 07:06 godfery

In addition, the configuration file origin.cluster.serverA.conf of another server is the same except for the IP.

TRANS_BY_GPT3

godfery avatar Jun 24 '22 07:06 godfery

I didn't understand the meaning.

TRANS_BY_GPT3

winlinvip avatar Jun 25 '22 12:06 winlinvip

I didn't understand what it means.

  1. Set up two servers as edge servers. One server should start with the configuration file origin.cluster.serverA.conf and origin.cluster.edge.conf, while the other server should start with the configuration file origin.cluster.serverA.conf and configure coworkers. Both servers should be running on ports 19350 and 9090.

  2. Shut down one of the machines to turn off the server (ping is not reachable).

  3. Attempting to stream to port 19350 of the other server will not be successful using OBS streaming.

TRANS_BY_GPT3

godfery avatar Jun 27 '22 02:06 godfery