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

Peer connection failed but no log #243

Closed
guidtz opened this issue Dec 2, 2015 · 10 comments
Closed

Peer connection failed but no log #243

guidtz opened this issue Dec 2, 2015 · 10 comments

Comments

@guidtz
Copy link

guidtz commented Dec 2, 2015

Hello,

I installed spreed-webrtc to use with owncloud. But before to connect it to owncloud I want to test it. So I can run a spreed-webrtc server connect from 2 desktop on 2 different network, I can start a webconf but after a while (1mn) I have an error message : "Peer connection failed. Check your settings" but no logs for found where is the problem.

How can I debug this ?

@leonklingele
Copy link
Contributor

Hey guidtz,

if spreed-webrtc server doesn't log an issue, it's always a good idea to consult your browser's dev console. Pretty sure it will contain valuable information for us to debug the issue :)

How to open the developer console?

@guidtz
Copy link
Author

guidtz commented Dec 3, 2015

Hi, I have got a lot of errors



ICE(PC:1449179056114079 (id=17107 url=http://fqdn/webrtc/)): No STUN servers specified

ICE(PC:1449179056114079 (id=17107 url=http://fqdn/webrtc/)): No TURN servers specified

ICE(PC:1449179056114079 (id=17107 url=http://fqdn/webrtc/)): peer (PC:1449179056114079 (id=17107 url=http://fqdn/webrtc/):default) specified too many components

ICE(PC:1449179056114079 (id=17107 url=http://fqdn/webrtc/)): peer (PC:1449179056114079 (id=17107 url=http://fqdn/webrtc/):default) specified bogus candidate

ICE(PC:1449179056114079 (id=17107 url=http://fqdn/webrtc/)): peer (PC:1449179056114079 (id=17107 url=http://fqdn/webrtc/):default) specified too many components

ICE(PC:1449179056114079 (id=17107 url=http://fqdn/webrtc/)): peer (PC:1449179056114079 (id=17107 url=http://fqdn/webrtc/):default) specified bogus candidate

ICE(PC:1449179056114079 (id=17107 url=http://fqdn/webrtc/)): peer (PC:1449179056114079 (id=17107 url=http://fqdn/webrtc/):default) has no stream matching stream 1449179056114079 (id=17107 url=http://fqdn/webrtc/) aLevel=1

ICE(PC:1449179056114079 (id=17107 url=http://fqdn/webrtc/)): peer (PC:1449179056114079 (id=17107 url=http://fqdn/webrtc/):default) has no stream matching stream 1449179056114079 (id=17107 url=http://fqdn/webrtc/) aLevel=2

ICE-PEER(PC:1449179056114079 (id=17107 url=http://fqdn/webrtc/):default)/CAND-PAIR(dn2M): setting pair to state FROZEN: dn2M|IP4:192.168.10.22:39000/UDP|IP4:192.168.1.10:54713/UDP(host(IP4:192.168.10.22:39000/UDP)|candidate:0 1 UDP 2122252543 192.168.1.10 54713 typ host)

ICE(PC:1449179056114079 (id=17107 url=http://fqdn/webrtc/))/CAND-PAIR(dn2M): Pairing candidate IP4:192.168.10.22:39000/UDP (7e7e00ff):IP4:192.168.1.10:54713/UDP (7e7f00ff) priority=9114723795305628159 (7e7e00fffcfe01ff)

ICE-PEER(PC:1449179056114079 (id=17107 url=http://fqdn/webrtc/):default)/CAND-PAIR(Lhqr): setting pair to state FROZEN: Lhqr|IP4:192.168.10.22:39000/UDP|IP4:192.168.122.1:49159/UDP(host(IP4:192.168.10.22:39000/UDP)|candidate:1 1 UDP 2122187007 192.168.122.1 49159 typ host)

ICE(PC:1449179056114079 (id=17107 url=http://fqdn/webrtc/))/CAND-PAIR(Lhqr): Pairing candidate IP4:192.168.10.22:39000/UDP (7e7e00ff):IP4:192.168.122.1:49159/UDP (7e7e00ff) priority=9114723795305497087 (7e7e00fffcfc01ff)

ICE-PEER(PC:1449179056114079 (id=17107 url=http://fqdn/webrtc/):default)/CAND-PAIR(Ms3g): setting pair to state FROZEN: Ms3g|IP4:192.168.122.1:37050/UDP|IP4:192.168.1.10:54713/UDP(host(IP4:192.168.122.1:37050/UDP)|candidate:0 1 UDP 2122252543 192.168.1.10 54713 typ host)

ICE(PC:1449179056114079 (id=17107 url=http://fqdn/webrtc/))/CAND-PAIR(Ms3g): Pairing candidate IP4:192.168.122.1:37050/UDP (7e7f00ff):IP4:192.168.1.10:54713/UDP (7e7f00ff) priority=9115005270282338815 (7e7f00fffcfe01ff)

ICE-PEER(PC:1449179056114079 (id=17107 url=http://fqdn/webrtc/):default)/CAND-PAIR(324Z): setting pair to state FROZEN: 324Z|IP4:192.168.122.1:37050/UDP|IP4:192.168.122.1:49159/UDP(host(IP4:192.168.122.1:37050/UDP)|candidate:1 1 UDP 2122187007 192.168.122.1 49159 typ host)

ICE(PC:1449179056114079 (id=17107 url=http://fqdn/webrtc/))/CAND-PAIR(324Z): Pairing candidate IP4:192.168.122.1:37050/UDP (7e7f00ff):IP4:192.168.122.1:49159/UDP (7e7e00ff) priority=9114723795305628158 (7e7e00fffcfe01fe)

ICE-PEER(PC:1449179056114079 (id=17107 url=http://fqdn/webrtc/):default)/CAND-PAIR(Ms3g): setting pair to state WAITING: Ms3g|IP4:192.168.122.1:37050/UDP|IP4:192.168.1.10:54713/UDP(host(IP4:192.168.122.1:37050/UDP)|candidate:0 1 UDP 2122252543 192.168.1.10 54713 typ host)

ICE-PEER(PC:1449179056114079 (id=17107 url=http://fqdn/webrtc/):default)/CAND-PAIR(dn2M): setting pair to state WAITING: dn2M|IP4:192.168.10.22:39000/UDP|IP4:192.168.1.10:54713/UDP(host(IP4:192.168.10.22:39000/UDP)|candidate:0 1 UDP 2122252543 192.168.1.10 54713 typ host)

ICE-PEER(PC:1449179056114079 (id=17107 url=http://fqdn/webrtc/):default)/CAND-PAIR(324Z): setting pair to state WAITING: 324Z|IP4:192.168.122.1:37050/UDP|IP4:192.168.122.1:49159/UDP(host(IP4:192.168.122.1:37050/UDP)|candidate:1 1 UDP 2122187007 192.168.122.1 49159 typ host)

ICE-PEER(PC:1449179056114079 (id=17107 url=http://fqdn/webrtc/):default)/CAND-PAIR(Lhqr): setting pair to state WAITING: Lhqr|IP4:192.168.10.22:39000/UDP|IP4:192.168.122.1:49159/UDP(host(IP4:192.168.10.22:39000/UDP)|candidate:1 1 UDP 2122187007 192.168.122.1 49159 typ host)

ICE-PEER(PC:1449179056114079 (id=17107 url=http://fqdn/webrtc/):default)/ICE-STREAM(1449179056114079 (id=17107 url=http://fqdn/webrtc/) aLevel=0): Starting check timer for stream.

ICE-PEER(PC:1449179056114079 (id=17107 url=http://fqdn/webrtc/):default)/CAND-PAIR(Ms3g): setting pair to state IN_PROGRESS: Ms3g|IP4:192.168.122.1:37050/UDP|IP4:192.168.1.10:54713/UDP(host(IP4:192.168.122.1:37050/UDP)|candidate:0 1 UDP 2122252543 192.168.1.10 54713 typ host)

ICE(PC:1449179056114079 (id=17107 url=http://fqdn/webrtc/)): peer (PC:1449179056114079 (id=17107 url=http://fqdn/webrtc/):default) is now checking

ICE(PC:1449179056114079 (id=17107 url=http://fqdn/webrtc/)): peer (PC:1449179056114079 (id=17107 url=http://fqdn/webrtc/):default) no streams with pre-answer requests

ICE-PEER(PC:1449179056114079 (id=17107 url=http://fqdn/webrtc/):default)/CAND-PAIR(dn2M): setting pair to state IN_PROGRESS: dn2M|IP4:192.168.10.22:39000/UDP|IP4:192.168.1.10:54713/UDP(host(IP4:192.168.10.22:39000/UDP)|candidate:0 1 UDP 2122252543 192.168.1.10 54713 typ host)

ICE-PEER(PC:1449179056114079 (id=17107 url=http://fqdn/webrtc/):default)/CAND-PAIR(324Z): setting pair to state IN_PROGRESS: 324Z|IP4:192.168.122.1:37050/UDP|IP4:192.168.122.1:49159/UDP(host(IP4:192.168.122.1:37050/UDP)|candidate:1 1 UDP 2122187007 192.168.122.1 49159 typ host)

ICE-PEER(PC:1449179056114079 (id=17107 url=http://fqdn/webrtc/):default)/CAND-PAIR(Lhqr): setting pair to state IN_PROGRESS: Lhqr|IP4:192.168.10.22:39000/UDP|IP4:192.168.122.1:49159/UDP(host(IP4:192.168.10.22:39000/UDP)|candidate:1 1 UDP 2122187007 192.168.122.1 49159 typ host)

ICE-PEER(PC:1449179056114079 (id=17107 url=http://fqdn/webrtc/):default): no pairs for 1449179056114079 (id=17107 url=http://fqdn/webrtc/) aLevel=0

ICE(PC:1449179056114079 (id=17107 url=http://fqdn/webrtc/)): peer (PC:1449179056114079 (id=17107 url=http://fqdn/webrtc/):default) Trickle grace period is over; marking every component with only failed pairs as failed.

STUN-CLIENT(Ms3g|IP4:192.168.122.1:37050/UDP|IP4:192.168.1.10:54713/UDP(host(IP4:192.168.122.1:37050/UDP)|candidate:0 1 UDP 2122252543 192.168.1.10 54713 typ host)): Timed out

ICE-PEER(PC:1449179056114079 (id=17107 url=http://fqdn/webrtc/):default)/CAND-PAIR(Ms3g): setting pair to state FAILED: Ms3g|IP4:192.168.122.1:37050/UDP|IP4:192.168.1.10:54713/UDP(host(IP4:192.168.122.1:37050/UDP)|candidate:0 1 UDP 2122252543 192.168.1.10 54713 typ host)

STUN-CLIENT(dn2M|IP4:192.168.10.22:39000/UDP|IP4:192.168.1.10:54713/UDP(host(IP4:192.168.10.22:39000/UDP)|candidate:0 1 UDP 2122252543 192.168.1.10 54713 typ host)): Timed out

ICE-PEER(PC:1449179056114079 (id=17107 url=http://fqdn/webrtc/):default)/CAND-PAIR(dn2M): setting pair to state FAILED: dn2M|IP4:192.168.10.22:39000/UDP|IP4:192.168.1.10:54713/UDP(host(IP4:192.168.10.22:39000/UDP)|candidate:0 1 UDP 2122252543 192.168.1.10 54713 typ host)

STUN-CLIENT(324Z|IP4:192.168.122.1:37050/UDP|IP4:192.168.122.1:49159/UDP(host(IP4:192.168.122.1:37050/UDP)|candidate:1 1 UDP 2122187007 192.168.122.1 49159 typ host)): Timed out

ICE-PEER(PC:1449179056114079 (id=17107 url=http://fqdn/webrtc/):default)/CAND-PAIR(324Z): setting pair to state FAILED: 324Z|IP4:192.168.122.1:37050/UDP|IP4:192.168.122.1:49159/UDP(host(IP4:192.168.122.1:37050/UDP)|candidate:1 1 UDP 2122187007 192.168.122.1 49159 typ host)

STUN-CLIENT(Lhqr|IP4:192.168.10.22:39000/UDP|IP4:192.168.122.1:49159/UDP(host(IP4:192.168.10.22:39000/UDP)|candidate:1 1 UDP 2122187007 192.168.122.1 49159 typ host)): Timed out

ICE-PEER(PC:1449179056114079 (id=17107 url=http://fqdn/webrtc/):default)/CAND-PAIR(Lhqr): setting pair to state FAILED: Lhqr|IP4:192.168.10.22:39000/UDP|IP4:192.168.122.1:49159/UDP(host(IP4:192.168.10.22:39000/UDP)|candidate:1 1 UDP 2122187007 192.168.122.1 49159 typ host)

ICE-PEER(PC:1449179056114079 (id=17107 url=http://fqdn/webrtc/):default)/STREAM(1449179056114079 (id=17107 url=http://fqdn/webrtc/) aLevel=0)/COMP(1): All pairs are failed, and grace period has elapsed. Marking component as failed.

ICE-PEER(PC:1449179056114079 (id=17107 url=http://fqdn/webrtc/):default): all checks completed success=0 fail=1

My mistake or something wrong ?

Thanks

@longsleep
Copy link
Contributor

Hi,

it seems that you have no STUN or TURN server configured. If no direct peer connection is possible, then a STUN and in some cases a TURN server is required to relay peer connections between those networks.

I see two different networks in your candidate logs: 192.168.1.10 and 192.168.122.1 - if there is no routing or a firewall between these two, the peerconnection will fail after all candidates have timed out. If you add a TURN server to the Spreed webrtc configuration both peers will also offer relay candidates which then might succeed.

See https://github.com/coturn/rfc5766-turn-server/ for a TURN server implementation if you want to setup your own on a server which is reachable from both parties (usually somewhere in the Internet).

Cheers

@guidtz
Copy link
Author

guidtz commented Dec 4, 2015

Ok I add a turn server in the server with debian package and add this

turnURIs = turn:127.0.0.1:3478?transport=udp

in my server.conf but I have same problems.

192.168.1.10 and 192.168.122.1 are local ip of my computer

@longsleep
Copy link
Contributor

Err yeah, well this is not exactly correct. The TURN server must be reachable directly by both peers (from both networks). Configuring it as 127.0.0.1 will not work - it must be in some other network, usually world routeable/external to make sense.

You wrote above 2 desktops in different networks. Both of these networks need to be able to reach the same TURN server. When setting up the TURN server make also sure to use shared secrent authentication with it (turnSecret in server.conf) and use the same setting in the TURN configuration.

@guidtz
Copy link
Author

guidtz commented Dec 4, 2015

In server.conf

turnURIs = turn:public_ip:3478?transport=udp
turnSecret= aege*****************************

in /etc/turnserver.conf

static-auth-secret=aege***************************

Or do you have example of conf file ?

Sorry for my lack of education in webrtc and turnserver it's the first time I make this type of server but if it can work with owncloud it will be a good thing and after i'll make a documentation for replicating this install.

Cheers

@longsleep
Copy link
Contributor

That basically looks good. It is recommended to run the turn server on port 443 to get best firewall trespassing. Also add turn:public_ip:3478?transport=tcp as well to also support those which cannot use UDP.

server.conf:

turnURIs = turn:public_ip1:443?transport=udp turn:public_ip1:443?transport=tcp
turnSecret = aege*****************************

in turnserver.conf

listening-port=443
alt-listening-port=3478
listening-ip=public_ip1
listening-ip=public_ip2
relay-ip=public_ip1
fingerprint
lt-cred-mech
use-auth-secret
static-auth-secret==aege***************************
realm=myrealm
stale-nonce
cert=/path/to/turn_server_cert.pem
pkey=/path/to/turn_server_pkey.pem
cipher-list="ECDH+AESGCM:DH+AESGCM:ECDH+AES256:DH+AES256:ECDH+AES128:DH+AES:ECDH+3DES:DH+3DES:RSA+AES:RSA+3DES:!ADH:!AECDH:!MD5"
dh2066
no-loopback-peers
no-multicast-peers
no-sslv2
no-sslv3

Something like this is recommended. Second public IP and TLS is recommended to get best firewall trespassing support.

@guidtz
Copy link
Author

guidtz commented Dec 4, 2015

very very very good ... it's work on non ssl for testing after I make it works on ssl port.

so if we have apache and turn server how can we use the 443 port for both ?

thanks a lot

@longsleep
Copy link
Contributor

well, use a dedicated IP address for the TURN server and another one for Apache. Note that the usage of port 443 for TURN is not directly connected to SSL. TURN can do all protocols on the same port. It is merely the best port to cross firewalls as it is usually open/unfiltered.

@guidtz
Copy link
Author

guidtz commented Dec 4, 2015

ok i'll learn this for production time. I'll go to test this.

I close this issue thnaks for you're help

@guidtz guidtz closed this as completed Dec 4, 2015
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

3 participants