lynckia / licode

Open Source Communication Provider based on WebRTC and Cloud technologies
http://lynckia.com/licode
MIT License
3.09k stars 1.02k forks source link

How to use licode with TURN server which uses static-auth-secret #908

Open gregorfelkar opened 7 years ago

gregorfelkar commented 7 years ago

I have a question on how to configure erizio to use TURN server with static-auth-secret. I have access to turn server which is used by another project where it uses folowing config:

listening-port=3478
tls-listening-port=5349
listening-ip=<IP>
relay-ip=<IP>
fingerprint
lt-cred-mech
use-auth-secret                          <- this setting
static-auth-secret=<credential-secret>   <- this setting
realm=<IP>

As i have researched this type of authentication is generating temporary username:password pair where password is HMAC encoded username and username is usually random generated string (e.g. timestamp)

So my question is, how can i include my TURN server into LICODE config?

I tried to add my turn server to licode_config.js like this: config.erizoController.iceServers = [{'url': 'stun:<domain>:3478'},{'url': 'turn:<domain>:3478', 'secret':'<credential-secret>'}];

But i get error on client side: Uncaught DOMException: Failed to construct 'RTCPeerConnection': Both username and credential are required when the URL scheme is "turn" or "turns"

Or if its possible to reconfigure CoTRUN server to use both modes one with username:password pair and one with static-auth-secret

guhuisec commented 7 years ago

config.erizoController.iceServers = [{'url': 'stun::3478'},{'url': 'turn::3478', 'credential ':'abc',‘username ’:‘abc’}];

gregorfelkar commented 7 years ago

So there is no option to reconfigure licode to use TURN REST API from CoTURN turn server?

I tried to reconfigure the turn server to username:password pair and updated the licode config ICE servers to config.erizoController.iceServers = [{'url': 'stun:<domain>:3478'},{'url': 'turn:<domain>:3478', 'username':'test', 'credential': 'test'}]; and now i get another message on which i dont know what could be the reason behind:

erizo.js:189 DEBUG:  Sending message Object {type: "candidate", candidate: Object}
erizo.js:189 DEBUG:  Sending message Object {type: "candidate", candidate: Object}
erizo.js:189 DEBUG:  Sending message Object {type: "candidate", candidate: Object}
erizo.js:189 DEBUG:  Sending message Object {type: "candidate", candidate: Object}
erizo.js:189 INFO:  Gathered all candidates. Sending END candidate
erizo.js:189 DEBUG:  Sending message Object {type: "candidate", candidate: Object}
erizo.js:189 ERROR:  ICE Connection Failed on publishing stream 987507830782288600 2
erizo.js:189 DEBUG:  Event: stream-failed
script.js:142 Stream Failed, act accordingly
erizo.js:189 DEBUG:  Received a removeStream for 987507830782288600 and it has not been registered here, ignoring.
erizo.js:189 INFO:  Stream unpublished

I found similar issues in #488 and #482 but there seems to be firewall issues. My firewall has open all ports so i dont know it that is still a problem.

Is there maybe anyting else that i could try/change to make basic example work?

zevarito commented 7 years ago

What are the Coturn logs saying?

Notice that when you use long-term auth in Coturn the password needs to be hashed.

2017-06-02 10:31 GMT-03:00 Gregor Felkar notifications@github.com:

So there is no option to reconfigure licode to use TURN REST API https://github.com/coturn/coturn/wiki/turnserver#turn-rest-api from CoTURN turn server?

I tried to reconfigure the turn server to username:password pair and updated the licode config ICE servers to config.erizoController.iceServers = [{'url': 'stun::3478'},{'url': 'turn::3478', 'username':'test', 'credential': 'test'}]; and now i get another message on which i dont know what could be the reason behind:

erizo.js:189 DEBUG: Sending message Object {type: "candidate", candidate: Object} erizo.js:189 DEBUG: Sending message Object {type: "candidate", candidate: Object} erizo.js:189 DEBUG: Sending message Object {type: "candidate", candidate: Object} erizo.js:189 DEBUG: Sending message Object {type: "candidate", candidate: Object} erizo.js:189 INFO: Gathered all candidates. Sending END candidate erizo.js:189 DEBUG: Sending message Object {type: "candidate", candidate: Object} erizo.js:189 ERROR: ICE Connection Failed on publishing stream 987507830782288600 2 erizo.js:189 DEBUG: Event: stream-failed script.js:142 Stream Failed, act accordingly erizo.js:189 DEBUG: Received a removeStream for 987507830782288600 and it has not been registered here, ignoring. erizo.js:189 INFO: Stream unpublished

I found similar issues in #488 https://github.com/lynckia/licode/issues/488 and #482 https://github.com/lynckia/licode/issues/482 but there seems to be firewall issues. My firewall has open all ports so i dont know it that is still a problem.

Is there maybe anyting else that i could try/change to make basic example work?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/lynckia/licode/issues/908#issuecomment-305787591, or mute the thread https://github.com/notifications/unsubscribe-auth/AACgariU-i3-Ca9cb3uk0l1AoifL11wBks5sAA60gaJpZM4NuFuK .

-- Alvaro

zevarito commented 7 years ago

2017-06-02 10:40 GMT-03:00 Alvaro Gil zevarito@gmail.com:

What are the Coturn logs saying?

Notice that when you use long-term auth in Coturn the password needs to be hashed.

Also don't forget to open turn server ports range for tcp/udp 49152-65535

2017-06-02 10:31 GMT-03:00 Gregor Felkar notifications@github.com:

So there is no option to reconfigure licode to use TURN REST API from CoTURN turn server?

I tried to reconfigure the turn server to username:password pair and updated the licode config ICE servers to config.erizoController.iceServers = [{'url': 'stun::3478'},{'url': 'turn::3478', 'username':'test', 'credential': 'test'}]; and now i get another message on which i dont know what could be the reason behind:

erizo.js:189 DEBUG: Sending message Object {type: "candidate", candidate: Object} erizo.js:189 DEBUG: Sending message Object {type: "candidate", candidate: Object} erizo.js:189 DEBUG: Sending message Object {type: "candidate", candidate: Object} erizo.js:189 DEBUG: Sending message Object {type: "candidate", candidate: Object} erizo.js:189 INFO: Gathered all candidates. Sending END candidate erizo.js:189 DEBUG: Sending message Object {type: "candidate", candidate: Object} erizo.js:189 ERROR: ICE Connection Failed on publishing stream 987507830782288600 2 erizo.js:189 DEBUG: Event: stream-failed script.js:142 Stream Failed, act accordingly erizo.js:189 DEBUG: Received a removeStream for 987507830782288600 and it has not been registered here, ignoring. erizo.js:189 INFO: Stream unpublished

I found similar issues in #488 and #482 but there seems to be firewall issues. My firewall has open all ports so i dont know it that is still a problem.

Is there maybe anyting else that i could try/change to make basic example work?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.

-- Alvaro

-- Alvaro

gregorfelkar commented 7 years ago

Notice that when you use long-term auth in Coturn the password needs to be hashed.

Yes i know, i was asking if there is somekind of config in licode to use hashed passwords. For example in my other project where i used SimpleWebRTC library i could specify:

    ...
    "stunservers": [
        { "url": "stun:<domain>:3478" }
    ],
    "turnservers": [
        {
            "urls": [
                "turn:<domain>:3478"
            ],
            "secret": "<credential-secret>",
            "expiry": 86400
        }
    ]
    ...

Or i have to write the client side for this to work (this is minor issue as i can reconfigure my other project to use current username:password pair). But the mistery is in ICE rejection.


Also don't forget to open turn server ports range for tcp/udp 49152-65535

My CoTURN server has also open all ports (currently im just trying to make the example work). I have also tested the turn server with TrickleICE page and my previous project which uses WebRTC without MCU (only for 1on1 video chat).


What are the Coturn logs saying?

The cotrun output stayed the same as when i started the turn server

0: log file opened: /var/log/turn_18946_2017-06-02.log
0: 
RFC 3489/5389/5766/5780/6062/6156 STUN/TURN Server
Version Coturn-4.5.0.3 'dan Eider'
0: 
Max number of open files/sockets allowed for this process: 65536
0: 
Due to the open files/sockets limitation,
max supported number of TURN Sessions possible is: 32500 (approximately)
0: 

==== Show him the instruments, Practical Frost: ====

0: TLS supported
0: DTLS supported
0: DTLS 1.2 supported
0: TURN/STUN ALPN supported
0: Third-party authorization (oAuth) supported
0: GCM (AEAD) supported
0: OpenSSL compile-time version: OpenSSL 1.0.2g-fips  1 Mar 2016
0: 
0: SQLite supported, default database location is /var/lib/turn/turndb
0: Redis supported
0: PostgreSQL supported
0: MySQL supported
0: MongoDB is not supported
0: 
0: Default Net Engine version: 3 (UDP thread per CPU core)

=====================================================

0: Config file found: /etc/turnserver.conf
0: Listener address to use: <server-ip>
0: Relay address to use: <server-ip>
0: Config file found: /etc/turnserver.conf
0: Domain name: 
0: Default realm: <server-ip>
0: WARNING: cannot find certificate file: turn_server_cert.pem (1)
0: WARNING: cannot start TLS and DTLS listeners because certificate file is not set properly
0: WARNING: cannot find private key file: turn_server_pkey.pem (1)
0: WARNING: cannot start TLS and DTLS listeners because private key file is not set properly
0: pid file created: /var/run/turnserver.pid
0: IO method (main listener thread): epoll (with changelist)
0: WARNING: I cannot support STUN CHANGE_REQUEST functionality because only one IP address is provided
0: Wait for relay ports initialization...
0:   relay <server-ip> initialization...
0:   relay <server-ip> initialization done
0: Relay ports initialization done
0: IO method (general relay thread): epoll (with changelist)
0: turn server id=1 created
0: IO method (general relay thread): epoll (with changelist)
0: turn server id=0 created
0: Total General servers: 2
0: IO method (admin thread): epoll (with changelist)
0: IO method (auth thread): epoll (with changelist)
0: IO method (auth thread): epoll (with changelist)
0: SQLite DB connection success: /var/lib/turn/turndb

I get following output in console when refreshing basicexample site (maybe this will tell you more info):

GET / 200 0.541 ms - 522
2017-06-02 15:56:40.657  - INFO: ErizoController - message: Socket disconnect, clientId: 2hUhDX2zNzd--tM2qMEx
2017-06-02 15:56:40.657  - INFO: RoomController - message: removeSubscriptions, clientId: 2hUhDX2zNzd--tM2qMEx
GET /erizo.js 200 0.677 ms - 105571
GET /script.js 200 0.467 ms - 5185
Creating token. Request body:  { username: 'user',
  role: 'presenter',
  room: 'basicExampleRoom',
  type: 'erizo' }
Token created eyJ0b2tlbklkIjoiNTkzMTZlOThlZjkxYmU1MDY0Y2EwYTNhIiwiaG9zdCI6ImNvbnRyb2xsLnZhYi5pdC1waGFybWEuc2k6NDQzIiwic2VjdXJlIjp0cnVlLCJzaWduYXR1cmUiOiJaalk1TlRVMFlUUmlZalV6T0Rrd01UWmpPV00xTkRFell6Qm1Zek01TkdZM1lXVmlabVEzT1E9PSJ9
POST /createToken/ 200 14.799 ms - 216
GET /assets/loader.gif 200 1.963 ms - 673
GET /assets/star.svg 200 1.553 ms - 4753
GET /assets/sound48.png 200 0.453 ms - 4851
2017-06-02 15:56:41.759  - INFO: ErizoController - message: erizoClient connected, clientId: 7ZaOmLkXeqqNiRxNqMEy
2017-06-02 15:56:41.776  - INFO: RPCPublic - message: consumed token, tokenId:  59316e98ef91be5064ca0a3a , roomId: 592eb97d6ccb4c9d56a001b4, serviceId: 592eb411e4bed44714413926
2017-06-02 15:56:41.789  - INFO: ErizoController - message: addPublisher requested, streamId: 969786763341568300, clientId: 7ZaOmLkXeqqNiRxNqMEy, state: erizo, data: true, audio: true, video: true, screen: , minVideoBW: 0, metadata: [Object], 
2017-06-02 15:56:41.789  - INFO: RoomController - message: addPublisher, streamId: 969786763341568300, state: erizo, data: true, audio: true, video: true, screen: , minVideoBW: 0, metadata: [Object], type: publisher
2017-06-02 15:56:41.789  - INFO: EcCloudHandler - message: createErizoJS, agentId: ErizoAgent
2017-06-02 15:56:41.791  - INFO: EcCloudHandler - message: createErizoJS success, erizoId: b3b69bb6-147a-3e51-7255-cc365f9baec5, agentId: fe3c8202-f872-2cab-8ebf-e5c53e5a8751
2017-06-02 15:56:41.791  - INFO: RoomController - message: addPublisher erizoJs assigned, erizoId: b3b69bb6-147a-3e51-7255-cc365f9baec5, streamId:  969786763341568300, type: publisher
[erizo-b3b69bb6-147a-3e51-7255-cc365f9baec5] 2017-06-02 15:56:41.796  - INFO: ErizoJSController - message: Adding publisher, streamId: 969786763341568300, state: erizo, data: true, audio: true, video: true, screen: , minVideoBW: 0, metadata: [Object], type: publisher
[erizo-b3b69bb6-147a-3e51-7255-cc365f9baec5] 2017-06-02 15:56:41,799  - INFO [0x7f27a69ff780] WebRtcConnection - id: 969786763341568300,  message: constructor, stunserver: , stunPort: 0, minPort: 0, maxPort: 0
2017-06-02 15:56:41.803  - INFO: ErizoController - message: addPublisher, state: PUBLISHER_INITIAL, clientId: 7ZaOmLkXeqqNiRxNqMEy, streamId: 969786763341568300
[erizo-b3b69bb6-147a-3e51-7255-cc365f9baec5] 2017-06-02 15:56:41.803  - INFO: ErizoJSController - message: WebRtcConnection status update, id: 969786763341568300, status: 101, type: publisher
[erizo-b3b69bb6-147a-3e51-7255-cc365f9baec5] 2017-06-02 15:56:41.824  - INFO: ErizoJSController - message: Process Signaling message, streamId: 969786763341568300, peerId: 7ZaOmLkXeqqNiRxNqMEy
[erizo-b3b69bb6-147a-3e51-7255-cc365f9baec5] 2017-06-02 15:56:41,824  - DEBUG [0x7f27a69ff780] WebRtcConnection - id: 969786763341568300, type: publisher,  message: setting remote SDP
[erizo-b3b69bb6-147a-3e51-7255-cc365f9baec5] 2017-06-02 15:56:41,825  - DEBUG [0x7f27a69ff780] WebRtcConnection - id: 969786763341568300, type: publisher,  message: Setting remote BW, maxVideoBW: 300
[erizo-b3b69bb6-147a-3e51-7255-cc365f9baec5] 2017-06-02 15:56:41,825  - WARN [0x7f27a69ff780] rtp.RtpExtensionProcessor - Unsupported extension http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01
[erizo-b3b69bb6-147a-3e51-7255-cc365f9baec5] 2017-06-02 15:56:41,826  - DEBUG [0x7f27a69ff780] WebRtcConnection - id: 969786763341568300, type: publisher,  message: Creating videoTransport, ufrag: cwIv, pass: 6Hjsj+AulBHr42XcrI7XWYAL
[erizo-b3b69bb6-147a-3e51-7255-cc365f9baec5] 2017-06-02 15:56:41,826  - DEBUG [0x7f27a69ff780] DtlsTransport - id: 969786763341568300,  message: constructor, transportName: video, isBundle: 1
[erizo-b3b69bb6-147a-3e51-7255-cc365f9baec5] 2017-06-02 15:56:41,848  - DEBUG [0x7f27a69ff780] DtlsTransport - id: 969786763341568300,  message: creating active-client
[erizo-b3b69bb6-147a-3e51-7255-cc365f9baec5] 2017-06-02 15:56:41,848  - WARN [0x7f27a69ff780] dtls.SSL - error in before/connect initialization
[erizo-b3b69bb6-147a-3e51-7255-cc365f9baec5] 2017-06-02 15:56:41,849  - DEBUG [0x7f27a69ff780] DtlsTransport - id: 969786763341568300,  message: created
[erizo-b3b69bb6-147a-3e51-7255-cc365f9baec5] 2017-06-02 15:56:41,849  - DEBUG [0x7f27a69ff780] DtlsTransport - id: 969786763341568300, type: publisher,  message: starting ice
[erizo-b3b69bb6-147a-3e51-7255-cc365f9baec5] 2017-06-02 15:56:41,849  - DEBUG [0x7f27a69ff780] LibNiceConnection - id: 969786763341568300, type: publisher,  message: creating Nice Agent
[erizo-b3b69bb6-147a-3e51-7255-cc365f9baec5] 2017-06-02 15:56:41,850  - DEBUG [0x7f27a69ff780] LibNiceConnection - id: 969786763341568300, type: publisher,  message: adding stream, iceComponents: 1
[erizo-b3b69bb6-147a-3e51-7255-cc365f9baec5] 2017-06-02 15:56:41,850  - DEBUG [0x7f27a69ff780] LibNiceConnection - id: 969786763341568300, type: publisher,  message: setting remote credentials in constructor, ufrag:cwIv, pass:6Hjsj+AulBHr42XcrI7XWYAL
[erizo-b3b69bb6-147a-3e51-7255-cc365f9baec5] 2017-06-02 15:56:41,850  - DEBUG [0x7f27a69ff780] LibNiceConnection - id: 969786763341568300, type: publisher,  message: setting remote credentials, ufrag: cwIv, pass: 6Hjsj+AulBHr42XcrI7XWYAL
[erizo-b3b69bb6-147a-3e51-7255-cc365f9baec5] 2017-06-02 15:56:41,850  - DEBUG [0x7f27a69ff780] LibNiceConnection - id: 969786763341568300, type: publisher,  message: gathering, this: 0x3bc0b60
[erizo-b3b69bb6-147a-3e51-7255-cc365f9baec5] 2017-06-02 15:56:41,851  - DEBUG [0x7f27a69ff780] WebRtcConnection - id: 969786763341568300, type: publisher,  message: Discovered New Candidate, candidate: a=candidate:1 1 udp 2013266431 10.99.9.66 58424 typ host generation 0
[erizo-b3b69bb6-147a-3e51-7255-cc365f9baec5] 2017-06-02 15:56:41,851  - DEBUG [0x7f27a69ff780] LibNiceConnection - id: 969786763341568300, type: publisher,  message: gathering done, stream_id: 1
[erizo-b3b69bb6-147a-3e51-7255-cc365f9baec5] 2017-06-02 15:56:41,851  - INFO [0x7f27a69ff780] LibNiceConnection - id: 969786763341568300, type: publisher,  message: iceState transition, ice_config_.transport_name: video, iceState: initial, newIceState: cand_received, this: 0x3bc0b60
[erizo-b3b69bb6-147a-3e51-7255-cc365f9baec5] 2017-06-02 15:56:41,851  - DEBUG [0x7f27a69ff780] DtlsTransport - id: 969786763341568300, type: publisher,  message:NiceState, transportName: video, state: 1, isBundle: 1
[erizo-b3b69bb6-147a-3e51-7255-cc365f9baec5] 2017-06-02 15:56:41,852  - DEBUG [0x7f27a69ff780] WebRtcConnection - id: 969786763341568300, type: publisher,  transportName: video, new_state: 2
[erizo-b3b69bb6-147a-3e51-7255-cc365f9baec5] 2017-06-02 15:56:41,852  - DEBUG [0x7f27a69ff780] WebRtcConnection - id: 969786763341568300, type: publisher,  message: Getting Local Sdp
[erizo-b3b69bb6-147a-3e51-7255-cc365f9baec5] 2017-06-02 15:56:41,852  - DEBUG [0x7f27a69ff780] DtlsTransport - id: 969786763341568300, type: publisher,  message: processing local sdp, transportName: video
[erizo-b3b69bb6-147a-3e51-7255-cc365f9baec5] 2017-06-02 15:56:41,852  - DEBUG [0x7f27a69ff780] DtlsTransport - id: 969786763341568300, type: publisher,  message: processed local sdp, transportName: video, ufrag: 3qzP, pass: TCECdlW2ZIsS7swQbmSk/a
[erizo-b3b69bb6-147a-3e51-7255-cc365f9baec5] 2017-06-02 15:56:41,852  - INFO [0x7f27a69ff780] WebRtcConnection - id: 969786763341568300, type: publisher,  newGlobalState: 103
[erizo-b3b69bb6-147a-3e51-7255-cc365f9baec5] (remote_bitrate_estimator_single_stream.cc:61): RemoteBitrateEstimatorSingleStream: Instantiating.
[erizo-b3b69bb6-147a-3e51-7255-cc365f9baec5] 2017-06-02 15:56:41,856  - DEBUG [0x7f277dfeb700] LibNiceConnection - id: 969786763341568300, type: publisher,  message: starting g_main_loop, this: 0x3bc0b60
[erizo-b3b69bb6-147a-3e51-7255-cc365f9baec5] 2017-06-02 15:56:41.857  - INFO: ErizoJSController - message: WebRtcConnection status update, id: 969786763341568300, status: 103, type: publisher
[erizo-b3b69bb6-147a-3e51-7255-cc365f9baec5] 2017-06-02 15:56:41.875  - INFO: ErizoJSController - message: Process Signaling message, streamId: 969786763341568300, peerId: 7ZaOmLkXeqqNiRxNqMEy
[erizo-b3b69bb6-147a-3e51-7255-cc365f9baec5] 2017-06-02 15:56:41,876  - DEBUG [0x7f27a69ff780] WebRtcConnection - id: 969786763341568300, type: publisher,  message: Adding remote Candidate, candidate: a=candidate:917273023 1 udp 2122260223 192.168.10.19 52361 typ host generation 0 ufrag cwIv network-id 1 network-cost 10, mid: audio, sdpMLine: 0
[erizo-b3b69bb6-147a-3e51-7255-cc365f9baec5] 2017-06-02 15:56:41,876  - DEBUG [0x7f27a69ff780] LibNiceConnection - id: 969786763341568300, type: publisher,  message: setting remote candidates, candidateSize: 1, mediaType: 0
[erizo-b3b69bb6-147a-3e51-7255-cc365f9baec5] 2017-06-02 15:56:41,876  - DEBUG [0x7f27a69ff780] LibNiceConnection - id: 969786763341568300, type: publisher,  message: adding remote candidate, hostType: 0, hostAddress: 192.168.10.19, hostPort: 52361, priority: 2122260223, componentId: 1, ufrag: cwIv, pass: 6Hjsj+AulBHr42XcrI7XWYAL
[erizo-b3b69bb6-147a-3e51-7255-cc365f9baec5] 2017-06-02 15:56:41.877  - INFO: ErizoJSController - message: Process Signaling message, streamId: 969786763341568300, peerId: 7ZaOmLkXeqqNiRxNqMEy
[erizo-b3b69bb6-147a-3e51-7255-cc365f9baec5] 2017-06-02 15:56:41,877  - DEBUG [0x7f27a69ff780] WebRtcConnection - id: 969786763341568300, type: publisher,  message: Adding remote Candidate, candidate: a=candidate:917273023 1 udp 2122260223 192.168.10.19 64484 typ host generation 0 ufrag cwIv network-id 1 network-cost 10, mid: video, sdpMLine: 1
[erizo-b3b69bb6-147a-3e51-7255-cc365f9baec5] 2017-06-02 15:56:41,878  - DEBUG [0x7f27a69ff780] LibNiceConnection - id: 969786763341568300, type: publisher,  message: setting remote candidates, candidateSize: 1, mediaType: 0
[erizo-b3b69bb6-147a-3e51-7255-cc365f9baec5] 2017-06-02 15:56:41,878  - DEBUG [0x7f27a69ff780] LibNiceConnection - id: 969786763341568300, type: publisher,  message: adding remote candidate, hostType: 0, hostAddress: 192.168.10.19, hostPort: 64484, priority: 2122260223, componentId: 1, ufrag: cwIv, pass: 6Hjsj+AulBHr42XcrI7XWYAL
[erizo-b3b69bb6-147a-3e51-7255-cc365f9baec5] 2017-06-02 15:56:41.880  - INFO: ErizoJSController - message: Process Signaling message, streamId: 969786763341568300, peerId: 7ZaOmLkXeqqNiRxNqMEy
[erizo-b3b69bb6-147a-3e51-7255-cc365f9baec5] 2017-06-02 15:56:41,880  - DEBUG [0x7f27a69ff780] WebRtcConnection - id: 969786763341568300, type: publisher,  message: Adding remote Candidate, candidate: a=candidate:3085205259 1 udp 1686052607 91.237.135.245 52361 typ srflx raddr 192.168.10.19 rport 52361 generation 0 ufrag cwIv network-id 1 network-cost 10, mid: audio, sdpMLine: 0
[erizo-b3b69bb6-147a-3e51-7255-cc365f9baec5] 2017-06-02 15:56:41,880  - DEBUG [0x7f27a69ff780] LibNiceConnection - id: 969786763341568300, type: publisher,  message: setting remote candidates, candidateSize: 1, mediaType: 0
[erizo-b3b69bb6-147a-3e51-7255-cc365f9baec5] 2017-06-02 15:56:41,880  - DEBUG [0x7f27a69ff780] LibNiceConnection - id: 969786763341568300, type: publisher,  message: adding relay or srflx remote candidate, hostType: 1, hostAddress: 91.237.135.245, hostPort: 52361, rAddress: 192.168.10.19, rPort: 52361
[erizo-b3b69bb6-147a-3e51-7255-cc365f9baec5] 2017-06-02 15:56:41.940  - INFO: ErizoJSController - message: Process Signaling message, streamId: 969786763341568300, peerId: 7ZaOmLkXeqqNiRxNqMEy
[erizo-b3b69bb6-147a-3e51-7255-cc365f9baec5] 2017-06-02 15:56:41,941  - DEBUG [0x7f27a69ff780] WebRtcConnection - id: 969786763341568300, type: publisher,  message: Adding remote Candidate, candidate: a=candidate:3773728415 1 udp 41885439 91.185.213.226 52907 typ relay raddr 91.237.135.245 rport 52361 generation 0 ufrag cwIv network-id 1 network-cost 10, mid: audio, sdpMLine: 0
[erizo-b3b69bb6-147a-3e51-7255-cc365f9baec5] 2017-06-02 15:56:41,941  - DEBUG [0x7f27a69ff780] LibNiceConnection - id: 969786763341568300, type: publisher,  message: setting remote candidates, candidateSize: 1, mediaType: 0
[erizo-b3b69bb6-147a-3e51-7255-cc365f9baec5] 2017-06-02 15:56:41,941  - DEBUG [0x7f27a69ff780] LibNiceConnection - id: 969786763341568300, type: publisher,  message: adding relay or srflx remote candidate, hostType: 3, hostAddress: 91.185.213.226, hostPort: 52907, rAddress: 91.237.135.245, rPort: 52361
[erizo-b3b69bb6-147a-3e51-7255-cc365f9baec5] 2017-06-02 15:56:41.973  - INFO: ErizoJSController - message: Process Signaling message, streamId: 969786763341568300, peerId: 7ZaOmLkXeqqNiRxNqMEy
[erizo-b3b69bb6-147a-3e51-7255-cc365f9baec5] 2017-06-02 15:56:41,973  - DEBUG [0x7f27a69ff780] WebRtcConnection - id: 969786763341568300, type: publisher,  message: Adding remote Candidate, candidate: a=candidate:2016380239 1 tcp 1518280447 192.168.10.19 9 typ host tcptype active generation 0 ufrag cwIv network-id 1 network-cost 10, mid: audio, sdpMLine: 0
[erizo-b3b69bb6-147a-3e51-7255-cc365f9baec5] 2017-06-02 15:56:41,974  - DEBUG [0x7f27a69ff780] LibNiceConnection - id: 969786763341568300, type: publisher,  message: setting remote candidates, candidateSize: 0, mediaType: 0
[erizo-b3b69bb6-147a-3e51-7255-cc365f9baec5] 2017-06-02 15:56:42.028  - INFO: ErizoJSController - message: Process Signaling message, streamId: 969786763341568300, peerId: 7ZaOmLkXeqqNiRxNqMEy
[erizo-b3b69bb6-147a-3e51-7255-cc365f9baec5] 2017-06-02 15:56:42,032  - DEBUG [0x7f27a69ff780] WebRtcConnection - id: 969786763341568300, type: publisher,  message: Adding remote Candidate, candidate: end, mid: end, sdpMLine: -1
2017-06-02 15:56:42,032  - DEBUG [0x7f27a69ff780] WebRtcConnection - id: 969786763341568300, type: publisher,  message: All candidates received
2017-06-02 15:56:42,032  - DEBUG [0x7f27a69ff780] LibNiceConnection - id: 969786763341568300, type: publisher,  message: setting hasReceivedLastCandidate, hasReceived: 1
2017-06-02 15:56:42,032  - DEBUG [0x7f27a69ff780] LibNiceConnection - id: 969786763341568300, type: publisher,  message: setting remote candidates, candidateSize: 0, mediaType: 0
[erizo-b3b69bb6-147a-3e51-7255-cc365f9baec5] 2017-06-02 15:56:50,950  - DEBUG [0x7f277dfeb700] LibNiceConnection - id: 969786763341568300, type: publisher,  message: new ice component state, newState: 4, transportName: video, componentId 1, iceComponents: 1
2017-06-02 15:56:50,950  - WARN [0x7f277dfeb700] LibNiceConnection - id: 969786763341568300, type: publisher,  message: component failed, ice_config_.transport_name: video, componentId: 1
2017-06-02 15:56:50,950  - INFO [0x7f277dfeb700] LibNiceConnection - id: 969786763341568300, type: publisher,  message: iceState transition, ice_config_.transport_name: video, iceState: cand_received, newIceState: failed, this: 0x3bc0b60
2017-06-02 15:56:50,950  - WARN [0x7f277dfeb700] LibNiceConnection - id: 969786763341568300, type: publisher,  message: Ice Failed
2017-06-02 15:56:50,950  - DEBUG [0x7f277dfeb700] DtlsTransport - id: 969786763341568300, type: publisher,  message:NiceState, transportName: video, state: 4, isBundle: 1
2017-06-02 15:56:50,950  - DEBUG [0x7f277dfeb700] DtlsTransport - id: 969786763341568300, type: publisher,  message: Nice Failed
2017-06-02 15:56:50,950  - DEBUG [0x7f277dfeb700] WebRtcConnection - id: 969786763341568300, type: publisher,  transportName: video, new_state: 5
2017-06-02 15:56:50,950  - ERROR [0x7f277dfeb700] WebRtcConnection - id: 969786763341568300, type: publisher,  message: Transport Failed, transportType: video
2017-06-02 15:56:50,950  - INFO [0x7f277dfeb700] WebRtcConnection - id: 969786763341568300, type: publisher,  newGlobalState: 500
2017-06-02 15:56:50.950  - INFO: ErizoJSController - message: WebRtcConnection status update, id: 969786763341568300, status: 500, type: publisher
2017-06-02 15:56:50.951  - WARN: ErizoJSController - message: failed the ICE process, code: 502, id: 969786763341568300
2017-06-02 15:56:50.952  - WARN: ErizoController - message: addPublisher ICE Failed, state: PUBLISHER_FAILED, streamId: 969786763341568300, clientId: 7ZaOmLkXeqqNiRxNqMEy
2017-06-02 15:56:50.964  - INFO: RoomController - message: removePublisher, publisherId: 969786763341568300, erizoId: ErizoJS_b3b69bb6-147a-3e51-7255-cc365f9baec5
[erizo-b3b69bb6-147a-3e51-7255-cc365f9baec5] 2017-06-02 15:56:50.965  - INFO: ErizoJSController - message: Removing publisher, id: 969786763341568300
2017-06-02 15:56:50.966  - INFO: ErizoJSController - message: WebRtcConnection status update, id: 969786763341568300, status: 105, type: publisher
2017-06-02 15:56:50,966  - DEBUG [0x7f2798f20700] WebRtcConnection - id: 969786763341568300, type: publisher,  message:Close called
2017-06-02 15:56:50,966  - DEBUG [0x7f277e7ec700] WebRtcConnection - id: 969786763341568300, type: publisher,  message:Destructor called
2017-06-02 15:56:50,966  - DEBUG [0x7f277e7ec700] WebRtcConnection - id: 969786763341568300, type: publisher,  message: Destructor ended
2017-06-02 15:56:50,967  - DEBUG [0x7f277e7ec700] DtlsTransport - id: 969786763341568300, type: publisher,  message: closing
2017-06-02 15:56:50,967  - DEBUG [0x7f277e7ec700] LibNiceConnection - id: 969786763341568300, type: publisher,  message:closing
2017-06-02 15:56:50,967  - WARN [0x7f277e7ec700] LibNiceConnection - id: 969786763341568300, type: publisher,  message: unexpected ice state transition, iceState: failed,  newIceState: finished
2017-06-02 15:56:50,967  - DEBUG [0x7f277e7ec700] LibNiceConnection - id: 969786763341568300, type: publisher,  message:main loop quit
2017-06-02 15:56:50,967  - DEBUG [0x7f277e7ec700] LibNiceConnection - id: 969786763341568300, type: publisher,  message: m_thread join, this: 0x3bc0b60
2017-06-02 15:56:50,967  - DEBUG [0x7f277dfeb700] LibNiceConnection - id: 969786763341568300, type: publisher,  message: finished g_main_loop, this: 0x3bc0b60
2017-06-02 15:56:50,967  - DEBUG [0x7f277e7ec700] LibNiceConnection - id: 969786763341568300, type: publisher,  message:Unrefing loop
2017-06-02 15:56:50,967  - DEBUG [0x7f277e7ec700] LibNiceConnection - id: 969786763341568300, type: publisher,  message: unrefing agent
2017-06-02 15:56:50,968  - DEBUG [0x7f277e7ec700] LibNiceConnection - id: 969786763341568300, type: publisher,  message: Unrefing context
2017-06-02 15:56:50,968  - DEBUG [0x7f277e7ec700] LibNiceConnection - id: 969786763341568300, type: publisher,  message: closed, this: 0x3bc0b60
2017-06-02 15:56:50,968  - DEBUG [0x7f277e7ec700] DtlsTransport - id: 969786763341568300, type: publisher,  message: closed
2017-06-02 15:56:50,968  - DEBUG [0x7f277e7ec700] LibNiceConnection - id: 969786763341568300, type: publisher,  message:closing
2017-06-02 15:56:50,968  - WARN [0x7f277e7ec700] LibNiceConnection - id: 969786763341568300, type: publisher,  message: unexpected ice state transition, iceState: failed,  newIceState: finished
2017-06-02 15:56:50,968  - DEBUG [0x7f277e7ec700] LibNiceConnection - id: 969786763341568300, type: publisher,  message: m_thread join, this: 0x3bc0b60
2017-06-02 15:56:50,968  - DEBUG [0x7f277e7ec700] LibNiceConnection - id: 969786763341568300, type: publisher,  message: interrupt thread to close, this: 0x3bc0b60
2017-06-02 15:56:50,968  - DEBUG [0x7f277e7ec700] LibNiceConnection - id: 969786763341568300, type: publisher,  message: closed, this: 0x3bc0b60
[erizo-b3b69bb6-147a-3e51-7255-cc365f9baec5] 2017-06-02 15:56:50.969  - INFO: ErizoJSController - message: muxer closed succesfully, id: 969786763341568300, OK
[erizo-b3b69bb6-147a-3e51-7255-cc365f9baec5] 2017-06-02 15:56:50.970  - INFO: ErizoJSController - message: Removed all publishers. Killing process.
2017-06-02 15:56:50.982  - INFO: ErizoAgent - message: closed, erizoId: b3b69bb6-147a-3e51-7255-cc365f9baec5
2017-06-02 15:56:50.991  - INFO: ErizoAgent - message: launched new ErizoJS, erizoId: 3736814e-0dbc-8bdc-dad2-43431b8f5fd4
[erizo-3736814e-0dbc-8bdc-dad2-43431b8f5fd4] (node:23108) DeprecationWarning: 'GLOBAL' is deprecated, use 'global'
[erizo-3736814e-0dbc-8bdc-dad2-43431b8f5fd4] 2017-06-02 15:56:51.262  - INFO: ErizoJS - message: Started, erizoId: 3736814e-0dbc-8bdc-dad2-43431b8f5fd4
2017-06-02 15:57:06.781  - INFO: EcCloudHandler - message: deleting erizoJS, erizoId: b3b69bb6-147a-3e51-7255-cc365f9baec5
zevarito commented 7 years ago

0: WARNING: cannot find certificate file: turn_server_cert.pem (1) 0: WARNING: cannot start TLS and DTLS listeners because certificate file is not set properly 0: WARNING: cannot find private key file: turn_server_pkey.pem (1) 0: WARNING: cannot start TLS and DTLS listeners because private key file is not set properly

Did you pay attention to this log output in your Coturn logs?

2017-06-02 11:16 GMT-03:00 Gregor Felkar notifications@github.com:

Notice that when you use long-term auth in Coturn the password needs to be hashed.

Yes i know, i was asking if there is somekind of config in licode to use hashed passwords. For example in my other project where i used SimpleWebRTC library i could specify:

...
"stunservers": [
    { "url": "stun:<domain>:3478" }
],
"turnservers": [
    {
        "urls": [
            "turn:<domain>:3478"
        ],
        "secret": "<credential-secret>",
        "expiry": 86400
    }
]
...

Or i have to write the client side for this to work (this is minor issue as i can reconfigure my other project to use current username:password pair). But the mistery is in ICE rejection.

Also don't forget to open turn server ports range for tcp/udp 49152-65535

My CoTURN server has also open all ports (currently im just trying to make the example work). I have also tested the turn server with TrickleICE page https://webrtc.github.io/samples/src/content/peerconnection/trickle-ice/ and my previous project which uses WebRTC without MCU (only for 1on1 video chat).

What are the Coturn logs saying?

The cotrun output stayed the same as when i started the turn server

0: log file opened: /var/log/turn_18946_2017-06-02.log 0: RFC 3489/5389/5766/5780/6062/6156 STUN/TURN Server Version Coturn-4.5.0.3 'dan Eider' 0: Max number of open files/sockets allowed for this process: 65536 0: Due to the open files/sockets limitation, max supported number of TURN Sessions possible is: 32500 (approximately) 0:

==== Show him the instruments, Practical Frost: ====

0: TLS supported 0: DTLS supported 0: DTLS 1.2 supported 0: TURN/STUN ALPN supported 0: Third-party authorization (oAuth) supported 0: GCM (AEAD) supported 0: OpenSSL compile-time version: OpenSSL 1.0.2g-fips 1 Mar 2016 0: 0: SQLite supported, default database location is /var/lib/turn/turndb 0: Redis supported 0: PostgreSQL supported 0: MySQL supported 0: MongoDB is not supported 0: 0: Default Net Engine version: 3 (UDP thread per CPU core)

=====================================================

0: Config file found: /etc/turnserver.conf 0: Listener address to use: 0: Relay address to use: 0: Config file found: /etc/turnserver.conf 0: Domain name: 0: Default realm: 0: WARNING: cannot find certificate file: turn_server_cert.pem (1) 0: WARNING: cannot start TLS and DTLS listeners because certificate file is not set properly 0: WARNING: cannot find private key file: turn_server_pkey.pem (1) 0: WARNING: cannot start TLS and DTLS listeners because private key file is not set properly 0: pid file created: /var/run/turnserver.pid 0: IO method (main listener thread): epoll (with changelist) 0: WARNING: I cannot support STUN CHANGE_REQUEST functionality because only one IP address is provided 0: Wait for relay ports initialization... 0: relay initialization... 0: relay initialization done 0: Relay ports initialization done 0: IO method (general relay thread): epoll (with changelist) 0: turn server id=1 created 0: IO method (general relay thread): epoll (with changelist) 0: turn server id=0 created 0: Total General servers: 2 0: IO method (admin thread): epoll (with changelist) 0: IO method (auth thread): epoll (with changelist) 0: IO method (auth thread): epoll (with changelist) 0: SQLite DB connection success: /var/lib/turn/turndb


I get following output in console when refreshing basicexample site (maybe this will tell you more info):

GET / 200 0.541 ms - 522 2017-06-02 15:56:40.657 - INFO: ErizoController - message: Socket disconnect, clientId: 2hUhDX2zNzd--tM2qMEx 2017-06-02 15:56:40.657 - INFO: RoomController - message: removeSubscriptions, clientId: 2hUhDX2zNzd--tM2qMEx GET /erizo.js 200 0.677 ms - 105571 GET /script.js 200 0.467 ms - 5185 Creating token. Request body: { username: 'user', role: 'presenter', room: 'basicExampleRoom', type: 'erizo' } Token created eyJ0b2tlbklkIjoiNTkzMTZlOThlZjkxYmU1MDY0Y2EwYTNhIiwiaG9zdCI6ImNvbnRyb2xsLnZhYi5pdC1waGFybWEuc2k6NDQzIiwic2VjdXJlIjp0cnVlLCJzaWduYXR1cmUiOiJaalk1TlRVMFlUUmlZalV6T0Rrd01UWmpPV00xTkRFell6Qm1Zek01TkdZM1lXVmlabVEzT1E9PSJ9 POST /createToken/ 200 14.799 ms - 216 GET /assets/loader.gif 200 1.963 ms - 673 GET /assets/star.svg 200 1.553 ms - 4753 GET /assets/sound48.png 200 0.453 ms - 4851 2017-06-02 15:56:41.759 - INFO: ErizoController - message: erizoClient connected, clientId: 7ZaOmLkXeqqNiRxNqMEy 2017-06-02 15:56:41.776 - INFO: RPCPublic - message: consumed token, tokenId: 59316e98ef91be5064ca0a3a , roomId: 592eb97d6ccb4c9d56a001b4, serviceId: 592eb411e4bed44714413926 2017-06-02 15:56:41.789 - INFO: ErizoController - message: addPublisher requested, streamId: 969786763341568300, clientId: 7ZaOmLkXeqqNiRxNqMEy, state: erizo, data: true, audio: true, video: true, screen: , minVideoBW: 0, metadata: [Object], 2017-06-02 15:56:41.789 - INFO: RoomController - message: addPublisher, streamId: 969786763341568300, state: erizo, data: true, audio: true, video: true, screen: , minVideoBW: 0, metadata: [Object], type: publisher 2017-06-02 15:56:41.789 - INFO: EcCloudHandler - message: createErizoJS, agentId: ErizoAgent 2017-06-02 15:56:41.791 - INFO: EcCloudHandler - message: createErizoJS success, erizoId: b3b69bb6-147a-3e51-7255-cc365f9baec5, agentId: fe3c8202-f872-2cab-8ebf-e5c53e5a8751 2017-06-02 15:56:41.791 - INFO: RoomController - message: addPublisher erizoJs assigned, erizoId: b3b69bb6-147a-3e51-7255-cc365f9baec5, streamId: 969786763341568300, type: publisher [erizo-b3b69bb6-147a-3e51-7255-cc365f9baec5] 2017-06-02 15:56:41.796 - INFO: ErizoJSController - message: Adding publisher, streamId: 969786763341568300, state: erizo, data: true, audio: true, video: true, screen: , minVideoBW: 0, metadata: [Object], type: publisher [erizo-b3b69bb6-147a-3e51-7255-cc365f9baec5] 2017-06-02 15:56:41,799 - INFO [0x7f27a69ff780] WebRtcConnection - id: 969786763341568300, message: constructor, stunserver: , stunPort: 0, minPort: 0, maxPort: 0 2017-06-02 15:56:41.803 - INFO: ErizoController - message: addPublisher, state: PUBLISHER_INITIAL, clientId: 7ZaOmLkXeqqNiRxNqMEy, streamId: 969786763341568300 [erizo-b3b69bb6-147a-3e51-7255-cc365f9baec5] 2017-06-02 15:56:41.803 - INFO: ErizoJSController - message: WebRtcConnection status update, id: 969786763341568300, status: 101, type: publisher [erizo-b3b69bb6-147a-3e51-7255-cc365f9baec5] 2017-06-02 15:56:41.824 - INFO: ErizoJSController - message: Process Signaling message, streamId: 969786763341568300, peerId: 7ZaOmLkXeqqNiRxNqMEy [erizo-b3b69bb6-147a-3e51-7255-cc365f9baec5] 2017-06-02 15:56:41,824 - DEBUG [0x7f27a69ff780] WebRtcConnection - id: 969786763341568300, type: publisher, message: setting remote SDP [erizo-b3b69bb6-147a-3e51-7255-cc365f9baec5] 2017-06-02 15:56:41,825 - DEBUG [0x7f27a69ff780] WebRtcConnection - id: 969786763341568300, type: publisher, message: Setting remote BW, maxVideoBW: 300 [erizo-b3b69bb6-147a-3e51-7255-cc365f9baec5] 2017-06-02 15:56:41,825 - WARN [0x7f27a69ff780] rtp.RtpExtensionProcessor - Unsupported extension http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01 [erizo-b3b69bb6-147a-3e51-7255-cc365f9baec5 http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01%5Berizo-b3b69bb6-147a-3e51-7255-cc365f9baec5] 2017-06-02 15:56:41,826 - DEBUG [0x7f27a69ff780] WebRtcConnection - id: 969786763341568300, type: publisher, message: Creating videoTransport, ufrag: cwIv, pass: 6Hjsj+AulBHr42XcrI7XWYAL [erizo-b3b69bb6-147a-3e51-7255-cc365f9baec5] 2017-06-02 15:56:41,826 - DEBUG [0x7f27a69ff780] DtlsTransport - id: 969786763341568300, message: constructor, transportName: video, isBundle: 1 [erizo-b3b69bb6-147a-3e51-7255-cc365f9baec5] 2017-06-02 15:56:41,848 - DEBUG [0x7f27a69ff780] DtlsTransport - id: 969786763341568300, message: creating active-client [erizo-b3b69bb6-147a-3e51-7255-cc365f9baec5] 2017-06-02 15:56:41,848 - WARN [0x7f27a69ff780] dtls.SSL - error in before/connect initialization [erizo-b3b69bb6-147a-3e51-7255-cc365f9baec5] 2017-06-02 15:56:41,849 - DEBUG [0x7f27a69ff780] DtlsTransport - id: 969786763341568300, message: created [erizo-b3b69bb6-147a-3e51-7255-cc365f9baec5] 2017-06-02 15:56:41,849 - DEBUG [0x7f27a69ff780] DtlsTransport - id: 969786763341568300, type: publisher, message: starting ice [erizo-b3b69bb6-147a-3e51-7255-cc365f9baec5] 2017-06-02 15:56:41,849 - DEBUG [0x7f27a69ff780] LibNiceConnection - id: 969786763341568300, type: publisher, message: creating Nice Agent [erizo-b3b69bb6-147a-3e51-7255-cc365f9baec5] 2017-06-02 15:56:41,850 - DEBUG [0x7f27a69ff780] LibNiceConnection - id: 969786763341568300, type: publisher, message: adding stream, iceComponents: 1 [erizo-b3b69bb6-147a-3e51-7255-cc365f9baec5] 2017-06-02 15:56:41,850 - DEBUG [0x7f27a69ff780] LibNiceConnection - id: 969786763341568300, type: publisher, message: setting remote credentials in constructor, ufrag:cwIv, pass:6Hjsj+AulBHr42XcrI7XWYAL [erizo-b3b69bb6-147a-3e51-7255-cc365f9baec5] 2017-06-02 15:56:41,850 - DEBUG [0x7f27a69ff780] LibNiceConnection - id: 969786763341568300, type: publisher, message: setting remote credentials, ufrag: cwIv, pass: 6Hjsj+AulBHr42XcrI7XWYAL [erizo-b3b69bb6-147a-3e51-7255-cc365f9baec5] 2017-06-02 15:56:41,850 - DEBUG [0x7f27a69ff780] LibNiceConnection - id: 969786763341568300, type: publisher, message: gathering, this: 0x3bc0b60 [erizo-b3b69bb6-147a-3e51-7255-cc365f9baec5] 2017-06-02 15:56:41,851 - DEBUG [0x7f27a69ff780] WebRtcConnection - id: 969786763341568300, type: publisher, message: Discovered New Candidate, candidate: a=candidate:1 1 udp 2013266431 10.99.9.66 58424 typ host generation 0 [erizo-b3b69bb6-147a-3e51-7255-cc365f9baec5] 2017-06-02 15:56:41,851 - DEBUG [0x7f27a69ff780] LibNiceConnection - id: 969786763341568300, type: publisher, message: gathering done, stream_id: 1 [erizo-b3b69bb6-147a-3e51-7255-cc365f9baec5] 2017-06-02 15:56:41,851 - INFO [0x7f27a69ff780] LibNiceConnection - id: 969786763341568300, type: publisher, message: iceState transition, iceconfig.transport_name: video, iceState: initial, newIceState: cand_received, this: 0x3bc0b60 [erizo-b3b69bb6-147a-3e51-7255-cc365f9baec5] 2017-06-02 15:56:41,851 - DEBUG [0x7f27a69ff780] DtlsTransport - id: 969786763341568300, type: publisher, message:NiceState, transportName: video, state: 1, isBundle: 1 [erizo-b3b69bb6-147a-3e51-7255-cc365f9baec5] 2017-06-02 15:56:41,852 - DEBUG [0x7f27a69ff780] WebRtcConnection - id: 969786763341568300, type: publisher, transportName: video, new_state: 2 [erizo-b3b69bb6-147a-3e51-7255-cc365f9baec5] 2017-06-02 15:56:41,852 - DEBUG [0x7f27a69ff780] WebRtcConnection - id: 969786763341568300, type: publisher, message: Getting Local Sdp [erizo-b3b69bb6-147a-3e51-7255-cc365f9baec5] 2017-06-02 15:56:41,852 - DEBUG [0x7f27a69ff780] DtlsTransport - id: 969786763341568300, type: publisher, message: processing local sdp, transportName: video [erizo-b3b69bb6-147a-3e51-7255-cc365f9baec5] 2017-06-02 15:56:41,852 - DEBUG [0x7f27a69ff780] DtlsTransport - id: 969786763341568300, type: publisher, message: processed local sdp, transportName: video, ufrag: 3qzP, pass: TCECdlW2ZIsS7swQbmSk/a [erizo-b3b69bb6-147a-3e51-7255-cc365f9baec5] 2017-06-02 15:56:41,852 - INFO [0x7f27a69ff780] WebRtcConnection - id: 969786763341568300, type: publisher, newGlobalState: 103 [erizo-b3b69bb6-147a-3e51-7255-cc365f9baec5] (remote_bitrate_estimator_single_stream.cc:61): RemoteBitrateEstimatorSingleStream: Instantiating. [erizo-b3b69bb6-147a-3e51-7255-cc365f9baec5] 2017-06-02 15:56:41,856 - DEBUG [0x7f277dfeb700] LibNiceConnection - id: 969786763341568300, type: publisher, message: starting g_main_loop, this: 0x3bc0b60 [erizo-b3b69bb6-147a-3e51-7255-cc365f9baec5] 2017-06-02 15:56:41.857 - INFO: ErizoJSController - message: WebRtcConnection status update, id: 969786763341568300, status: 103, type: publisher [erizo-b3b69bb6-147a-3e51-7255-cc365f9baec5] 2017-06-02 15:56:41.875 - INFO: ErizoJSController - message: Process Signaling message, streamId: 969786763341568300, peerId: 7ZaOmLkXeqqNiRxNqMEy [erizo-b3b69bb6-147a-3e51-7255-cc365f9baec5] 2017-06-02 15:56:41,876 - DEBUG [0x7f27a69ff780] WebRtcConnection - id: 969786763341568300, type: publisher, message: Adding remote Candidate, candidate: a=candidate:917273023 1 udp 2122260223 192.168.10.19 52361 typ host generation 0 ufrag cwIv network-id 1 network-cost 10, mid: audio, sdpMLine: 0 [erizo-b3b69bb6-147a-3e51-7255-cc365f9baec5] 2017-06-02 15:56:41,876 - DEBUG [0x7f27a69ff780] LibNiceConnection - id: 969786763341568300, type: publisher, message: setting remote candidates, candidateSize: 1, mediaType: 0 [erizo-b3b69bb6-147a-3e51-7255-cc365f9baec5] 2017-06-02 15:56:41,876 - DEBUG [0x7f27a69ff780] LibNiceConnection - id: 969786763341568300, type: publisher, message: adding remote candidate, hostType: 0, hostAddress: 192.168.10.19, hostPort: 52361, priority: 2122260223, componentId: 1, ufrag: cwIv, pass: 6Hjsj+AulBHr42XcrI7XWYAL [erizo-b3b69bb6-147a-3e51-7255-cc365f9baec5] 2017-06-02 15:56:41.877 - INFO: ErizoJSController - message: Process Signaling message, streamId: 969786763341568300, peerId: 7ZaOmLkXeqqNiRxNqMEy [erizo-b3b69bb6-147a-3e51-7255-cc365f9baec5] 2017-06-02 15:56:41,877 - DEBUG [0x7f27a69ff780] WebRtcConnection - id: 969786763341568300, type: publisher, message: Adding remote Candidate, candidate: a=candidate:917273023 1 udp 2122260223 192.168.10.19 64484 typ host generation 0 ufrag cwIv network-id 1 network-cost 10, mid: video, sdpMLine: 1 [erizo-b3b69bb6-147a-3e51-7255-cc365f9baec5] 2017-06-02 15:56:41,878 - DEBUG [0x7f27a69ff780] LibNiceConnection - id: 969786763341568300, type: publisher, message: setting remote candidates, candidateSize: 1, mediaType: 0 [erizo-b3b69bb6-147a-3e51-7255-cc365f9baec5] 2017-06-02 15:56:41,878 - DEBUG [0x7f27a69ff780] LibNiceConnection - id: 969786763341568300, type: publisher, message: adding remote candidate, hostType: 0, hostAddress: 192.168.10.19, hostPort: 64484, priority: 2122260223, componentId: 1, ufrag: cwIv, pass: 6Hjsj+AulBHr42XcrI7XWYAL [erizo-b3b69bb6-147a-3e51-7255-cc365f9baec5] 2017-06-02 15:56:41.880 - INFO: ErizoJSController - message: Process Signaling message, streamId: 969786763341568300, peerId: 7ZaOmLkXeqqNiRxNqMEy [erizo-b3b69bb6-147a-3e51-7255-cc365f9baec5] 2017-06-02 15:56:41,880 - DEBUG [0x7f27a69ff780] WebRtcConnection - id: 969786763341568300, type: publisher, message: Adding remote Candidate, candidate: a=candidate:3085205259 1 udp 1686052607 91.237.135.245 52361 typ srflx raddr 192.168.10.19 rport 52361 generation 0 ufrag cwIv network-id 1 network-cost 10, mid: audio, sdpMLine: 0 [erizo-b3b69bb6-147a-3e51-7255-cc365f9baec5] 2017-06-02 15:56:41,880 - DEBUG [0x7f27a69ff780] LibNiceConnection - id: 969786763341568300, type: publisher, message: setting remote candidates, candidateSize: 1, mediaType: 0 [erizo-b3b69bb6-147a-3e51-7255-cc365f9baec5] 2017-06-02 15:56:41,880 - DEBUG [0x7f27a69ff780] LibNiceConnection - id: 969786763341568300, type: publisher, message: adding relay or srflx remote candidate, hostType: 1, hostAddress: 91.237.135.245, hostPort: 52361, rAddress: 192.168.10.19, rPort: 52361 [erizo-b3b69bb6-147a-3e51-7255-cc365f9baec5] 2017-06-02 15:56:41.940 - INFO: ErizoJSController - message: Process Signaling message, streamId: 969786763341568300, peerId: 7ZaOmLkXeqqNiRxNqMEy [erizo-b3b69bb6-147a-3e51-7255-cc365f9baec5] 2017-06-02 15:56:41,941 - DEBUG [0x7f27a69ff780] WebRtcConnection - id: 969786763341568300, type: publisher, message: Adding remote Candidate, candidate: a=candidate:3773728415 1 udp 41885439 91.185.213.226 52907 typ relay raddr 91.237.135.245 rport 52361 generation 0 ufrag cwIv network-id 1 network-cost 10, mid: audio, sdpMLine: 0 [erizo-b3b69bb6-147a-3e51-7255-cc365f9baec5] 2017-06-02 15:56:41,941 - DEBUG [0x7f27a69ff780] LibNiceConnection - id: 969786763341568300, type: publisher, message: setting remote candidates, candidateSize: 1, mediaType: 0 [erizo-b3b69bb6-147a-3e51-7255-cc365f9baec5] 2017-06-02 15:56:41,941 - DEBUG [0x7f27a69ff780] LibNiceConnection - id: 969786763341568300, type: publisher, message: adding relay or srflx remote candidate, hostType: 3, hostAddress: 91.185.213.226, hostPort: 52907, rAddress: 91.237.135.245, rPort: 52361 [erizo-b3b69bb6-147a-3e51-7255-cc365f9baec5] 2017-06-02 15:56:41.973 - INFO: ErizoJSController - message: Process Signaling message, streamId: 969786763341568300, peerId: 7ZaOmLkXeqqNiRxNqMEy [erizo-b3b69bb6-147a-3e51-7255-cc365f9baec5] 2017-06-02 15:56:41,973 - DEBUG [0x7f27a69ff780] WebRtcConnection - id: 969786763341568300, type: publisher, message: Adding remote Candidate, candidate: a=candidate:2016380239 1 tcp 1518280447 192.168.10.19 9 typ host tcptype active generation 0 ufrag cwIv network-id 1 network-cost 10, mid: audio, sdpMLine: 0 [erizo-b3b69bb6-147a-3e51-7255-cc365f9baec5] 2017-06-02 15:56:41,974 - DEBUG [0x7f27a69ff780] LibNiceConnection - id: 969786763341568300, type: publisher, message: setting remote candidates, candidateSize: 0, mediaType: 0 [erizo-b3b69bb6-147a-3e51-7255-cc365f9baec5] 2017-06-02 15:56:42.028 - INFO: ErizoJSController - message: Process Signaling message, streamId: 969786763341568300, peerId: 7ZaOmLkXeqqNiRxNqMEy [erizo-b3b69bb6-147a-3e51-7255-cc365f9baec5] 2017-06-02 15:56:42,032 - DEBUG [0x7f27a69ff780] WebRtcConnection - id: 969786763341568300, type: publisher, message: Adding remote Candidate, candidate: end, mid: end, sdpMLine: -1 2017-06-02 15:56:42,032 - DEBUG [0x7f27a69ff780] WebRtcConnection - id: 969786763341568300, type: publisher, message: All candidates received 2017-06-02 15:56:42,032 - DEBUG [0x7f27a69ff780] LibNiceConnection - id: 969786763341568300, type: publisher, message: setting hasReceivedLastCandidate, hasReceived: 1 2017-06-02 15:56:42,032 - DEBUG [0x7f27a69ff780] LibNiceConnection - id: 969786763341568300, type: publisher, message: setting remote candidates, candidateSize: 0, mediaType: 0 [erizo-b3b69bb6-147a-3e51-7255-cc365f9baec5] 2017-06-02 15:56:50,950 - DEBUG [0x7f277dfeb700] LibNiceConnection - id: 969786763341568300, type: publisher, message: new ice component state, newState: 4, transportName: video, componentId 1, iceComponents: 1 2017-06-02 15:56:50,950 - WARN [0x7f277dfeb700] LibNiceConnection - id: 969786763341568300, type: publisher, message: component failed, iceconfig.transport_name: video, componentId: 1 2017-06-02 15:56:50,950 - INFO [0x7f277dfeb700] LibNiceConnection - id: 969786763341568300, type: publisher, message: iceState transition, iceconfig.transport_name: video, iceState: cand_received, newIceState: failed, this: 0x3bc0b60 2017-06-02 15:56:50,950 - WARN [0x7f277dfeb700] LibNiceConnection - id: 969786763341568300, type: publisher, message: Ice Failed 2017-06-02 15:56:50,950 - DEBUG [0x7f277dfeb700] DtlsTransport - id: 969786763341568300, type: publisher, message:NiceState, transportName: video, state: 4, isBundle: 1 2017-06-02 15:56:50,950 - DEBUG [0x7f277dfeb700] DtlsTransport - id: 969786763341568300, type: publisher, message: Nice Failed 2017-06-02 15:56:50,950 - DEBUG [0x7f277dfeb700] WebRtcConnection - id: 969786763341568300, type: publisher, transportName: video, new_state: 5 2017-06-02 15:56:50,950 - ERROR [0x7f277dfeb700] WebRtcConnection - id: 969786763341568300, type: publisher, message: Transport Failed, transportType: video 2017-06-02 15:56:50,950 - INFO [0x7f277dfeb700] WebRtcConnection - id: 969786763341568300, type: publisher, newGlobalState: 500 2017-06-02 15:56:50.950 - INFO: ErizoJSController - message: WebRtcConnection status update, id: 969786763341568300, status: 500, type: publisher 2017-06-02 15:56:50.951 - WARN: ErizoJSController - message: failed the ICE process, code: 502, id: 969786763341568300 2017-06-02 15:56:50.952 - WARN: ErizoController - message: addPublisher ICE Failed, state: PUBLISHER_FAILED, streamId: 969786763341568300, clientId: 7ZaOmLkXeqqNiRxNqMEy 2017-06-02 15:56:50.964 - INFO: RoomController - message: removePublisher, publisherId: 969786763341568300, erizoId: ErizoJS_b3b69bb6-147a-3e51-7255-cc365f9baec5 [erizo-b3b69bb6-147a-3e51-7255-cc365f9baec5] 2017-06-02 15:56:50.965 - INFO: ErizoJSController - message: Removing publisher, id: 969786763341568300 2017-06-02 15:56:50.966 - INFO: ErizoJSController - message: WebRtcConnection status update, id: 969786763341568300, status: 105, type: publisher 2017-06-02 15:56:50,966 - DEBUG [0x7f2798f20700] WebRtcConnection - id: 969786763341568300, type: publisher, message:Close called 2017-06-02 15:56:50,966 - DEBUG [0x7f277e7ec700] WebRtcConnection - id: 969786763341568300, type: publisher, message:Destructor called 2017-06-02 15:56:50,966 - DEBUG [0x7f277e7ec700] WebRtcConnection - id: 969786763341568300, type: publisher, message: Destructor ended 2017-06-02 15:56:50,967 - DEBUG [0x7f277e7ec700] DtlsTransport - id: 969786763341568300, type: publisher, message: closing 2017-06-02 15:56:50,967 - DEBUG [0x7f277e7ec700] LibNiceConnection - id: 969786763341568300, type: publisher, message:closing 2017-06-02 15:56:50,967 - WARN [0x7f277e7ec700] LibNiceConnection - id: 969786763341568300, type: publisher, message: unexpected ice state transition, iceState: failed, newIceState: finished 2017-06-02 15:56:50,967 - DEBUG [0x7f277e7ec700] LibNiceConnection - id: 969786763341568300, type: publisher, message:main loop quit 2017-06-02 15:56:50,967 - DEBUG [0x7f277e7ec700] LibNiceConnection - id: 969786763341568300, type: publisher, message: m_thread join, this: 0x3bc0b60 2017-06-02 15:56:50,967 - DEBUG [0x7f277dfeb700] LibNiceConnection - id: 969786763341568300, type: publisher, message: finished g_main_loop, this: 0x3bc0b60 2017-06-02 15:56:50,967 - DEBUG [0x7f277e7ec700] LibNiceConnection - id: 969786763341568300, type: publisher, message:Unrefing loop 2017-06-02 15:56:50,967 - DEBUG [0x7f277e7ec700] LibNiceConnection - id: 969786763341568300, type: publisher, message: unrefing agent 2017-06-02 15:56:50,968 - DEBUG [0x7f277e7ec700] LibNiceConnection - id: 969786763341568300, type: publisher, message: Unrefing context 2017-06-02 15:56:50,968 - DEBUG [0x7f277e7ec700] LibNiceConnection - id: 969786763341568300, type: publisher, message: closed, this: 0x3bc0b60 2017-06-02 15:56:50,968 - DEBUG [0x7f277e7ec700] DtlsTransport - id: 969786763341568300, type: publisher, message: closed 2017-06-02 15:56:50,968 - DEBUG [0x7f277e7ec700] LibNiceConnection - id: 969786763341568300, type: publisher, message:closing 2017-06-02 15:56:50,968 - WARN [0x7f277e7ec700] LibNiceConnection - id: 969786763341568300, type: publisher, message: unexpected ice state transition, iceState: failed, newIceState: finished 2017-06-02 15:56:50,968 - DEBUG [0x7f277e7ec700] LibNiceConnection - id: 969786763341568300, type: publisher, message: m_thread join, this: 0x3bc0b60 2017-06-02 15:56:50,968 - DEBUG [0x7f277e7ec700] LibNiceConnection - id: 969786763341568300, type: publisher, message: interrupt thread to close, this: 0x3bc0b60 2017-06-02 15:56:50,968 - DEBUG [0x7f277e7ec700] LibNiceConnection - id: 969786763341568300, type: publisher, message: closed, this: 0x3bc0b60 [erizo-b3b69bb6-147a-3e51-7255-cc365f9baec5] 2017-06-02 15:56:50.969 - INFO: ErizoJSController - message: muxer closed succesfully, id: 969786763341568300, OK [erizo-b3b69bb6-147a-3e51-7255-cc365f9baec5] 2017-06-02 15:56:50.970 - INFO: ErizoJSController - message: Removed all publishers. Killing process. 2017-06-02 15:56:50.982 - INFO: ErizoAgent - message: closed, erizoId: b3b69bb6-147a-3e51-7255-cc365f9baec5 2017-06-02 15:56:50.991 - INFO: ErizoAgent - message: launched new ErizoJS, erizoId: 3736814e-0dbc-8bdc-dad2-43431b8f5fd4 [erizo-3736814e-0dbc-8bdc-dad2-43431b8f5fd4] (node:23108) DeprecationWarning: 'GLOBAL' is deprecated, use 'global' [erizo-3736814e-0dbc-8bdc-dad2-43431b8f5fd4] 2017-06-02 15:56:51.262 - INFO: ErizoJS - message: Started, erizoId: 3736814e-0dbc-8bdc-dad2-43431b8f5fd4 2017-06-02 15:57:06.781 - INFO: EcCloudHandler - message: deleting erizoJS, erizoId: b3b69bb6-147a-3e51-7255-cc365f9baec5

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/lynckia/licode/issues/908#issuecomment-305801361, or mute the thread https://github.com/notifications/unsubscribe-auth/AACgamiQ9VSMphvfX9ktYOaswOoclBPaks5sABlTgaJpZM4NuFuK .

-- Alvaro

gregorfelkar commented 7 years ago

0: WARNING: cannot find certificate file: turn_server_cert.pem (1) 0: WARNING: cannot start TLS and DTLS listeners because certificate file is not set properly 0: WARNING: cannot find private key file: turn_server_pkey.pem (1) 0: WARNING: cannot start TLS and DTLS listeners because private key file is not set properly Did you pay attention to this log output in your Coturn logs?

I dont have certificated for TURN server but im also not using TLS port in licode config. Are this certificates so important for turn server to work also if i use only nonTLS port? (and why does it work in TrickeICE test if this would be such an issue?)

In CoTURN config:

listening-port=3478
tls-listening-port=5349

LiCode config:

config.erizoController.iceServers = [{'url': 'stun:<domain>:3478'},{'url': 'turn:<domain>:3478', 'username':'test', 'credential': 'test'}];

I have not specified in licode to use 5349 port.

zevarito commented 7 years ago

From Coturn configuration file:

"Note: actually, TLS & DTLS sessions can connect to the 'plain' TCP & UDP port(s), too - if allowed by configuration."

It doesn't matter if the port your client is trying to connect is plain or secure, it does matter what kind of connection is trying to initialize, you need to check if that attempt is using TLS. Also you didn't not paste Coturn logs at the moment the server is requested to allocate ports, in verbose mode I am pretty sure you can identify what kind of connection is trying to setup. Also you can check from browser side in the case of Chrome using chrome://webrtc-internals. The logs you've pasted from Licode are useful and mention error codes and status changes on the ICE connection that you can track and search to identify what is your problem.

It is pretty simple to setup an SSL certificate and it will help you to discard that.

Sorry I cannot be more helpful, good luck.

2017-06-02 11:32 GMT-03:00 Gregor Felkar notifications@github.com:

0: WARNING: cannot find certificate file: turn_server_cert.pem (1) 0: WARNING: cannot start TLS and DTLS listeners because certificate file is not set properly 0: WARNING: cannot find private key file: turn_server_pkey.pem (1) 0: WARNING: cannot start TLS and DTLS listeners because private key file is not set properly Did you pay attention to this log output in your Coturn logs?

I dont have certificated for TURN server but im also not using TLS port in licode config. Are this certificates so important for turn server to work also if i use only nonTLS port? (and why does it work in TrickeICE test if this would be such an issue?)

In CoTURN config:

listening-port=3478 tls-listening-port=5349

LiCode config:

config.erizoController.iceServers = [{'url': 'stun::3478'},{'url': 'turn::3478', 'username':'test', 'credential': 'test'}];

I have not specified in licode to use 5349 port.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/lynckia/licode/issues/908#issuecomment-305805591, or mute the thread https://github.com/notifications/unsubscribe-auth/AACgaor2xCW8sT4npWUB4e12SL-48Scjks5sABz2gaJpZM4NuFuK .

-- Alvaro