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

CONFERENCE FAILED: conference.setup_failed Error: ICE fail #2805

Closed
c526537207 opened this issue Apr 13, 2018 · 27 comments
Closed

CONFERENCE FAILED: conference.setup_failed Error: ICE fail #2805

c526537207 opened this issue Apr 13, 2018 · 27 comments
Labels
wontfix Issue won't be fixed

Comments

@c526537207
Copy link

When the user joins the room, the following error will appear, how to solve?

[modules/xmpp/JingleSessionPC.js] <r.peerconnection.oniceconnectionstatechange>: (TIME) ICE failed P2P? false: 24965.299999996205 Logger.js:125 [conference.js] <e.value>: CONFERENCE FAILED: conference.setup_failed Error: ICE fail at r.peerconnection.oniceconnectionstatechange (JingleSessionPC.js:459) at RTCPeerConnection.peerconnection.oniceconnectionstatechange (TraceablePeerConnection.js:261)

@damencho
Copy link
Member

Are you using meet.jit.si or another deployment? Is it in p2p or not?

@c526537207
Copy link
Author

It is p2p,using own deployment(quick install)

@damencho
Copy link
Member

You need turn to be sure p2p will work, but if p2p fails it should fallback to jvb.

@c526537207
Copy link
Author

@damencho Where to configure turn?

@damencho
Copy link
Member

It is not a simple task. But here are some simple steps you can follow:

This way clients will ask prosody for turn credentials using XEP-0215 and will use those credentials to connect to your turn server.

@c526537207
Copy link
Author

@damencho I have done what you said, and I still have the error.

@c526537207
Copy link
Author

@damencho Thank you for your help. The problem has been solved.

@Frindecent
Copy link

@c526537207
@damencho
can you help me with the issue.

i configured turn server, i added the stun URL under p2p stun servers in config.js.
however i am not sure how to start configuring and enabling turn servers in prosody.

@damencho
Copy link
Member

@Frindecent you need to enable the module https://modules.prosody.im/mod_turncredentials.html
and set the configs mentioned on that page.
You can enable it by downloading it from that page and putting it in some path accessible by the prosody user and adding for example:
plugin_paths = { "/srv/prosody-plugins" } and then restarting prosody. This should be enough.

@Frindecent
Copy link

@damencho
I installed prosody-plugins by hg , as mentioned on this site you provided. then i configured mod_turncrentials.lua.

In prosody settings i added turncredentials and also provided plugin_path , however still the issue is not resolved.
Following is the console log. (mentioning important and relevant logs)

[JitsiConference.js] <r._doReplaceTrack>: _doReplaceTrack - no JVB JingleSession
[JitsiConference.js] <r._doReplaceTrack>: _doReplaceTrack - no P2P JingleSession
[modules/xmpp/moderator.js] <i.setFocusUserJid>: Focus jid set to: focus@auth.XXX.com
[modules/xmpp/strophe.jingle.js] <>: getting turn credentials failed <iq xmlns=​"jabber:​client" type=​"error" to=​"b3dbdce1-1089-423f-8b85-e1a6a8dd80b1@XXX.com/​02346c69-668e-49ed-9288-65335b879ba9" from=​"XXX.com" id=​"e24d67c6-7b85-4d44-b329-e12464f6be0b:​sendIQ">​…​​
[modules/xmpp/strophe.jingle.js] <>: is mod_turncredentials or similar installed?
[modules/xmpp/strophe.jingle.js] <a.value>: on jingle session-initiate from 1302135b2948a0e3ce2@conference.XXXcom/focus <iq xmlns=​"jabber:​client" type=​"set" to=​"b3dbdce1-1089-423f-8b85-e1a6a8dd80b1@XXX.com/​02346c69-668e-49ed-9288-65335b879ba9" from=​"1302135b2948a0e3ce2@conference.XXX.com/​focus" id=​"YjNkYmRjZTEtMTA4OS00MjNmLThiODUtZTFhNmE4ZGQ4MGIxQG1lZXRpbmcub3Jic3RpY2suY29tLzAyMzQ2YzY5LTY2OGUtNDllZC05Mjg4LTY1MzM1Yjg3OWJhOQBCdEQyai0xNDY2NAAqEL2D23RmvTdxv4Z8Zjbd">​…​​
[modules/xmpp/strophe.jingle.js] <a.value>: Marking session from 1302135b2948a0e3ce2@conference.meeting.orbstick.com/focus as not P2P
[modules/xmpp/JingleSessionPC.js] <t.value>: sendIceCandidates (2) [RTCIceCandidate, RTCIceCandidate]
[conference.js] <e.value>: CONFERENCE FAILED: conference.setup_failed Error: ICE fail
at r.peerconnection.oniceconnectionstatechange (JingleSessionPC.js:469)
at RTCPeerConnection.peerconnection.oniceconnectionstatechange (TraceablePeerConnection.js:262)

@damencho
Copy link
Member

Have you enabled the module?

modules_enabled = {
....
"turncredentials";
....
}

@Frindecent
Copy link

yes i have done that.

@damencho
Copy link
Member

Check prosody logs for errors. Also, you can modify mod_turncredentials.lua adding some log to make sure that it is loaded, there is already log(https://hg.prosody.im/prosody-modules/file/7dbde05b48a9/mod_turncredentials/mod_turncredentials.lua#l14) if it is not loaded, maybe check for that in the logs.

@Frindecent
Copy link

I have this error in my logs.

does that mean prosody is picking up mod_turncredentials. and i should start looking towards mod_turncrentials.lua file or turn server configuration ( I installed coturn server on ubuntu 16.04 using apt-get and edited turnserver.conf for listening ports and 3478 and tls port 5479. Also installed letsencrypt ssl. and verified by telnet whether turn server is listening to port 443 and 3478) ?
since i used hg for prosody plugins all plugins were download and i provided path
plugin_paths = {"/prosody-modules/"}
it has all folders for all prosody plugins and i edited the mod_turncredentials.lua file in there and added all required credentials.

I apologize for disturbing you alot.
Thanks for helping me till here.. the main issue is that on web interface if p2p doesnot finds turn server it jumps back to jvm and caĺl continues but since i have built the react module myself for native apps and embeded in my project using react+swift and react+java for android. therefore on mobile side due to ice connection error the call drops. therefore, requiring turnserver configuration for prosody.

@damencho
Copy link
Member

You forgot to paste the error.

@Frindecent
Copy link

the error you mentioned.
localhost error turncredentials not configured
auth.Xxx.com error turncredentials not configured.

@damencho
Copy link
Member

Looking at the code, this means that turncredentials_host or turncredentials_secret is not configured in prosody.

@Frindecent
Copy link

hi @damencho . Sorry for trouble , i am pasting my mod_turncredentials.lua file here... because i have tried 100s of various combinations and still not able to get past this error. Can you help in identifying how i could not be entering correct credentials.
-- XEP-0215 implementation for time-limited turn credentials
-- Copyright (C) 2012-2013 Philipp Hancke
-- This file is MIT/X11 licensed.

local st = require "util.stanza";
local hmac_sha1 = require "util.hashes".hmac_sha1;
local base64 = require "util.encodings".base64;
local os_time = os.time;
local secret = module:get_option_string("turncredentials_secret" = {username: "Admin", password: "XXX"});
local host = module:get_option_string("turncredentials_host" = {type: "turn", host:"1XX.3X.XXX.XX6"}); -- use ip addresses here to avoid further dns lookup latency
local port = module:get_option_number("turncredentials_port", 3478);
local ttl = module:get_option_number("turncredentials_ttl", 3600);
if not (secret and host) then
module:log("error", "turncredentials not configured");
return;
end

module:add_feature("urn:xmpp:extdisco:1");

module:hook("iq-get/host/urn:xmpp:extdisco:1:services", function(event)
local origin, stanza = event.origin, event.stanza;
if origin.type ~= "c2s" then
return;
end
local now = os_time() + ttl;
local userpart = tostring(now);
local nonce = base64.encode(hmac_sha1(secret, tostring(userpart), false));
origin.send(st.reply(stanza):tag("services", {xmlns = "urn:xmpp:extdisco:1"})
:tag("service", { type = "stun", host = host, port = port }):up()
:tag("service", { type = "turn", host = host, port = port, username = userpart, password = nonce, ttl = ttl}):up()
);
return true;
end);

@damencho
Copy link
Member

Do you have values for turncredentials_host or turncredentials_secret in your prosody config?

@damencho
Copy link
Member

This is not the original code of the module, return the default one and set those two config in your main prosody config file.

@Frindecent
Copy link

hi , the code is the same as of https://hg.prosody.im/prosody-modules/file/7dbde05b48a9/mod_turncredentials/mod_turncredentials.lua

i added only the values of turncredentials_host and turncredentials_secret. i thought maybe i am not getting them right.

no i dont have the values in prosody config file , i only added the values in mod_turncrentials.lua file. i will update prosody.cfg file and will let you know of results.

@damencho
Copy link
Member

I don't see this in the link you pasted:
module:get_option_string("turncredentials_secret" = {username: "Admin", password: "XXX"});
local host = module:get_option_string("turncredentials_host" = {type: "turn", host:"1XX.3X.XXX.XX6"});

@Xowap
Copy link

Xowap commented Aug 6, 2018

@damencho same issue (?) here:

  • Quick install
  • Configured on jitsi.delos.ltd (and *.jitsi.delos.ltd is a CNAME of jitsi.delos.ltd)
  • Did the Let's Encrypt configuration but nothing more

When I go to any room (like https://jitsi.delos.ltd/foobar) it doesn't work while on another install that I did the same way (from what I remember) it worked quite well from the beginning.

Any idea what is going on? If I need to install a turn server, why didn't I need it previously?

@damencho
Copy link
Member

damencho commented Aug 6, 2018

You didn't follow: https://github.com/jitsi/jitsi-meet/blob/master/doc/quick-install.md#advanced-configuration
Your jvb reports only its internal address and ipv6 address:
screen shot 2018-08-06 at 11 16 06

@stale
Copy link

stale bot commented Dec 3, 2018

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix Issue won't be fixed label Dec 3, 2018
@stale stale bot closed this as completed Dec 12, 2018
@zeronlee
Copy link

@damencho
i configured mod_turncrentials.lua,but the issue not resovled, i hava following prosody error log:
portmanager error Failed to open server port 5347 on ::1, Cannot assign requested address

@damencho
Copy link
Member

@zeronlee do not hijack issues. If you have a question or problem, write in the community forum: https://community.jitsi.org

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wontfix Issue won't be fixed
Projects
None yet
Development

No branches or pull requests

5 participants