Once the sentinel client creates a connection and the first sentinel in the endpoints list goes down, it also takes the sentinel process down with it due to an exception {connection_error,econnrefused} from the sentinel connection process which is not specifically handled by the sentinel process. This error is trapped and handled by the handle_info which stops the sentinel process. Since this exception is not handled, it always result in termination of sentinel process on connection failure with the sentinel to get the master.
Upon reconnection of master, the sentinel process is created and since the first sentinel in the endpoints list is still down, it terminates the sentinel process without rotating to the next active sentinel from the endpoints resulting in a reconnect loop until the first sentinel comes up.
Once the sentinel client creates a connection and the first sentinel in the endpoints list goes down, it also takes the sentinel process down with it due to an exception
{connection_error,econnrefused}from the sentinel connection process which is not specifically handled by the sentinel process. This error is trapped and handled by the handle_info which stops the sentinel process. Since this exception is not handled, it always result in termination of sentinel process on connection failure with the sentinel to get the master.Upon reconnection of master, the sentinel process is created and since the first sentinel in the endpoints list is still down, it terminates the sentinel process without rotating to the next active sentinel from the endpoints resulting in a reconnect loop until the first sentinel comes up.