Skip to content
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

the issue with the TURN forwarding. #279

Open
xicilion opened this issue Nov 15, 2024 · 2 comments
Open

the issue with the TURN forwarding. #279

xicilion opened this issue Nov 15, 2024 · 2 comments

Comments

@xicilion
Copy link
Contributor

I am using WebRTC and a browser to establish a data channel, but some issues occur when a TURN server is needed. Here are the specific symptoms:

using coturn

When using coturn as TURN server, juice can't get candidates. The specific log information is as follows:

2024-11-16 02:09:21.200 WARN  [15355595] [rtc::impl::IceTransport::LogCallback@395] juice: agent.c:1227: Missing integrity in STUN message
2024-11-16 02:09:21.201 WARN  [15355595] [rtc::impl::IceTransport::LogCallback@395] juice: agent.c:1301: Ignoring invalid TURN Allocate message
2024-11-16 02:09:22.201 WARN  [15355595] [rtc::impl::IceTransport::LogCallback@395] juice: agent.c:1227: Missing integrity in STUN message
2024-11-16 02:09:22.201 WARN  [15355595] [rtc::impl::IceTransport::LogCallback@395] juice: agent.c:1301: Ignoring invalid TURN Allocate message
2024-11-16 02:09:24.202 WARN  [15355595] [rtc::impl::IceTransport::LogCallback@395] juice: agent.c:1227: Missing integrity in STUN message
2024-11-16 02:09:24.202 WARN  [15355595] [rtc::impl::IceTransport::LogCallback@395] juice: agent.c:1301: Ignoring invalid TURN Allocate message
2024-11-16 02:09:28.204 WARN  [15355595] [rtc::impl::IceTransport::LogCallback@395] juice: agent.c:1227: Missing integrity in STUN message
2024-11-16 02:09:28.204 WARN  [15355595] [rtc::impl::IceTransport::LogCallback@395] juice: agent.c:1301: Ignoring invalid TURN Allocate message
2024-11-16 02:09:35.854 INFO  [15355595] [rtc::impl::IceTransport::LogCallback@395] juice: agent.c:1430: STUN server binding successful
2024-11-16 02:09:35.854 INFO  [15355595] [rtc::impl::IceTransport::LogCallback@395] juice: agent.c:1449: Got STUN mapped address 240e:3a3:60b:d041:b577:4372:6fc9:8d1d:62434 from server
2024-11-16 02:09:36.125 INFO  [15355595] [rtc::impl::IceTransport::LogCallback@395] juice: agent.c:1430: STUN server binding successful
2024-11-16 02:09:36.126 INFO  [15355595] [rtc::impl::IceTransport::LogCallback@395] juice: agent.c:1449: Got STUN mapped address 49.65.154.14:64072 from server
2024-11-16 02:09:36.206 WARN  [15355595] [rtc::impl::IceTransport::LogCallback@395] juice: agent.c:1227: Missing integrity in STUN message
2024-11-16 02:09:36.206 WARN  [15355595] [rtc::impl::IceTransport::LogCallback@395] juice: agent.c:1301: Ignoring invalid TURN Allocate message
2024-11-16 02:09:44.193 INFO  [15355595] [rtc::impl::IceTransport::LogCallback@395] juice: agent.c:886: TURN allocation failed

Other implementations of WebRTC, such as Chrome and React Native WebRTC, work well with coturn.

using violet

When using violet as the TURN Server, juice can work properly and establish connections.

But other WebRTC implementations, such as Chrome and React Native WebRTC, can obtain candidates, but cannot establish normal communication. Because there are no specific logs available, the detailed error information is still unclear.

@paullouisageneau
Copy link
Owner

When using coturn as TURN server, juice can't get candidates. The specific log information is as follows:

2024-11-16 02:09:21.200 WARN  [15355595] [rtc::impl::IceTransport::LogCallback@395] juice: agent.c:1227: Missing integrity in STUN message
2024-11-16 02:09:21.201 WARN  [15355595] [rtc::impl::IceTransport::LogCallback@395] juice: agent.c:1301: Ignoring invalid TURN Allocate message
2024-11-16 02:09:22.201 WARN  [15355595] [rtc::impl::IceTransport::LogCallback@395] juice: agent.c:1227: Missing integrity in STUN message
2024-11-16 02:09:22.201 WARN  [15355595] [rtc::impl::IceTransport::LogCallback@395] juice: agent.c:1301: Ignoring invalid TURN Allocate message
2024-11-16 02:09:24.202 WARN  [15355595] [rtc::impl::IceTransport::LogCallback@395] juice: agent.c:1227: Missing integrity in STUN message
2024-11-16 02:09:24.202 WARN  [15355595] [rtc::impl::IceTransport::LogCallback@395] juice: agent.c:1301: Ignoring invalid TURN Allocate message
2024-11-16 02:09:28.204 WARN  [15355595] [rtc::impl::IceTransport::LogCallback@395] juice: agent.c:1227: Missing integrity in STUN message
2024-11-16 02:09:28.204 WARN  [15355595] [rtc::impl::IceTransport::LogCallback@395] juice: agent.c:1301: Ignoring invalid TURN Allocate message
2024-11-16 02:09:35.854 INFO  [15355595] [rtc::impl::IceTransport::LogCallback@395] juice: agent.c:1430: STUN server binding successful
2024-11-16 02:09:35.854 INFO  [15355595] [rtc::impl::IceTransport::LogCallback@395] juice: agent.c:1449: Got STUN mapped address 240e:3a3:60b:d041:b577:4372:6fc9:8d1d:62434 from server
2024-11-16 02:09:36.125 INFO  [15355595] [rtc::impl::IceTransport::LogCallback@395] juice: agent.c:1430: STUN server binding successful
2024-11-16 02:09:36.126 INFO  [15355595] [rtc::impl::IceTransport::LogCallback@395] juice: agent.c:1449: Got STUN mapped address 49.65.154.14:64072 from server
2024-11-16 02:09:36.206 WARN  [15355595] [rtc::impl::IceTransport::LogCallback@395] juice: agent.c:1227: Missing integrity in STUN message
2024-11-16 02:09:36.206 WARN  [15355595] [rtc::impl::IceTransport::LogCallback@395] juice: agent.c:1301: Ignoring invalid TURN Allocate message
2024-11-16 02:09:44.193 INFO  [15355595] [rtc::impl::IceTransport::LogCallback@395] juice: agent.c:886: TURN allocation failed

It would mean the TURN server does not ask for authentication as expected (by specification message integrity is mandatory in allocate response). Are you sure the TURN server is set up properly with authentication enabled? The verbose log would help knowing what is happening exactly.

Other implementations of WebRTC, such as Chrome and React Native WebRTC, work well with coturn.

Does it work with the same server and the same credentials? Just a note, Chrome and React Native WebRTC are basically the same implementation as both run libwebrtc.

When using violet as the TURN Server, juice can work properly and establish connections.

But other WebRTC implementations, such as Chrome and React Native WebRTC, can obtain candidates, but cannot establish normal communication. Because there are no specific logs available, the detailed error information is still unclear.

How do you run violet? The verbose log of violet would help.

@xicilion
Copy link
Contributor Author

xicilion commented Nov 17, 2024

It would mean the TURN server does not ask for authentication as expected (by specification message integrity is mandatory in allocate response). Are you sure the TURN server is set up properly with authentication enabled? The verbose log would help knowing what is happening exactly.

It is true that I can get candidates by modifying any authentication information in the browser. I modified the configuration of coturn, and now juice can work properly. I'm also thinking if Juice can be compatible with this situation.

How do you run violet? The verbose log of violet would help.

I asked my colleagues about it, the log of violet server is normal for now. We are still working on identifying the specific reason for the connection failure.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants