How to start WebRTC?


Hello, @amy.blais!

I was trying to connect via latest Chrome and Firefox browsers from Windows 7,8 and Android smartphone.

The connection brakes after few seconds. No video/voice data is being transferred. I can see a picture only from my webcam, but not from user whom I making a call.

[WARN] [585051823977465] ICE failed for component 1 in stream 1, but let’s give it some time… (trickle received, answer received, alert not set)
[WARN] [544213068337465] ICE failed for component 1 in stream 1, but let’s give it some time… (trickle pending, answer received, alert not set)
[ERR] [ice.c:janus_ice_check_failed:1606] [585051823977465] ICE failed for component 1 in stream 1…

The log is same as before.

I changed several STUN servers, placed nat_1_1_mapping with IP of an EC2 instance - but still have no success.

What am I doing wrong?


Hi @noizzzzy.boy There was a quite a long thread here a while ago to troubleshoot WebRTC issues, I’ll summarize suggestions / tips that people gave throughout the thread:

  • Confirm you have allowed Mattermost to access your camera and microphone. See instructions on how to give permissions on Chrome and Firefox.
  • Do you see any JavaScript errors in the Chrome developer console?
  • This reply here has some tips.
  • You need to set a STUN server in the janus config.
  • You can do additional testing on our nightly build server
  • If you’re using the Docker preview image to test the service, make sure you have the following settings configured:

Enable Mattermost WebRTC: true
Gateway Websocket URL: wss://dockerhost:8189
Gateway Admin URL: https://dockerhost:7089/admin 6
Gateway Admin Secret: janusoverlord


@amy.blais I appreciate you for this information.

  • Of course I allowed MM to access my camera and microphone.

  • No, there no any errors in Chrom Dev Console

  • I have all ports opened. WebRTC & MM are in running dockers.
    SSL is provided by Amazone
    But I have no coturn.

  • Inside docker janus.cfg includes
    stun_server =
    stun_port = 19302

  • I have configured MM to WebRTC, but I do not use “dockerhost”, because of using true domain name & SSL on it. All these URLs are include real domain name instead “dockerhost”, I think this is right.


Hi @noizzzzy.boy! I created a Jira ticket as I’m able to repro the issue:

However, I will give a heads-up that WebRTC is known to be unreliable, so it is possible that this is a known issue and something that won’t be fixed in the upcoming release version. All in all, you can follow the progress of the issue in the Jira ticket I linked above.


Thank you, @amy.blais!

Also I was trying without Amazon SSL Certificates:

  1. Amazon EC2 instance with webrtc + mattermost dockers
  2. Generated SSL with using
  3. Certificates were copied inside docker containers of MM & WebRTC, MM was reconfigured to use SSL on port 443. Dockers were restrarted
  4. SSL connection is avaliable to MM and https://mywebsite:7089/admin (webrtc).
  5. All MM settings were configured according to instruction.
  6. Inside WebRTC container was enabled option “nat_1_1_mapping”
  7. While making a video-call the same issue is appear.

This are WebRTC Logs:

I want to try run Janus WebRTC without docker.
Do you know any instructions to this way?


Hi @noizzzzy.boy Update on this - we just discussed the Jira ticket as a team and it seems that we will need to update the Janus on our side - the ticket is now queued to be fixed in 5.0 (releasing June 15th), so you should see an improvement on WebRTC once we release.


@amy.blais thanks for keeping an eye on this problem .

As for me, looks like WebRTC could not handle a connection because of some external reasons. This probably does not depend on the Mattermost platform. May be it is a NAT or STUN issue. At the same time even a browsers could get some restrictions to provide video/voice stream for these 6 months after last WebRTC release.

So I am very waiting for this issue to be solved.

Thanx again.


Hi, @amy.blais!

I made an update of mattermost docker to version 5.0, but still have an issue with video calls. It is very sad fact for me…
Symptoms are similar to the previous

here is log of webrtc

Which way I should dig to solve it?


Hi @noizzzzy.boy - v5.0 hasn’t been officially released yet, I’ll let you know when v5.0 is available (will be by EOD).


@amy.blais thanks a lot for your attention!


