-
-
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
srs.librtmp is published to srs2, occasionally encountering handshake failure. #750
Comments
Where are the server logs? If possible, can you capture the packets using tcpdump?
|
The above code itself is an infinite loop attempt. It returns -1 every time. The possibility of srs.librtmp's srs_rtmp_handshake returning -1 is extremely low. I found one instance in the code: srs_librtmp_context_resolve_host calls srs_dns_resolve and returns -1 if the resolved IP address is empty. Is there a problem with DNS resolution? The probability is too low. I haven't seen any other branches that return -1.
|
If it is a DNS issue, then the server should not have any log printing.
|
Oh, I see. The returned value is errno, and only when srs_dns_resolve fails to resolve, it will return -1. It seems that the DNS resolution has failed, so retrying won't help.
|
I will also change this to errno, not returning -1, too ordinary...
|
This problem is basically unsolvable, sometimes DNS resolution is problematic.
|
When reproducing the issue next time, replace the domain name with the IP address to test if the issue is fixed. If it is fixed, it means it was a DNS problem. The return code of -1 needs to be changed.
|
srs-librtmp is no longer supported.
|
OS: Centos 6.5 64-bit
SRS version srs (simple-rtmp-server) 2.0.178
srs.librtmp is released to srs, occasionally encountering handshake failure with the error message:
simple handshake failed[-1].
Restarting the program on the srs.librtmp side resolves the issue, but it reoccurs after about a day. It is not related to time, as the same code works fine on other devices.
Code:
TRANS_BY_GPT3
The text was updated successfully, but these errors were encountered: