Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not able to run JanusDocker in Mac M1 #4

Closed
Djain1764 opened this issue Nov 2, 2023 · 5 comments
Closed

Not able to run JanusDocker in Mac M1 #4

Djain1764 opened this issue Nov 2, 2023 · 5 comments

Comments

@Djain1764
Copy link

Hey @shivanshtalwar ,
Thanks for your contribution, I want to use this docker image and run janus server locally in my MAC M1 and I want to stream a rtsp url which can be streamed on H264 format.
I literally have zero knowledge of janus, but what I am trying to do is to stream rtsp url using gstreamer on port 8004 and run janus locally and then I want to access the stream in my flutter app using janus_client which is also a contribution of yours.

I am able to run gstreamer stream locally and I am done with the flutter janus_client setup using the example in the janus_client repo for streaming.dart.

But I am not able to run janus locally in mac, so I am trying to follow the JanusDocker method you provided in the medium article you wrote. I cloned the janusDocker repo and simply run the commands you provided for build, I don't know what the commands in quickstart mean, so I just used the commands to build.

and while running the docker run command , I got this error :-
WARNING: The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested

@shivanshtalwar
Copy link
Contributor

The warning that you see makes sense because to cut the build time the project is split into two parts one januscoredeps which only contains janus core dependencies for compiling janus and another is janus itself now to make it work you need to compile arm64 image for januscoredeps which is architecture of your m1 macbook after that you need to change the base image in janus/Dockerfile to your compiled arm64 image of januscoredeps and run the project simply by docker compose up --build -d

Please note in my last attempts of running it on m1 mac ,docker of mac m1 has some intrinsic issues with network_mode: host which can cause ice connectivity issues in janus therefore if it still doesn't work for you after previous efforts then you should use maybe raspberry pi or some linux device to host janus server

@Djain1764
Copy link
Author

Djain1764 commented Nov 2, 2023

Thanks for the arm image suggestion, It helped and the container started also.
But inside the container, Janus is facing many errors

[+] Running 1/0
 ✔ Container janus-janus-multistreaming-1  Created                                                                                                                                     0.0s 
