Glimesh / janus-ftl-plugin

A plugin for the Janus WebRTC gateway to enable relaying of audio/video streams utilizing Mixer's FTL (Faster-Than-Light) protocol.
https://hayden.fyi/posts/2020-08-03-Faster-Than-Light-protocol-engineering-notes.html
GNU Affero General Public License v3.0
46 stars 11 forks source link

Access token request failed during janus startup connecting to Glimesh app #137

Closed 4563453 closed 2 years ago

4563453 commented 2 years ago

Hello, trying to setup glimesh app and janus server I have a runnung glimesh, configured and running waiting for incoming ftl stream. My Janus, just build from github fails during connect to glimesh.

FTL_SERVICE_CONNECTION, FTL_SERVICE_GLIMESH_HOSTNAME, FTL_SERVICE_GLIMESH_PORT, FTL_SERVICE_GLIMESH_HTTPS, FTL_SERVICE_GLIMESH_CLIENTID, FTL_SERVICE_GLIMESH_CLIENTSECRET are configured in docker-compose environment.

Error messages during boot:

janus-ftl-deployed | [Tue May 31 20:26:11 2022] Event handlers support disabled janus-ftl-deployed | [Tue May 31 20:26:11 2022] Plugins folder: /opt/janus/lib/janus/plugins janus-ftl-deployed | [Tue May 31 20:26:11 2022] Loading plugin 'libjanus_ftl.so'... janus-ftl-deployed | [Tue May 31 20:26:11 2022] Joining Janus requests handler thread janus-ftl-deployed | [Tue May 31 20:26:11 2022] Sessions watchdog started janus-ftl-deployed | [2022-05-31 20:26:11.601] [info] Using Glimesh Service Connection @ https://x.24.3.14:4001 janus-ftl-deployed | [Tue May 31 20:26:11 2022] Janus FTL Plugin created! janus-ftl-deployed | terminate called after throwing an instance of 'std::runtime_error' janus-ftl-deployed | what(): Access token request failed!

I checked CLIENTID and CLIENTSECRET using Insomnia. Api Login works fine.

danstiner commented 2 years ago

My first guess is this is something to do with https, possibly the the certificate you are using for glimesh web is not trusted by the Janus server? Setting up https can be tricky, I often don't for local testing.

Unfortunately it looks like we don't have much useful logging for what exactly is going wrong. Swear I'd added some but I guess not. Should be easy to add if you want to send a PR! Line https://github.com/Glimesh/janus-ftl-plugin/blob/7d49f9edae8c47e1feccbe9472a2b07bc3afd783/src/ServiceConnections/GlimeshServiceConnection.cpp#L295 is generating the error

4563453 commented 2 years ago

I confirm an issue with certificate, its fixed and system is working now. Yes the logging could be better.