Hi @noizzzzy.boy - v5.0 is now available to download if you’d like to test WebRTC on latest version: (it includes a fix for this issue).


hi, @amy.blais
I still do not have progress in the video call, even with the new version of Mattermost.

Mattermost version:

{“level”:“info”,“ts”:1529309168.0687737,“caller”:“commands/server.go:81”,“msg”:“Current version is 5.0.0 (5.0.0-rc1/Tue Jun 5 21:38:10 UTC 2018/ffb1d5d8e3a40c007b8faa152ddc3ae281f2a63a/none)”}

WebRTC version:

root@7a0aec31498f:/janus-gateway# /opt/janus/bin/janus -V
Janus commit: 7a42432c2683879e124f3f99251fb21d8cc37a4e
Compiled on: Thu Nov 30 15:37:15 UTC 2017
janus 0.2.6

some other issue in mattermost log:

------------------------------------ ERROR ------------------------------------------------
The platform binary has been deprecated, please switch to using the new mattermost binary.
The platform binary will be removed in a future version.


Hi @noizzzzy.boy I’m noticing that your current version is 5.0.0-rc1, which is not the final official version (and doesn’t include WebRTC fixes). I’m wondering why it says that? Can you help double-check that you followed all the upgrade steps:

Can you also help review these important upgrade notes - e.g. there is one note that mentions that platform binary is renamed to mattermost:

I just tested WebRTC on 5.0 final and it’s working for me, so we can start by double-checking if the upgrade process was successful, and then consider next steps for troubleshooting.


Hi, @amy.blais

I changed docker-compose file to get version 5.0.0 of MM.


I do not need an upgrade - MM + WebRTC are running from scratch every time to check an ability of Video Call.

Today I was trying to deploy in different zones and on two hosters. The result is the same.

I’m stumped

The error is same:

mwebrtc | [Tue Jun 19 11:11:01 2018] [WARN] [8693122465677053] ICE failed for component 1 in stream 1, but let’s give it some time… (trickle received, answer received, alert not set)
mwebrtc | [Tue Jun 19 11:11:01 2018] [8693122465677053] Creating ICE state check timer with ID 5
mwebrtc | [Tue Jun 19 11:11:01 2018] [61645027977677] Component state changed for component 1 in stream 1: 5 (failed)
mwebrtc | [Tue Jun 19 11:11:01 2018] [WARN] [61645027977677] ICE failed for component 1 in stream 1, but let’s give it some time… (trickle pending, answer received, alert not set)
mwebrtc | [Tue Jun 19 11:11:01 2018] [61645027977677] Creating ICE state check timer with ID 5
mmattermost | {“level”:“debug”,“ts”:1529406661.7588344,“caller”:“migrations/scheduler.go:50”,“msg”:“Scheduling Job”,“scheduler”:“MigrationsScheduler”}
mmattermost | {“level”:“debug”,“ts”:1529406661.7594457,“caller”:“migrations/scheduler.go:89”,“msg”:“All migrations are complete.”,“scheduler”:“MigrationsScheduler”}
mmattermost | {“level”:“debug”,“ts”:1529406661.7600842,“caller”:“jobs/schedulers.go:153”,“msg”:"Next run time for scheduler MigrationsScheduler: "}
mwebrtc | [Tue Jun 19 11:11:06 2018] [ERR] [ice.c:janus_ice_check_failed:1606] [8693122465677053] ICE failed for component 1 in stream 1…

Here is a full log

My configs are described in How to start WebRTC?


Thanks @noizzzzy.boy, I’ve asked our team + community members to take a look at this.


@noizzzzy.boy A response from an engineer -

Can you try adding this value to the config.json "StunURI": "", without updating the Janus server or any code changes.

The ICE problem can be related to that. If the stun server from google does not work, then maybe you can try another one.

Let me know if this helps?


It was there from the very beginning.
I changed a lot of stun servers with no luck


I have the exact same issue and no matter what i try it wont work.

Any updates on this?

Best regards.


Hi @ggisx,

Thanks for reaching out. To give you the best help we can, could you review this web page and send us the relevant logs, config files, etc. which will help us diagnose the issue?


Hi Amy,

I did not set the nat mapping in the janus cfg.

It works perfectly now thanks :slight_smile:

Best regards,