Attaching to janus-janus-multistreaming-1
janus-janus-multistreaming-1  | Janus version: 1102 (1.1.2)
janus-janus-multistreaming-1  | Janus commit: 6e8a3176990c56bf59b730fd440233633afafbda
janus-janus-multistreaming-1  | Compiled on:  Thu Nov  2 08:12:01 UTC 2023
janus-janus-multistreaming-1  | 
janus-janus-multistreaming-1  | 
janus-janus-multistreaming-1  | Failed to load /opt/janus-tools/etc/janus/janus.jcfg, trying the INI instead...
janus-janus-multistreaming-1  | Error reading/parsing the configuration file in /opt/janus-tools/etc/janus, going on with the defaults and the command line arguments
janus-janus-multistreaming-1  | [ERR] [config.c:janus_config_parse:191]   -- Error reading configuration file 'janus.jcfg'... error 2 (No such file or directory)
janus-janus-multistreaming-1  | [ERR] [config.c:janus_config_parse:191]   -- Error reading configuration file 'janus.cfg'... error 2 (No such file or directory)
janus-janus-multistreaming-1  | Logger plugins folder: /opt/janus-tools/lib/janus/loggers
janus-janus-multistreaming-1  | [WARN] 	Couldn't access logger plugins folder...
janus-janus-multistreaming-1  | ---------------------------------------------------
janus-janus-multistreaming-1  |   Starting Meetecho Janus (WebRTC Server) v1.1.2
janus-janus-multistreaming-1  | ---------------------------------------------------
janus-janus-multistreaming-1  | 
janus-janus-multistreaming-1  | Checking command line arguments...
janus-janus-multistreaming-1  | Debug/log level is 4
janus-janus-multistreaming-1  | Debug/log timestamps are disabled
janus-janus-multistreaming-1  | Debug/log colors are enabled
janus-janus-multistreaming-1  | 
janus-janus-multistreaming-1  | Using 192.168.65.4 as local IP...
janus-janus-multistreaming-1  | Token based authentication disabled
janus-janus-multistreaming-1  | Initializing recorder code
janus-janus-multistreaming-1  | Initializing ICE stuff (Full mode, ICE-TCP candidates disabled, half-trickle, IPv6 support disabled)
janus-janus-multistreaming-1  | TURN REST API backend: (disabled)
janus-janus-multistreaming-1  | [WARN] Janus is deployed on a private address (192.168.65.4) 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...
janus-janus-multistreaming-1  | Crypto: OpenSSL >= 1.1.0
janus-janus-multistreaming-1  | No cert/key specified, autogenerating some...
janus-janus-multistreaming-1  | Fingerprint of our certificate: D6:50:79:F7:87:43:F8:76:60:AA:19:97:7C:75:21:2C:2A:D3:99:28:12:9A:0F:A4:0F:BA:88:3D:A9:D0:28:75
janus-janus-multistreaming-1  | Event handlers support disabled
janus-janus-multistreaming-1  | Plugins folder: /opt/janus-tools/lib/janus/plugins
janus-janus-multistreaming-1  | Sessions watchdog started
janus-janus-multistreaming-1  | Joining Janus requests handler thread
janus-janus-multistreaming-1  | Loading plugin 'libjanus_audiobridge.so'...
janus-janus-multistreaming-1  | [ERR] [config.c:janus_config_parse:191]   -- Error reading configuration file 'janus.plugin.audiobridge.jcfg'... error 2 (No such file or directory)
janus-janus-multistreaming-1  | [WARN] Couldn't find .jcfg configuration file (janus.plugin.audiobridge), trying .cfg
janus-janus-multistreaming-1  | [ERR] [config.c:janus_config_parse:191]   -- Error reading configuration file 'janus.plugin.audiobridge.cfg'... error 2 (No such file or directory)
janus-janus-multistreaming-1  | JANUS AudioBridge plugin initialized!
janus-janus-multistreaming-1  | Loading plugin 'libjanus_streaming.so'...
janus-janus-multistreaming-1  | [ERR] [config.c:janus_config_parse:191]   -- Error reading configuration file 'janus.plugin.streaming.jcfg'... error 2 (No such file or directory)
janus-janus-multistreaming-1  | [WARN] Couldn't find .jcfg configuration file (janus.plugin.streaming), trying .cfg
janus-janus-multistreaming-1  | [ERR] [config.c:janus_config_parse:191]   -- Error reading configuration file 'janus.plugin.streaming.cfg'... error 2 (No such file or directory)
janus-janus-multistreaming-1  | JANUS Streaming plugin initialized!
janus-janus-multistreaming-1  | Loading plugin 'libjanus_textroom.so'...
janus-janus-multistreaming-1  | [ERR] [config.c:janus_config_parse:191]   -- Error reading configuration file 'janus.plugin.textroom.jcfg'... error 2 (No such file or directory)
janus-janus-multistreaming-1  | [WARN] Couldn't find .jcfg configuration file (janus.plugin.textroom), trying .cfg
janus-janus-multistreaming-1  | [ERR] [config.c:janus_config_parse:191]   -- Error reading configuration file 'janus.plugin.textroom.cfg'... error 2 (No such file or directory)
janus-janus-multistreaming-1  | JANUS TextRoom plugin initialized!
janus-janus-multistreaming-1  | Loading plugin 'libjanus_videoroom.so'...
janus-janus-multistreaming-1  | [ERR] [config.c:janus_config_parse:191]   -- Error reading configuration file 'janus.plugin.videoroom.jcfg'... error 2 (No such file or directory)
janus-janus-multistreaming-1  | [WARN] Couldn't find .jcfg configuration file (janus.plugin.videoroom), trying .cfg
janus-janus-multistreaming-1  | [ERR] [config.c:janus_config_parse:191]   -- Error reading configuration file 'janus.plugin.videoroom.cfg'... error 2 (No such file or directory)
janus-janus-multistreaming-1  | JANUS VideoRoom plugin initialized!
janus-janus-multistreaming-1  | Loading plugin 'libjanus_recordplay.so'...
janus-janus-multistreaming-1  | [ERR] [config.c:janus_config_parse:191]   -- Error reading configuration file 'janus.plugin.recordplay.jcfg'... error 2 (No such file or directory)
janus-janus-multistreaming-1  | [WARN] Couldn't find .jcfg configuration file (janus.plugin.recordplay), trying .cfg
janus-janus-multistreaming-1  | [ERR] [config.c:janus_config_parse:191]   -- Error reading configuration file 'janus.plugin.recordplay.cfg'... error 2 (No such file or directory)
janus-janus-multistreaming-1  | [FATAL] [plugins/janus_recordplay.c:janus_recordplay_init:824] No recordings path specified, giving up...
janus-janus-multistreaming-1  | [WARN] The 'janus.plugin.recordplay' plugin could not be initialized
janus-janus-multistreaming-1  | Loading plugin 'libjanus_nosip.so'...
janus-janus-multistreaming-1  | [ERR] [config.c:janus_config_parse:191]   -- Error reading configuration file 'janus.plugin.nosip.jcfg'... error 2 (No such file or directory)
janus-janus-multistreaming-1  | [WARN] Couldn't find .jcfg configuration file (janus.plugin.nosip), trying .cfg
janus-janus-multistreaming-1  | [ERR] [config.c:janus_config_parse:191]   -- Error reading configuration file 'janus.plugin.nosip.cfg'... error 2 (No such file or directory)
janus-janus-multistreaming-1  | JANUS NoSIP plugin initialized!
janus-janus-multistreaming-1  | Loading plugin 'libjanus_voicemail.so'...
janus-janus-multistreaming-1  | [ERR] [config.c:janus_config_parse:191]   -- Error reading configuration file 'janus.plugin.voicemail.jcfg'... error 2 (No such file or directory)
janus-janus-multistreaming-1  | [WARN] Couldn't find .jcfg configuration file (janus.plugin.voicemail), trying .cfg
janus-janus-multistreaming-1  | [ERR] [config.c:janus_config_parse:191]   -- Error reading configuration file 'janus.plugin.voicemail.cfg'... error 2 (No such file or directory)
janus-janus-multistreaming-1  | JANUS VoiceMail plugin initialized!
janus-janus-multistreaming-1  | Loading plugin 'libjanus_echotest.so'...
janus-janus-multistreaming-1  | [ERR] [config.c:janus_config_parse:191]   -- Error reading configuration file 'janus.plugin.echotest.jcfg'... error 2 (No such file or directory)
janus-janus-multistreaming-1  | [WARN] Couldn't find .jcfg configuration file (janus.plugin.echotest), trying .cfg
janus-janus-multistreaming-1  | [ERR] [config.c:janus_config_parse:191]   -- Error reading configuration file 'janus.plugin.echotest.cfg'... error 2 (No such file or directory)
janus-janus-multistreaming-1  | JANUS EchoTest plugin initialized!
janus-janus-multistreaming-1  | Loading plugin 'libjanus_sip.so'...
janus-janus-multistreaming-1  | [ERR] [config.c:janus_config_parse:191]   -- Error reading configuration file 'janus.plugin.sip.jcfg'... error 2 (No such file or directory)
janus-janus-multistreaming-1  | [WARN] Couldn't find .jcfg configuration file (janus.plugin.sip), trying .cfg
janus-janus-multistreaming-1  | [ERR] [config.c:janus_config_parse:191]   -- Error reading configuration file 'janus.plugin.sip.cfg'... error 2 (No such file or directory)
janus-janus-multistreaming-1  | JANUS SIP plugin initialized!
janus-janus-multistreaming-1  | Loading plugin 'libjanus_videocall.so'...
janus-janus-multistreaming-1  | [ERR] [config.c:janus_config_parse:191]   -- Error reading configuration file 'janus.plugin.videocall.jcfg'... error 2 (No such file or directory)
janus-janus-multistreaming-1  | [WARN] Couldn't find .jcfg configuration file (janus.plugin.videocall), trying .cfg
janus-janus-multistreaming-1  | [ERR] [config.c:janus_config_parse:191]   -- Error reading configuration file 'janus.plugin.videocall.cfg'... error 2 (No such file or directory)
janus-janus-multistreaming-1  | JANUS VideoCall plugin initialized!
janus-janus-multistreaming-1  | Transport plugins folder: /opt/janus-tools/lib/janus/transports
janus-janus-multistreaming-1  | Loading transport plugin 'libjanus_rabbitmq.so'...
janus-janus-multistreaming-1  | [ERR] [config.c:janus_config_parse:191]   -- Error reading configuration file 'janus.transport.rabbitmq.jcfg'... error 2 (No such file or directory)
janus-janus-multistreaming-1  | [WARN] Couldn't find .jcfg configuration file (janus.transport.rabbitmq), trying .cfg
janus-janus-multistreaming-1  | [ERR] [config.c:janus_config_parse:191]   -- Error reading configuration file 'janus.transport.rabbitmq.cfg'... error 2 (No such file or directory)
janus-janus-multistreaming-1  | RabbitMQ SSL support disabled
janus-janus-multistreaming-1  | [WARN] RabbitMQ support disabled for both Janus and Admin API, giving up
janus-janus-multistreaming-1  | [WARN] The 'janus.transport.rabbitmq' plugin could not be initialized
janus-janus-multistreaming-1  | Loading transport plugin 'libjanus_pfunix.so'...
janus-janus-multistreaming-1  | [ERR] [config.c:janus_config_parse:191]   -- Error reading configuration file 'janus.transport.pfunix.jcfg'... error 2 (No such file or directory)
janus-janus-multistreaming-1  | [WARN] Couldn't find .jcfg configuration file (janus.transport.pfunix), trying .cfg
janus-janus-multistreaming-1  | [ERR] [config.c:janus_config_parse:191]   -- Error reading configuration file 'janus.transport.pfunix.cfg'... error 2 (No such file or directory)
janus-janus-multistreaming-1  | [WARN] No Unix Sockets server started, giving up...
janus-janus-multistreaming-1  | [WARN] The 'janus.transport.pfunix' plugin could not be initialized
janus-janus-multistreaming-1  | Loading transport plugin 'libjanus_websockets.so'...
janus-janus-multistreaming-1  | [WARN] libwebsockets has been built without IPv6 support, will bind to IPv4 only
janus-janus-multistreaming-1  | [ERR] [config.c:janus_config_parse:191]   -- Error reading configuration file 'janus.transport.websockets.jcfg'... error 2 (No such file or directory)
janus-janus-multistreaming-1  | [WARN] Couldn't find .jcfg configuration file (janus.transport.websockets), trying .cfg
janus-janus-multistreaming-1  | [ERR] [config.c:janus_config_parse:191]   -- Error reading configuration file 'janus.transport.websockets.cfg'... error 2 (No such file or directory)
janus-janus-multistreaming-1  | [WARN] No WebSockets server started, giving up...
janus-janus-multistreaming-1  | [WARN] The 'janus.transport.websockets' plugin could not be initialized
janus-janus-multistreaming-1  | Loading transport plugin 'libjanus_http.so'...
janus-janus-multistreaming-1  | [ERR] [config.c:janus_config_parse:191]   -- Error reading configuration file 'janus.transport.http.jcfg'... error 2 (No such file or directory)
janus-janus-multistreaming-1  | [WARN] Couldn't find .jcfg configuration file (janus.transport.http), trying .cfg
janus-janus-multistreaming-1  | HTTP transport timer started
janus-janus-multistreaming-1  | [ERR] [config.c:janus_config_parse:191]   -- Error reading configuration file 'janus.transport.http.cfg'... error 2 (No such file or directory)
janus-janus-multistreaming-1  | [WARN] No HTTP/HTTPS server started, giving up...
janus-janus-multistreaming-1  | [WARN] The 'janus.transport.http' plugin could not be initialized
janus-janus-multistreaming-1  | Loading transport plugin 'libjanus_mqtt.so'...
janus-janus-multistreaming-1  | [ERR] [config.c:janus_config_parse:191]   -- Error reading configuration file 'janus.transport.mqtt.jcfg'... error 2 (No such file or directory)
janus-janus-multistreaming-1  | [WARN] Couldn't find .jcfg configuration file (janus.transport.mqtt), trying .cfg
janus-janus-multistreaming-1  | [ERR] [config.c:janus_config_parse:191]   -- Error reading configuration file 'janus.transport.mqtt.cfg'... error 2 (No such file or directory)
janus-janus-multistreaming-1  | MQTT SSL support disabled
janus-janus-multistreaming-1  | [WARN] MQTT support disabled for both Janus and Admin API, giving up
janus-janus-multistreaming-1  | JANUS MQTT transport plugin destroyed!
janus-janus-multistreaming-1  | [WARN] The 'janus.transport.mqtt' plugin could not be initialized
janus-janus-multistreaming-1  | Loading transport plugin 'libjanus_nanomsg.so'...
janus-janus-multistreaming-1  | [ERR] [config.c:janus_config_parse:191]   -- Error reading configuration file 'janus.transport.nanomsg.jcfg'... error 2 (No such file or directory)
janus-janus-multistreaming-1  | [WARN] Couldn't find .jcfg configuration file (janus.transport.nanomsg), trying .cfg
janus-janus-multistreaming-1  | [ERR] [config.c:janus_config_parse:191]   -- Error reading configuration file 'janus.transport.nanomsg.cfg'... error 2 (No such file or directory)
janus-janus-multistreaming-1  | [WARN] No Nanomsg server started, giving up...
janus-janus-multistreaming-1  | [WARN] The 'janus.transport.nanomsg' plugin could not be initialized
janus-janus-multistreaming-1  | [FATAL] [janus.c:main:5801] No Janus API transport is available... enable at least one and restart Janus
janus-janus-multistreaming-1 exited with code 1

@shivanshtalwar
Copy link
Contributor

Looks like config files are missing maybe comment out copy command for.jcfg in Dockerfile and try running again

@Djain1764
Copy link
Author

Still the same error

@shivanshtalwar
Copy link
Contributor

Try using arm64.yaml file

docker compose -f arm64.yaml up --build -d

Updated core deps with m1 arm processor image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants