Janus Demos are not working: WebRtc Connection is stuck in Connection State

2,395 views
Skip to first unread message

Muhammad Usman Bashir

unread,
Feb 17, 2022, 11:29:31 AM2/17/22
to meetecho-janus
I have been struggling the whole week to deploy Janus-Gateway on AWS EC2. The Janus-Gateway is properly working with Ngnix FrontEnd, but unfortunately, I am unable to run any of the demos due to the WebRtc Connection state issue which is consistently stuck in Connecting state.

I am attaching the sample screenshots from the Janus Video Room which is stuck in a publishing state and from WebRtc-internals

On AWS EC2 instance, Every port is opened and I have everything properly configured for HTTP as well as HTTPS proxies using Ngnix.

Tools:

- AWS EC2 Ubuntu (18.04) LTS
- Janus-Gateway (v0.10.8) as well as (v0.11.8)
- Ngnix Web Proxy

I am not facing any kind of error except these some unusual errors for different demos:


demo1.PNG
demo2.PNG
demo4.PNG
demo3.PNG

Muhammad Usman Bashir

unread,
Feb 17, 2022, 1:24:55 PM2/17/22
to meetecho-janus
Here are the logs from EC2 Instance:

*** System restart required ***
Last login: Thu Feb 17 14:18:11 2022 from 110.93.193.154
ubuntu@ip-172-31-30-135:~$ /opt/janus/bin/janus
Janus commit: b68b209f91d0250f0739feee28555fe71255450b
Compiled on:  Wed Feb 16 11:22:16 UTC 2022

Failed to load /opt/janus/etc/janus/janus.jcfg, trying the INI instead...
Error reading/parsing the configuration file in /opt/janus/etc/janus, going on with the defaults and the command line arguments
[ERR] [config.c:janus_config_parse:206] Error parsing config file at line 237: syntax error
[ERR] [config.c:janus_config_parse:191]   -- Error reading configuration file 'janus.cfg'... error 2 (No such file or directory)
Logger plugins folder: /opt/janus/lib/janus/loggers
[WARN]  Couldn't access logger plugins folder...
---------------------------------------------------
  Starting Meetecho Janus (WebRTC Server) v0.10.4
---------------------------------------------------

Checking command line arguments...
Debug/log level is 4
Debug/log timestamps are disabled
Debug/log colors are enabled
Using 172.31.30.135 as local IP...
[WARN] Token based authentication disabled
Initializing recorder code
Initializing ICE stuff (Full mode, ICE-TCP candidates disabled, half-trickle, IPv6 support disabled)
TURN REST API backend: (disabled)
[WARN] Janus is deployed on a private address (172.31.30.135) but you didn't specify any STUN server! Expect trouble if this is supposed to work over the internet and not just in a LAN...
Crypto: OpenSSL >= 1.1.0
[WARN] No cert/key specified, autogenerating some...
Fingerprint of our certificate: 28:A9:0D:D4:C9:34:67:54:51:EC:3A:81:B1:8B:DA:76:54:26:24:D3:61:A7:41:AB:76:91:20:35:AC:E3:81:83
[WARN] Event handlers support disabled
Plugins folder: /opt/janus/lib/janus/plugins
Joining Janus requests handler thread
Sessions watchdog started
Loading plugin 'libjanus_videoroom.so'...
JANUS VideoRoom plugin initialized!
Loading plugin 'libjanus_nosip.so'...
JANUS NoSIP plugin initialized!
Loading plugin 'libjanus_echotest.so'...
JANUS EchoTest plugin initialized!
Loading plugin 'libjanus_recordplay.so'...
JANUS Record&Play plugin initialized!
Loading plugin 'libjanus_audiobridge.so'...
JANUS AudioBridge plugin initialized!
Loading plugin 'libjanus_textroom.so'...
JANUS TextRoom plugin initialized!
Loading plugin 'libjanus_videocall.so'...
JANUS VideoCall plugin initialized!
Loading plugin 'libjanus_streaming.so'...
[ERR] [plugins/janus_streaming.c:janus_streaming_create_fd:5511] [rtp-sample] Bind failed for audio (port 5002)... 98 (Address already in use)
[ERR] [plugins/janus_streaming.c:janus_streaming_create_rtp_source:5719] Can't bind to port 5002 for audio...
[ERR] [plugins/janus_streaming.c:janus_streaming_init:1933] Error creating 'rtp' mountpoint 'rtp-sample'...
JANUS Streaming plugin initialized!
Loading plugin 'libjanus_sip.so'...
JANUS SIP plugin initialized!
Loading plugin 'libjanus_voicemail.so'...
JANUS VoiceMail plugin initialized!
Transport plugins folder: /opt/janus/lib/janus/transports
Loading transport plugin 'libjanus_nanomsg.so'...
[WARN] Nanomsg server disabled (Admin API)
JANUS Nanomsg transport plugin initialized!
Loading transport plugin 'libjanus_mqtt.so'...
Nanomsg thread started
MQTT SSL support disabled
[WARN] MQTT support disabled for both Janus and Admin API, giving up
JANUS MQTT transport plugin destroyed!
[WARN] The 'janus.transport.mqtt' plugin could not be initialized
Loading transport plugin 'libjanus_pfunix.so'...
[WARN] Unix Sockets server disabled (Janus API)
[WARN] Unix Sockets server disabled (Admin API)
[WARN] No Unix Sockets server started, giving up...
[WARN] The 'janus.transport.pfunix' plugin could not be initialized
Loading transport plugin 'libjanus_websockets.so'...
[WARN] libwebsockets has been built without IPv6 support, will bind to IPv4 only
libwebsockets logging: 0
[FATAL] [transports/janus_websockets.c:janus_websockets_init:605] Error creating vhost for WebSockets server...
[FATAL] [transports/janus_websockets.c:janus_websockets_init:674] Error creating vhost for Secure WebSockets server...
[WARN] Admin WebSockets server disabled
[WARN] Secure Admin WebSockets server disabled
[WARN] No WebSockets server started, giving up...
[WARN] The 'janus.transport.websockets' plugin could not be initialized
Loading transport plugin 'libjanus_http.so'...
HTTP transport timer started
[FATAL] [transports/janus_http.c:janus_http_init:743] Couldn't start webserver on port 8088...
[FATAL] [transports/janus_http.c:janus_http_init:791] Couldn't start secure webserver on port 8089...
[WARN] Admin/monitor HTTP webserver disabled
[WARN] Admin/monitor HTTPS webserver disabled
[WARN] No HTTP/HTTPS server started, giving up...
[WARN] The 'janus.transport.http' plugin could not be initialized
[WARN] libnice version outdated: 0.1.14 installed, at least 0.1.16 recommended. Notice the installed version was checked at build time: if you updated libnice in the meanwhile, re-configure and recompile to get rid of this warning

Lorenzo Miniero

unread,
Feb 18, 2022, 5:23:03 AM2/18/22
to meetecho-janus
As explained in the guidelines, please DO NOT post huge chunks of texts/logs inline here. Use services like gist/pastebin/whatever.
That said, it's likely a nat/firewall issue: you need to configure nat-1-1, specify a port range for RTP, and match that range in the AWS security group.

L.

Muhammad Usman Bashir

unread,
Feb 18, 2022, 7:00:32 AM2/18/22
to meetecho-janus
Nat has been already configured to nat 1-1, and AWS security groups have already enabled all traffic.
Actually, WS Server is continuously rejecting the HTTP requests. I have made all possible changes that are necessary for janus.cfg, janus.transport.http.cfg.

Here is the report of tcpdum which I have attached as the screenshot;
image.png

Bagus Facsi Aginsa

unread,
Feb 23, 2022, 10:40:15 PM2/23/22
to meetecho-janus
First, Try to do curl from localhost: http://localhost:8088/janus/info
What is the return?  

And actually I don't understand what you mean by this: "WS Server is continuously rejecting the HTTP requests". Of course WS server is rejecting HTTP request, WS server can only be access with WS protocol, not HTTP. Right?

Muhammad Usman Bashir

unread,
Feb 28, 2022, 5:54:07 AM2/28/22
to meetecho-janus
I am trying to test the Janus WebSocket server using the online available WebSocket client. But I think there is some type of headers that are required with Janus WebSocket APIs.  

I have tried multiple options to deploy Janus Gateway on AWS EC2. 

  1. Using Default Configurations (https://www.codetd.com/en/article/13023347)
  2. Using Docker Images (https://github.com/canyanio/janus-gateway-docker, https://github.com/software-mansion/docker-janus-gateway)
In both of the cases, Janus-Gateway is being deployed successfully but the WebSockets server of Janus is not working at all for both options. When I tried to add Janus gateway websocket URI in echo test, it returns an error that;  

Error connecting to the Janus WebSockets server: Is the server down?

THE REST API of Janus-Gateway is working properly for either of the deployment options, but the WebSocket Server is not working for either of direct deployment on EC2 or for Docker Image.

janus3.PNG
janus1.PNG
janus2.PNG

Lorenzo Miniero

unread,
Feb 28, 2022, 6:22:11 AM2/28/22
to meetecho-janus
8089 is *not* the port the WS server uses by default. You may want to check your configuration files again.

L.

Muhammad Usman Bashir

unread,
Feb 28, 2022, 6:47:30 AM2/28/22
to meetecho-janus
Here are the configuration details for AWS EC2 Default Instnace in which WSS port is 8989:

File janus.transport.websockets.jcfg:

# WebSockets stuff: whether they should be enabled, which ports they
# should use, and so on.
general: {
        #events = true                                  # Whether to notify event handlers about transport events (default=true)
        json = "indented"                               # Whether the JSON messages should be indented (default),
                                                                        # plain (no indentation) or compact (no indentation and no spaces)
        #pingpong_trigger = 30                  # After how many seconds of idle, a PING should be sent
        #pingpong_timeout = 10                  # After how many seconds of not getting a PONG, a timeout should be detected

        ws = true                                               # Whether to enable the WebSockets API
        ws_port = 8188                                  # WebSockets server port
        #ws_interface = "eth0"                  # Whether we should bind this server to a specific interface only
        #ws_ip = "192.168.0.1"                  # Whether we should bind this server to a specific IP address only
        wss = true                                              # Whether to enable secure WebSockets
        wss_port = 8989                         # WebSockets server secure port, if enabled
        #wss_interface = "eth0"                 # Whether we should bind this server to a specific interface only
        #wss_ip = "192.168.0.1"                 # Whether we should bind this server to a specific IP address only
        #ws_logging = "err,warn"                # libwebsockets debugging level as a comma separated list of things
                                                                        # to debug, supported values: err, warn, notice, info, debug, parser,
                                                                        # header, ext, client, latency, user, count (plus 'none' and 'all')
        #ws_acl = "127.,192.168.0."             # Only allow requests coming from this comma separated list of addresses
}

# If you want to expose the Admin API via WebSockets as well, you need to
# specify a different server instance, as you cannot mix Janus API and
# Admin API messaging. Notice that by default the Admin API support via
# WebSockets is disabled.
admin: {
        admin_ws = false                                        # Whether to enable the Admin API WebSockets API
        admin_ws_port = 7188                            # Admin API WebSockets server port, if enabled
        #admin_ws_interface = "eth0"            # Whether we should bind this server to a specific interface only
        #admin_ws_ip = "192.168.0.1"            # Whether we should bind this server to a specific IP address only
        admin_wss = false                                       # Whether to enable the Admin API secure WebSockets
        #admin_wss_port = 7989                          # Admin API WebSockets server secure port, if enabled
        #admin_wss_interface = "eth0"           # Whether we should bind this server to a specific interface only
        #admin_wss_ip = "192.168.0.1"           # Whether we should bind this server to a specific IP address only
        #admin_ws_acl = "127.,192.168.0."       # Only allow requests coming from this comma separated list of addresses
}

# Certificate and key to use for any secure WebSocket server, if enabled (and passphrase if needed).
# You can also disable insecure protocols and ciphers by configuring the
# 'ciphers' property accordingly (no limitation by default).
# Examples of recommended cipher strings at https://cheatsheetseries.owasp.org/cheatsheets/TLS_Cipher_String_Cheat_Sheet.html
certificates: {
        cert_pem = "/root/cert/cert.pem"
 
Docker Instance Details:

CONTAINER ID   IMAGE               COMMAND     CREATED      STATUS      PORTS                                                                                                                                                                                                                                                                                                                                                             NAMES
15371423ec1f   qxip/docker-janus   "/run.sh"   9 days ago   Up 9 days   0.0.0.0:7088-7089->7088-7089/tcp, :::7088-7089->7088-7089/tcp, 0.0.0.0:7889->7889/tcp, :::7889->7889/tcp, 0.0.0.0:8000->8000/tcp, :::8000->8000/tcp, 0.0.0.0:8080->8080/tcp, :::8080->8080/tcp, 0.0.0.0:8088-8089->8088-8089/tcp, :::8088-8089->8088-8089/tcp, 0.0.0.0:10000-10200->10000-10200/tcp, :::10000-10200->10000-10200/tcp, 8889/tcp, 10000-10200/udp   janus

Sir, Are any other details required to further investigation?
janus4.PNG
jnaus5.PNG

Muhammad Usman Bashir

unread,
Feb 28, 2022, 8:58:49 AM2/28/22
to meetecho-janus
Some other logs to share with you. When I put this () URI inside ECOTEST Demo, and when I run the demo of ECOTEST then eventually got these logs from Janus-Gateway Server. I hope these also might help you to get some basic idea of deployment, PFA, janus.txt

Secure WebSockets server started (port 8989)...

[WARN] Admin WebSockets server disabled
[WARN] Secure Admin WebSockets server disabled
JANUS WebSockets transport plugin initialized!
        Version: 1 (0.0.1)
           [janus.transport.websockets] JANUS WebSockets transport plugin
           This transport plugin adds WebSockets support to the Janus API via libwebsockets.
           Plugin API version: 7
           Janus API: enabled
           Admin API: disabled

Loading transport plugin 'libjanus_http.so'...
WebSockets thread started
JANUS REST (HTTP/HTTPS) transport plugin created!
Configuration file: /opt/janus/etc/janus/janus.transport.http.jcfg
HTTP transport timer started
[janus.transport.http.jcfg]
    general: {
        json: indented
        base_path: /janus
        http: true
        port: 8088
        https: true
        secure_port: 8089
    }
    admin: {
        admin_base_path: /admin
        admin_http: false
        admin_port: 7088
        admin_https: false
    }
    cors: {
    }
    certificates: {
        cert_pem: /root/cert/cert.pem
        cert_key: /root/cert/key.pem
    }

Binding to all interfaces for the Janus API HTTP webserver
HTTP webserver started (port 8088, /janus path listener)...
Using certificates:
        /root/cert/cert.pem
        /root/cert/key.pem
Binding to all interfaces for the Janus API HTTPS webserver
HTTPS webserver started (port 8089, /janus path listener)...

[WARN] Admin/monitor HTTP webserver disabled
[WARN] Admin/monitor HTTPS webserver disabled
JANUS REST (HTTP/HTTPS) transport plugin initialized!
        Version: 2 (0.0.2)
           [janus.transport.http] JANUS REST (HTTP/HTTPS) transport plugin
           This transport plugin adds REST (HTTP/HTTPS) support to the Janus API via libmicrohttpd.
           Plugin API version: 7
           Janus API: enabled
           Admin API: disabled

[WARN] libnice version outdated: 0.1.14 installed, at least 0.1.16 recommended. Notice the installed version was checked at build time: if you updated libnice in the meanwhile, re-configure and recompile to get rid of this warning
Rejecting incoming HTTP request on WebSockets endpoint
Rejecting incoming HTTP request on WebSockets endpoint
Rejecting incoming HTTP request on WebSockets endpoint
Rejecting incoming HTTP request on WebSockets endpoint
Rejecting incoming HTTP request on WebSockets endpoint
Rejecting incoming HTTP request on WebSockets endpoint
Got a Janus API request from janus.transport.http (0x7f79a400b130)
[file-live-sample] Rewind! (/opt/janus/share/janus/streams/radio.alaw)
[ERR] [transports/janus_http.c:janus_http_handler:1260] Invalid url /ws/v1/cluster/apps/new-application
[ERR] [transports/janus_http.c:janus_http_handler:1260] Invalid url /ws/v1/cluster/apps/new-application
[ERR] [transports/janus_http.c:janus_http_handler:1260] Invalid url /ws/v1/cluster/apps/new-application
[ERR] [transports/janus_http.c:janus_http_handler:1260] Invalid url /ws/v1/cluster/apps/new-application
[file-live-sample] Rewind! (/opt/janus/share/janus/streams/radio.alaw)
[ERR] [transports/janus_http.c:janus_http_handler:1260] Invalid url /ws/v1/cluster/apps/new-application
[ERR] [transports/janus_http.c:janus_http_handler:1260] Invalid url /ws/v1/cluster/apps/new-application
[ERR] [transports/janus_http.c:janus_http_handler:1260] Invalid url /ws/v1/cluster/apps/new-application
[ERR] [transports/janus_http.c:janus_http_handler:1260] Invalid url /ws/v1/cluster/apps/new-application


janus.txt

Lorenzo Miniero

unread,
Feb 28, 2022, 10:30:54 AM2/28/22
to meetecho-janus
Il giorno lunedì 28 febbraio 2022 alle 12:47:30 UTC+1 mail2c...@gmail.com ha scritto:
Here are the configuration details for AWS EC2 Default Instnace in which WSS port is 8989:

But 8989 isn't the same thing as 8089, is it? ;-)
So why are you insisting on connecting to the latter?

L.

Muhammad Usman Bashir

unread,
Feb 28, 2022, 11:58:34 AM2/28/22
to meetecho-janus
With 8989 it is not working as well, When I am adding this server URI into janus.js file.
* On Chrome Browser, When I am running Echotest, I am getting this error:


Error connecting to the Janus WebSockets server: Is the server down?

* On AWS instance I am getting these logs;

Secure WebSockets server started (port 8989)...
[WARN] Admin WebSockets server disabled
[WARN] Secure Admin WebSockets server disabled
JANUS WebSockets transport plugin initialized!
        Version: 1 (0.0.1)
           [janus.transport.websockets] JANUS WebSockets transport plugin
           This transport plugin adds WebSockets support to the Janus API via libwebsockets.
           Plugin API version: 7
           Janus API: enabled
           Admin API: disabled
Loading transport plugin 'libjanus_http.so'...
[WARN] Admin/monitor HTTP webserver disabled
[WARN] Admin/monitor HTTPS webserver disabled
JANUS REST (HTTP/HTTPS) transport plugin initialized!
        Version: 2 (0.0.2)
           [janus.transport.http] JANUS REST (HTTP/HTTPS) transport plugin
           This transport plugin adds REST (HTTP/HTTPS) support to the Janus API via libmicrohttpd.
           Plugin API version: 7
           Janus API: enabled
           Admin API: disabled
[WARN] libnice version outdated: 0.1.14 installed, at least 0.1.16 recommended. Notice the installed version was checked at build time: if you updated libnice in the meanwhile, re-configure and recompile to get rid of this warning
Rejecting incoming HTTP request on WebSockets endpoint
Rejecting incoming HTTP request on WebSockets endpoint
Rejecting incoming HTTP request on WebSockets endpoint
Rejecting incoming HTTP request on WebSockets endpoint
Rejecting incoming HTTP request on WebSockets endpoint
Rejecting incoming HTTP request on WebSockets endpoint
Got a Janus API request from janus.transport.http (0x7f79a400b130)
[file-live-sample] Rewind! (/opt/janus/share/janus/streams/radio.alaw)
[ERR] [transports/janus_http.c:janus_http_handler:1260] Invalid url /ws/v1/cluster/apps/new-application
[ERR] [transports/janus_http.c:janus_http_handler:1260] Invalid url /ws/v1/cluster/apps/new-application
[ERR] [transports/janus_http.c:janus_http_handler:1260] Invalid url /ws/v1/cluster/apps/new-application
[ERR] [transports/janus_http.c:janus_http_handler:1260] Invalid url /ws/v1/cluster/apps/new-application
[file-live-sample] Rewind! (/opt/janus/share/janus/streams/radio.alaw)
[ERR] [transports/janus_http.c:janus_http_handler:1260] Invalid url /ws/v1/cluster/apps/new-application
[ERR] [transports/janus_http.c:janus_http_handler:1260] Invalid url /ws/v1/cluster/apps/new-application
[ERR] [transports/janus_http.c:janus_http_handler:1260] Invalid url /ws/v1/cluster/apps/new-application
[ERR] [transports/janus_http.c:janus_http_handler:1260] Invalid url /ws/v1/cluster/apps/new-application

Sarsaparilla Sunset

unread,
Feb 28, 2022, 5:17:13 PM2/28/22
to meetecho-janus
Can you provide the command you use to run Janus?

I use telnet to check.  None of your ports (8089, 8989, 8188, 8088) are accessible.  But telnet fails within 3 seconds, which means it's not a firewall problem.  Did you expose the ports properly when running the docker image?

You need to use telnet to make sure the ports are accessible before trying to connect using browser.  To isolate and fix one problem at a time

Muhammad Usman Bashir

unread,
Mar 1, 2022, 2:59:00 AM3/1/22
to meetecho-janus
First of thank you so much for being there for help. It's really motivating. 

I have tried to access ports on local as well as AWS instance terminals using Telnet. I am attaching my relevant tests and all logs from Janus Gateway Side;

My AWS Server IP on which Janus Gateway is working:

  • 18.221.158.132

Telnet Results From Local Windows Machine:

terminator@DESKTOP-8I47BTQ:~$  nc -vz 18.221.158.132 8989                                               
Connection to 18.221.158.132 8989 port [tcp/*] succeeded!                                               
terminator@DESKTOP-8I47BTQ:~$  nc -vz 18.221.158.132 8089                                               
Connection to 18.221.158.132 8089 port [tcp/*] succeeded!                                               
terminator@DESKTOP-8I47BTQ:~$  nc -vz 18.221.158.132 8188                                               
Connection to 18.221.158.132 8188 port [tcp/*] succeeded!                                               
terminator@DESKTOP-8I47BTQ:~$  nc -vz 18.221.158.132 8088                                               
Connection to 18.221.158.132 8088 port [tcp/omniorb] succeeded!                                         
terminator@DESKTOP-8I47BTQ:~$  nc -vz janus.confu.info 8989                                             
Connection to janus.confu.info 8989 port [tcp/*] succeeded!                                                                                                                                               


Telnet Result From AWS EC2 Machine:

root@ip-172-31-16-136:/opt/janus/etc/janus#  nc -vz 18.221.158.132 8989
Connection to 18.221.158.132 8989 port [tcp/*] succeeded!
root@ip-172-31-16-136:/opt/janus/etc/janus#  nc -vz 18.221.158.132 8089
Connection to 18.221.158.132 8089 port [tcp/*] succeeded!
root@ip-172-31-16-136:/opt/janus/etc/janus#  nc -vz 18.221.158.132 8188
Connection to 18.221.158.132 8188 port [tcp/*] succeeded!
root@ip-172-31-16-136:/opt/janus/etc/janus#  nc -vz 18.221.158.132 8088
Connection to 18.221.158.132 8088 port [tcp/omniorb] succeeded!
root@ip-172-31-16-136:/opt/janus/etc/janus#  nc -vz janus.confu.info 8989
Connection to janus.confu.info 8989 port [tcp/*] succeeded!
root@ip-172-31-16-136:/opt/janus/etc/janus#

janus11.PNG


Command Usage:

I am using these commands to run Janus Server on my local Server. I have closed all other Janus-Gateway Servers which I basically deployed during my testing. Docker Janus Gateway Server is not working. 
  • sudo /opt/janus/bin/janus --debug-level=5 --log-file=$HOME/janus-log
  • sudo systemctl start nginx

Logs from Janus Gateway:

Binding to all interfaces for the Janus API HTTPS webserver
HTTPS webserver started (port 8089, /janus path listener)...
[WARN] Admin/monitor HTTP webserver disabled
[WARN] Admin/monitor HTTPS webserver disabled
JANUS REST (HTTP/HTTPS) transport plugin initialized!
        Version: 2 (0.0.2)
           [janus.transport.http] JANUS REST (HTTP/HTTPS) transport plugin
           This transport plugin adds REST (HTTP/HTTPS) support to the Janus API via libmicrohttpd.
           Plugin API version: 7
           Janus API: enabled
           Admin API: disabled
[WARN] libnice version outdated: 0.1.14 installed, at least 0.1.16 recommended. Notice the installed version was checked at build time: if you updated libnice in the meanwhile, re-configure and recompile to get rid of this warning
Filesource (live) thread starting...
[file-live-sample] Opening file source /opt/janus/share/janus/streams/radio.alaw...
[file-live-sample] Streaming audio file: /opt/janus/share/janus/streams/radio.alaw
Joining SIP handler thread

[ERR] [transports/janus_http.c:janus_http_handler:1260] Invalid url /ws/v1/cluster/apps/new-application


For Detailed logs of Janus Gateway, I have attached the Janus1.txt file. Please find some time to visit that as well. You can check all configuration settings using logs.
Janus1.txt

Muhammad Usman Bashir

unread,
Mar 1, 2022, 5:02:19 AM3/1/22
to meetecho-janus
Dear Team, Proceeding with my last testing, I have also tested using npm module wscat to analyze web socket server response.

No Solution is working at all. I don't know what is that little point which I am missing overall;

janus111.PNG

Please assist me in how can I further provide you with a reliable testing report.

Muhammad Usman Bashir

unread,
Mar 1, 2022, 6:56:29 AM3/1/22
to meetecho-janus
Dear team, Proceeding further with my research all of my ports are working fine and I have also checked it using Curl Post Request. I hope so It will further help you out to dissect the issue.

terminator@DESKTOP-8I47BTQ:~$ curl -k -v -X POST https://18.221.158.132:8989/ws/v1/cluster/apps/new-application                                                                                                    
*   Trying 18.221.158.132:8989...                                                                                                                                                                                  
* TCP_NODELAY set                                                                                                                                                                                                  
* Connected to 18.221.158.132 (18.221.158.132) port 8989 (#0)                                                                                                                                                      
* ALPN, offering h2                                                                                                                                                                                                
* ALPN, offering http/1.1                                                                                                                                                                                          
* successfully set certificate verify locations:                                                                                                                                                                   
*   CAfile: /etc/ssl/certs/ca-certificates.crt                                                                                                                                                                       
     CApath: /etc/ssl/certs                                                                                                                                                                                           
* TLSv1.3 (OUT), TLS handshake, Client hello (1):                                                                                                                                                                  
* TLSv1.3 (IN), TLS handshake, Server hello (2):                                                                                                                                                                   
* TLSv1.3 (IN), TLS handshake, Encrypted Extensions (8):                                                                                                                                                           
* TLSv1.3 (IN), TLS handshake, Certificate (11):                                                                                                                                                                   
* TLSv1.3 (IN), TLS handshake, CERT verify (15):                                                                                                                                                                   
* TLSv1.3 (IN), TLS handshake, Finished (20):                                                                                                                                                                      
* TLSv1.3 (OUT), TLS change cipher, Change cipher spec (1):                                                                                                                                                        
* TLSv1.3 (OUT), TLS handshake, Finished (20):                                                                                                                                                                     
* SSL connection using TLSv1.3 / TLS_AES_256_GCM_SHA384                                                                                                                                                            
* ALPN, server accepted to use h2                                                                                                                                                                                  
* Server certificate:                                                                                                                                                                                              
*  subject: C=pk; ST=punjab; L=lahore; O=rtc; OU=dev; CN=rtc; emailAddress=us...@confu.info                                                                                                                        
*  start date: Feb 18 12:55:06 2022 GMT                                                                                                                                                                            
*  expire date: Feb 17 12:55:06 2025 GMT                                                                                                                                                                           
*  issuer: C=pk; ST=punjab; L=lahore; O=rtc; OU=dev; CN=rtc; emailAddress=us...@confu.info                                                                                                                         
*  SSL certificate verify result: self signed certificate (18), continuing anyway.                                                                                                                                 
* Using HTTP2, server supports multi-use                                                                                                                                                                           
* Connection state changed (HTTP/2 confirmed)                                                                                                                                                                     
* Copying HTTP/2 data in stream buffer to connection buffer after upgrade: len=0                                                                                                                                   
* Using Stream ID: 1 (easy handle 0x7fffe4c68b60)                                                                                                                                                                  
> POST /ws/v1/cluster/apps/new-application HTTP/2                                                                                                                                                                  
> Host: 18.221.158.132:8989                                                                                                                                                                                        
> user-agent: curl/7.68.0                                                                                                                                                                                          
> accept: */*                                                                           
* TLSv1.3 (IN), TLS handshake, Newsession Ticket (4):                                                                                                                                                              
* TLSv1.3 (IN), TLS handshake, Newsession Ticket (4):                                                                                                                                                              
* old SSL session ID is stale, removing                                                                                                                                                                            
* Connection state changed (MAX_CONCURRENT_STREAMS == 24)!                                                                                                                                                         
< HTTP/2 403                                                                                                                                                                                                       
< content-type: text/html                                                                                                                                                                                          
< content-length: 173                                                                                                                                                                                              
<                                                                                                                                                                                                                  
* Connection #0 to host 18.221.158.132 left intact                                                                                                                                                                 
<html><head><meta charset=utf-8 http-equiv="Content-Language" content="en"/><link rel="stylesheet" type="text/css" href="/error.css"/></head><body><h1>403</h1></body></html>
terminator@DESKTOP-8I47BTQ:~$ 



 janus112.PNG


Ravi Srivastava

unread,
Mar 1, 2022, 10:55:11 PM3/1/22
to meetecho-janus
I am using Janus on 5 virtual machines in Google cloud. In place of web sockets, I used reverse proxy with APACHE. Everything is working fine. I can help if you are also using Apache.

- ravi

Muhammad Usman Bashir

unread,
Mar 2, 2022, 3:03:33 AM3/2/22
to meetecho-janus
Thanks for replying.

I have configured Apache with Janus Gateway. Now, I am somewhat able to open demos properly, but eventually, all demos got stuck in Publishing.

Console Logs from Echotest:

Initializing library
janus.js:446 Library initialized: true
janus.js:467 Using WebSockets to contact Janus: wss://18.221.158.132:8989/ws
janus.js:900 Created session: 5181738605437896
janus.js:1193 Created handle: 8286911059223741
echotest.js:101 Plugin attached! (janus.plugin.echotest, id=8286911059223741)
janus.js:1833 Creating PeerConnection
janus.js:1841 Preparing local SDP and gathering candidates (trickle=true)
janus.js:1936 Adding local stream
janus.js:1939 Adding local track: MediaStreamTrack {kind: 'audio', id: '4ccd3f6d-a223-4f4c-9c87-018a2ef09393', label: 'Default - Microphone (Realtek(R) Audio)', enabled: true, muted: false, …}
janus.js:1939 Adding local track: MediaStreamTrack {kind: 'video', id: 'dc4952c3-f3c1-418c-8e79-1546d049104b', label: 'Integrated Webcam (0c45:6a08)', enabled: true, muted: false, …}
janus.js:1977 Creating default data channel
janus.js:2597 Creating offer (iceDone=false)
janus.js:2647 Setting audio transceiver to sendrecv: RTCRtpTransceiver {mid: null, sender: RTCRtpSender, receiver: RTCRtpReceiver, stopped: false, direction: 'sendrecv', …}
janus.js:2695 Setting video transceiver to sendrecv: RTCRtpTransceiver {mid: null, sender: RTCRtpSender, receiver: RTCRtpReceiver, stopped: false, direction: 'sendrecv', …}
janus.js:2761 Setting local description
echotest.js:168 ICE state changed to checking
janus.js:1873 Handling Remote Track
janus.js:1895 Adding onended callback to track: MediaStreamTrack {kind: 'audio', id: '737ebb25-a66c-45c7-9a48-667bc95dc88c', label: '737ebb25-a66c-45c7-9a48-667bc95dc88c', enabled: true, muted: true, …}
janus.js:1873 Handling Remote Track
janus.js:1895 Adding onended callback to track: MediaStreamTrack {kind: 'video', id: 'cbf7e852-9c23-4d2a-abcf-fbdbf30d0444', label: 'cbf7e852-9c23-4d2a-abcf-fbdbf30d0444', enabled: true, muted: true, …}
janus.js:1920 Remote track flowing again: Event {isTrusted: true, type: 'unmute', target: MediaStreamTrack, currentTarget: MediaStreamTrack, eventPhase: 2, …}
janus.js:1920 Remote track flowing again: Event {isTrusted: true, type: 'unmute', target: MediaStreamTrack, currentTarget: MediaStreamTrack, eventPhase: 2, …}
janus.js:2558 Remote description accepted!
janus.js:1849 End of candidates.
echotest.js:168 ICE state changed to connected
janus.js:3180 Starting bitrate timer (via getStats)
janus.js:1905 Remote track muted: Event {isTrusted: true, type: 'mute', target: MediaStreamTrack, currentTarget: MediaStreamTrack, eventPhase: 2, …}
janus.js:1908 Removing remote track

I have compared these console logs from original meet-echo demos and these are the differences;

Screenshot (46).png
Is there anything else, I can provide you?

Lorenzo Miniero

unread,
Mar 2, 2022, 3:09:19 AM3/2/22
to meetecho-janus
Please STOP sending huge chunks of text and screenshots inline! It's written in the guidelines, we told you NOT to do that, and yet you STILL do that!

Muhammad Usman Bashir

unread,
Mar 2, 2022, 3:18:38 AM3/2/22
to meetecho-janus
Apologies for the inconvenience. Can you please guide me on my last message in this thread?
Reply all
Reply to author
Forward
0 new messages