Error creating vhost for Secure Websockets serve

160 views
Skip to first unread message

Henry Laxen

unread,
Jul 22, 2022, 11:31:44 PM7/22/22
to meetecho-janus
I don't know whether to post this in the group or in the issues on
github, so here goes.

Today (Fri Jul 22, 2022) I did a git pull (master) in my janus-gateway repository, and recompiled with:

sh autogen.sh
./configure --prefix=/home/henry/nadineloveshenry/janus-gateway/j
make && make install

I didn't see any errors during compilation and install. Then I tried
to run the janus binary and got:

Loading transport plugin 'libjanus_websockets.so'...
JANUS WebSockets transport plugin created!
Configuration file: /home/henry/nadineloveshenry/janus-gateway/j/etc/janus/janus.transport.websockets.jcfg

libwebsockets logging: 0
No interface associated with 0.0.0.0? Falling back to no interface...
Websockets server started (port 8188)...
No interface associated with 0.0.0.0? Falling back to no interface...
Using certificates:
    /etc/letsencrypt/live/nadineloveshenry.com/fullchain.pem
    /etc/letsencrypt/live/nadineloveshenry.com/privkey.pem
[transports/janus_websockets.c:janus_websockets_create_ws_server:503] Error creating vhost for Secure Websockets server...

I am on a fully updated arch linux system, with the following package versions:

Arch linux package versions:
  cmake Version         : 3.23.2-2
  glib2 Version         : 2.72.3-1
  jansson Version       : 2.14-2
  libconfig Version     : 1.7.3-1
  libmicrohttpd Version : 0.9.75-1
  libnice Version       : 0.1.19-1
  libsrtp Version       : 1:2.4.2-1
  libwebsockets Version : 4.3.2-2
  openssl Version       : 1.1.1.q-1
  pkgconf Version       : 1.8.0-1
  zlib  Version         : 1:1.2.12-2

the output from ./configure

checking for lws_create_vhost in -lwebsockets... yes
Transports:
    REST (HTTP/HTTPS):     yes
    WebSockets:            yes
    RabbitMQ:              no
    MQTT:                  no
    Unix Sockets:          yes
    Nanomsg:               no

the relevant part of janus.transport.websockets.jcfg
    general: {
        json: indented
        ws: true
        ws_port: 8188
        ws_ip: 0.0.0.0
        wss: true
        wss_port: 8989
        wss_ip: 0.0.0.0
    }

If there is anything I can do to help track this down, please let me
know.
Best wishes,
Henry Laxen



Lorenzo Miniero

unread,
Jul 23, 2022, 8:25:38 AM7/23/22
to meetecho-janus
Don't put 0.0.0.0 as the IP, either omit it or put an existing IP/interface name on the machine.

L.

Henry Laxen

unread,
Jul 25, 2022, 8:49:25 AM7/25/22
to meetecho-janus
Dear lmin,

Thank you for the reply.  I pulled the latest version from git, did as
you suggested, but it made no difference.

    Janus version: 1004 (1.0.4)
    Janus commit: 5e77ce5ddc6d82dcd1214d27c1121b1b1b0c92a3
    Compiled on:  Mon Jul 25 05:36:23 AM PDT 2022


        general: {
            json: indented
            ws: true
            ws_port: 8188
            wss: true
            wss_port: 8989
        }
        admin: {
            admin_ws: true
            admin_ws_port: 7188
            admin_wss: true
            admin_wss_port: 7989

        }
    Websockets server started (port 8188)...
    Using certificates:
        /etc/letsencrypt/live/nadineloveshenry.com/fullchain.pem
        /etc/letsencrypt/live/nadineloveshenry.com/privkey.pem
    [FATAL] [transports/janus_websockets.c:janus_websockets_create_ws_server:503] Error creating vhost for Secure Websockets server...
    Admin Websockets server started (port 7188)...
    Using certificates:
        /etc/letsencrypt/live/nadineloveshenry.com/fullchain.pem
        /etc/letsencrypt/live/nadineloveshenry.com/privkey.pem
    [FATAL] [transports/janus_websockets.c:janus_websockets_create_ws_server:503] Error creating vhost for Secure Admin Websockets server...
    JANUS WebSockets transport plugin initialized!

Again if there is anything I can do to help track this down, please

let me know.

Best wishes,
Henry Laxen


Lorenzo Miniero

unread,
Jul 25, 2022, 9:40:23 AM7/25/22
to meetecho-janus
Looks like a problem accessing the certificates, since it only complains about the secure servers.
We usually recommend only doing plain HTTP/WS in Janus, and use a proxy to add support for HTTPS/WSS: https://janus.conf.meetecho.com/docs/deploy

L.

Henry Laxen

unread,
Jul 25, 2022, 4:14:54 PM7/25/22
to meetecho-janus
Dear lmin,

Thank you for the reply and the link. You are indeed correct.  I was
pointing to the wrong certificate.  Once I fixed that, everything is
tickey-boo.  Thanks so much for you help.  Now let me know where I can
send you a bottle of champagne.

Best wishes,
Henry Laxen
Reply all
Reply to author
Forward
0 new messages