Running Docker image with Membrane RTMP Plugin

Hello, I am trying to run a Docker container with membrane_rtmp_plugin library, it builds successfully, however I am getting following error:
2024-04-26 16:11:04 =CRASH REPORT==== 26-Apr-2024::13:11:04.943773 ===
2024-04-26 16:11:04 crasher:
2024-04-26 16:11:04 initial call: kernel:init/1
2024-04-26 16:11:04 pid: <0.2488.0>
2024-04-26 16:11:04 registered_name: []
2024-04-26 16:11:04 exception exit: {on_load_function_failed,
2024-04-26 16:11:04 'Elixir.Membrane.RTMP.Sink.Native.Nif',abort}
2024-04-26 16:11:04 in function init:run_on_load_handlers/0
2024-04-26 16:11:04 in call from kernel:init/1 (kernel.erl, line 227)
2024-04-26 16:11:04 ancestors: [kernel_sup,<0.2481.0>]
2024-04-26 16:11:04 message_queue_len: 0
2024-04-26 16:11:04 messages: []
2024-04-26 16:11:04 links: [<0.2483.0>]
2024-04-26 16:11:04 dictionary: []
2024-04-26 16:11:04 trap_exit: false
2024-04-26 16:11:04 status: running
2024-04-26 16:11:04 heap_size: 376
2024-04-26 16:11:04 stack_size: 28
2024-04-26 16:11:04 reductions: 141
2024-04-26 16:11:04 neighbours:
2024-04-26 16:11:04
2024-04-26 16:11:04 =SUPERVISOR REPORT==== 26-Apr-2024::13:11:04.943806 ===
2024-04-26 16:11:04 supervisor: {local,kernel_sup}
2024-04-26 16:11:04 errorContext: start_error
2024-04-26 16:11:04 reason: {on_load_function_failed,'Elixir.Membrane.RTMP.Sink.Native.Nif',
2024-04-26 16:11:04 abort}
2024-04-26 16:11:04 offender: [{pid,undefined},
2024-04-26 16:11:04 {id,on_load},
2024-04-26 16:11:04 {mfargs,{proc_lib,start_link,[kernel,init,[on_load]]}},
2024-04-26 16:11:04 {restart_type,transient},
2024-04-26 16:11:04 {significant,false},
2024-04-26 16:11:04 {shutdown,2000},
2024-04-26 16:11:04 {child_type,worker}]
2024-04-26 16:11:04
2024-04-26 16:11:04 =CRASH REPORT==== 26-Apr-2024::13:11:04.943773 ===
2024-04-26 16:11:04 crasher:
2024-04-26 16:11:04 initial call: kernel:init/1
2024-04-26 16:11:04 pid: <0.2488.0>
2024-04-26 16:11:04 registered_name: []
2024-04-26 16:11:04 exception exit: {on_load_function_failed,
2024-04-26 16:11:04 'Elixir.Membrane.RTMP.Sink.Native.Nif',abort}
2024-04-26 16:11:04 in function init:run_on_load_handlers/0
2024-04-26 16:11:04 in call from kernel:init/1 (kernel.erl, line 227)
2024-04-26 16:11:04 ancestors: [kernel_sup,<0.2481.0>]
2024-04-26 16:11:04 message_queue_len: 0
2024-04-26 16:11:04 messages: []
2024-04-26 16:11:04 links: [<0.2483.0>]
2024-04-26 16:11:04 dictionary: []
2024-04-26 16:11:04 trap_exit: false
2024-04-26 16:11:04 status: running
2024-04-26 16:11:04 heap_size: 376
2024-04-26 16:11:04 stack_size: 28
2024-04-26 16:11:04 reductions: 141
2024-04-26 16:11:04 neighbours:
2024-04-26 16:11:04
2024-04-26 16:11:04 =SUPERVISOR REPORT==== 26-Apr-2024::13:11:04.943806 ===
2024-04-26 16:11:04 supervisor: {local,kernel_sup}
2024-04-26 16:11:04 errorContext: start_error
2024-04-26 16:11:04 reason: {on_load_function_failed,'Elixir.Membrane.RTMP.Sink.Native.Nif',
2024-04-26 16:11:04 abort}
2024-04-26 16:11:04 offender: [{pid,undefined},
2024-04-26 16:11:04 {id,on_load},
2024-04-26 16:11:04 {mfargs,{proc_lib,start_link,[kernel,init,[on_load]]}},
2024-04-26 16:11:04 {restart_type,transient},
2024-04-26 16:11:04 {significant,false},
2024-04-26 16:11:04 {shutdown,2000},
2024-04-26 16:11:04 {child_type,worker}]
2024-04-26 16:11:04
10 Replies
oleg.okunevych
oleg.okunevychOP•2y ago
2024-04-26 16:11:04 =CRASH REPORT==== 26-Apr-2024::13:11:04.944480 ===
2024-04-26 16:11:04 crasher:
2024-04-26 16:11:04 initial call: application_master:init/4
2024-04-26 16:11:04 pid: <0.2480.0>
2024-04-26 16:11:04 registered_name: []
2024-04-26 16:11:04 exception exit: {{shutdown,
2024-04-26 16:11:04 {failed_to_start_child,on_load,
2024-04-26 16:11:04 {on_load_function_failed,
2024-04-26 16:11:04 'Elixir.Membrane.RTMP.Sink.Native.Nif',
2024-04-26 16:11:04 abort}}},
2024-04-26 16:11:04 {kernel,start,[normal,[]]}}
2024-04-26 16:11:04 in function application_master:init/4 (application_master.erl, line 142)
2024-04-26 16:11:04 ancestors: [<0.2479.0>]
2024-04-26 16:11:04 message_queue_len: 1
2024-04-26 16:11:04 messages: [{'EXIT',<0.2481.0>,normal}]
2024-04-26 16:11:04 links: [<0.2479.0>,<0.2478.0>]
2024-04-26 16:11:04 dictionary: []
2024-04-26 16:11:04 trap_exit: true
2024-04-26 16:11:04 status: running
2024-04-26 16:11:04 heap_size: 233
2024-04-26 16:11:04 stack_size: 28
2024-04-26 16:11:04 reductions: 166
2024-04-26 16:11:04 neighbours:
2024-04-26 16:11:04
2024-04-26 16:11:04 =CRASH REPORT==== 26-Apr-2024::13:11:04.944480 ===
2024-04-26 16:11:04 crasher:
2024-04-26 16:11:04 initial call: application_master:init/4
2024-04-26 16:11:04 pid: <0.2480.0>
2024-04-26 16:11:04 registered_name: []
2024-04-26 16:11:04 exception exit: {{shutdown,
2024-04-26 16:11:04 {failed_to_start_child,on_load,
2024-04-26 16:11:04 {on_load_function_failed,
2024-04-26 16:11:04 'Elixir.Membrane.RTMP.Sink.Native.Nif',
2024-04-26 16:11:04 abort}}},
2024-04-26 16:11:04 {kernel,start,[normal,[]]}}
2024-04-26 16:11:04 in function application_master:init/4 (application_master.erl, line 142)
2024-04-26 16:11:04 ancestors: [<0.2479.0>]
2024-04-26 16:11:04 message_queue_len: 1
2024-04-26 16:11:04 messages: [{'EXIT',<0.2481.0>,normal}]
2024-04-26 16:11:04 links: [<0.2479.0>,<0.2478.0>]
2024-04-26 16:11:04 dictionary: []
2024-04-26 16:11:04 trap_exit: true
2024-04-26 16:11:04 status: running
2024-04-26 16:11:04 heap_size: 233
2024-04-26 16:11:04 stack_size: 28
2024-04-26 16:11:04 reductions: 166
2024-04-26 16:11:04 neighbours:
2024-04-26 16:11:04
2024-04-26 16:11:04 =INFO REPORT==== 26-Apr-2024::13:11:04.944615 ===
2024-04-26 16:11:04 application: kernel
2024-04-26 16:11:04 exited: {{shutdown,
2024-04-26 16:11:04 {failed_to_start_child,on_load,
2024-04-26 16:11:04 {on_load_function_failed,
2024-04-26 16:11:04 'Elixir.Membrane.RTMP.Sink.Native.Nif',abort}}},
2024-04-26 16:11:04 {kernel,start,[normal,[]]}}
2024-04-26 16:11:04 type: permanent
2024-04-26 16:11:04
2024-04-26 16:11:05 Kernel pid terminated (application_controller) ("{application_start_failure,kernel,{{shutdown,{failed_to_start_child,on_load,{on_load_function_failed,'Elixir.Membrane.RTMP.Sink.Native.Nif',abort}}},{kernel,start,[normal,[]]}}}")
2024-04-26 16:11:05
2024-04-26 16:11:05 Crash dump is being written to: erl_crash.dump...done
2024-04-26 16:11:04 =INFO REPORT==== 26-Apr-2024::13:11:04.944615 ===
2024-04-26 16:11:04 application: kernel
2024-04-26 16:11:04 exited: {{shutdown,
2024-04-26 16:11:04 {failed_to_start_child,on_load,
2024-04-26 16:11:04 {on_load_function_failed,
2024-04-26 16:11:04 'Elixir.Membrane.RTMP.Sink.Native.Nif',abort}}},
2024-04-26 16:11:04 {kernel,start,[normal,[]]}}
2024-04-26 16:11:04 type: permanent
2024-04-26 16:11:04
2024-04-26 16:11:05 Kernel pid terminated (application_controller) ("{application_start_failure,kernel,{{shutdown,{failed_to_start_child,on_load,{on_load_function_failed,'Elixir.Membrane.RTMP.Sink.Native.Nif',abort}}},{kernel,start,[normal,[]]}}}")
2024-04-26 16:11:05
2024-04-26 16:11:05 Crash dump is being written to: erl_crash.dump...done
I've seen similar kind of error related to bundlex in this group, however I am not using Bundlex and it seems to be another kind of error.
Mateusz Front
Mateusz Front•2y ago
membrane_rtmp_plugin uses bundlex under the hood. What image are you using? Are there any warnings from building the rtmp plugin?
oleg.okunevych
oleg.okunevychOP•2y ago
thanks for quick answer 🙂
membrane_rtmp_plugin uses bundlex under the hood.
membrane_rtmp_plugin uses bundlex under the hood.
Does it mean that BundlexProject module is required to be configured in the application? I am using elixir:1.16.2-otp-26-alpine image. There are no warnings when building rtmp plugin:
#24 149.7 ==> membrane_rtmp_plugin
#24 149.7 Bundlex: Building natives: rtmp_sink
#24 149.9 Compiling 38 files (.ex)
#24 150.3 Generated membrane_rtmp_plugin app
#24 149.7 ==> membrane_rtmp_plugin
#24 149.7 Bundlex: Building natives: rtmp_sink
#24 149.9 Compiling 38 files (.ex)
#24 150.3 Generated membrane_rtmp_plugin app
Mateusz Front
Mateusz Front•2y ago
Does it mean that BundlexProject module is required to be configured in the application?
No
I am using elixir:1.16.2-otp-26-alpine image
For Alpine and other systems that use MUSL instead of GLIBC, we unfortunately don't provide precompiled C deps, so you need to manually install them in the system or use a different image, for example debian-based. See https://github.com/membraneframework/membrane_rtmp_plugin?tab=readme-ov-file#manual-instalation-of-dependencies
GitHub
GitHub - membraneframework/membrane_rtmp_plugin: RTMP server & client
RTMP server & client. Contribute to membraneframework/membrane_rtmp_plugin development by creating an account on GitHub.
Mateusz Front
Mateusz Front•2y ago
That's weird you don't get any warnings though 🤔
oleg.okunevych
oleg.okunevychOP•2y ago
for build stage following libs are used:
RUN \
apk add --no-cache \
build-base \
git \
npm \
make \
cmake \
openssl-dev \
libsrtp-dev \
libsrt-dev \
ffmpeg-dev \
fdk-aac-dev \
opus-dev \
openssh-client \
ca-certificates \
curl
RUN \
apk add --no-cache \
build-base \
git \
npm \
make \
cmake \
openssl-dev \
libsrtp-dev \
libsrt-dev \
ffmpeg-dev \
fdk-aac-dev \
opus-dev \
openssh-client \
ca-certificates \
curl
for app stage we have:
RUN \
apk add --no-cache \
libstdc++6 \
openssl \
libsrtp \
ffmpeg \
fdk-aac \
opus \
openssh-client \
curl \
ncurses \
mesa \
mesa-dri-gallium \
mesa-dev
RUN \
apk add --no-cache \
libstdc++6 \
openssl \
libsrtp \
ffmpeg \
fdk-aac \
opus \
openssh-client \
curl \
ncurses \
mesa \
mesa-dri-gallium \
mesa-dev
Mateusz Front
Mateusz Front•2y ago
possibly you need ffmpeg-dev for the app stage as well? not sure what apk installs
oleg.okunevych
oleg.okunevychOP•2y ago
still the same results. What other Docker image would you suggest to try?
Mateusz Front
Mateusz Front•2y ago
you can try the same name but without the alpine suffix
oleg.okunevych
oleg.okunevychOP•2y ago
I think I found the problem, error dissapeared after updating app alpine image from alpine:3.17 to alpine:3.18.5 Thank you for help!

Did you find this page helpful?