homebridge / docker-homebridge

Homebridge Docker. HomeKit support for the impatient using Docker on x86_64, Raspberry Pi (armhf) and ARM64. Includes ffmpeg + libfdk-aac.
https://hub.docker.com/r/homebridge/homebridge/
GNU General Public License v3.0
2.57k stars 241 forks source link

Node errors in logs when starting container with Portainer #550

Closed Uneven-Pigeon closed 3 months ago

Uneven-Pigeon commented 5 months ago

Describe The Bug

In the process of transitioning from oznu/homebridge:latest to homebridge/homebridge:ubuntu I ran into an issue with homebridge app page not appearing. When starting the container as a new stack in Portainer, the stack reports good, but page fails to come up. Examining the logs indicates a node/assertion error.

After some browsing on google and reddit, it seems that it can be "temporarily fixed" by setting the container in "privileged" mode, which makes it work, but also makes it insecure/unsafe. Note the commented out privileged: true in attached docker config. If I was to uncomment it, the stack starts successfully and web page comes up.

Docker Config

version: '3'
services:
  homebridge:
    image: homebridge/homebridge:ubuntu
    container_name: homebridge_2
    restart: always
    network_mode: host
    # privileged: true
    environment:
      - HOMEBRIDGE_CONFIG_UI_PORT=8581
      - HOMEBRIDGE_CONFIG_UI=1
      - TZ=America/Chicago
    volumes:
      - /srv/HomeBridge2:/homebridge

Logs

1: 0xb95b60 node::Abort() [/opt/homebridge/bin/node]
 2: 0xb95bde  [/opt/homebridge/bin/node]
 3: 0xc0447e  [/opt/homebridge/bin/node]
 4: 0xc04561 node::NodePlatform::NodePlatform(int, v8::TracingController*, v8::PageAllocator*) [/opt/homebridge/bin/node]
 5: 0xb50e03 node::InitializeOncePerProcess(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&, node::ProcessFlags::Flags) [/opt/homebridge/bin/node]
 6: 0xb5145b node::Start(int, char**) [/opt/homebridge/bin/node]
 7: 0x7eff3d379d90  [/lib/x86_64-linux-gnu/libc.so.6]
 8: 0x7eff3d379e40 __libc_start_main [/lib/x86_64-linux-gnu/libc.so.6]
 9: 0xacfdce _start [/opt/homebridge/bin/node]
/opt/homebridge/bin/node[126]: ../src/node_platform.cc:68:std::unique_ptr<long unsigned int> node::WorkerThreadsTaskRunner::DelayedTaskScheduler::Start(): Assertion `(0) == (uv_thread_create(t.get(), start_thread, this))' failed.
 1: 0xb95b60 node::Abort() [/opt/homebridge/bin/node]
 2: 0xb95bde  [/opt/homebridge/bin/node]
 3: 0xc0447e  [/opt/homebridge/bin/node]
 4: 0xc04561 node::NodePlatform::NodePlatform(int, v8::TracingController*, v8::PageAllocator*) [/opt/homebridge/bin/node]
 5: 0xb50e03 node::InitializeOncePerProcess(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&, node::ProcessFlags::Flags) [/opt/homebridge/bin/node]
 6: 0xb5145b node::Start(int, char**) [/opt/homebridge/bin/node]
 7: 0x7f2a2fdc6d90  [/lib/x86_64-linux-gnu/libc.so.6]
 8: 0x7f2a2fdc6e40 __libc_start_main [/lib/x86_64-linux-gnu/libc.so.6]
 9: 0xacfdce _start [/opt/homebridge/bin/node]
/opt/homebridge/bin/node[130]: ../src/node_platform.cc:68:std::unique_ptr<long unsigned int> node::WorkerThreadsTaskRunner::DelayedTaskScheduler::Start(): Assertion `(0) == (uv_thread_create(t.get(), start_thread, this))' failed.
 1: 0xb95b60 node::Abort() [/opt/homebridge/bin/node]
 2: 0xb95bde  [/opt/homebridge/bin/node]
 3: 0xc0447e  [/opt/homebridge/bin/node]
 4: 0xc04561 node::NodePlatform::NodePlatform(int, v8::TracingController*, v8::PageAllocator*) [/opt/homebridge/bin/node]
 5: 0xb50e03 node::InitializeOncePerProcess(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&, node::ProcessFlags::Flags) [/opt/homebridge/bin/node]
 6: 0xb5145b node::Start(int, char**) [/opt/homebridge/bin/node]
 7: 0x7f3d9d28dd90  [/lib/x86_64-linux-gnu/libc.so.6]
 8: 0x7f3d9d28de40 __libc_start_main [/lib/x86_64-linux-gnu/libc.so.6]
 9: 0xacfdce _start [/opt/homebridge/bin/node]
/opt/homebridge/bin/node[134]: ../src/node_platform.cc:68:std::unique_ptr<long unsigned int> node::WorkerThreadsTaskRunner::DelayedTaskScheduler::Start(): Assertion `(0) == (uv_thread_create(t.get(), start_thread, this))' failed.
 1: 0xb95b60 node::Abort() [/opt/homebridge/bin/node]
 2: 0xb95bde  [/opt/homebridge/bin/node]
 3: 0xc0447e  [/opt/homebridge/bin/node]
 4: 0xc04561 node::NodePlatform::NodePlatform(int, v8::TracingController*, v8::PageAllocator*) [/opt/homebridge/bin/node]
 5: 0xb50e03 node::InitializeOncePerProcess(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&, node::ProcessFlags::Flags) [/opt/homebridge/bin/node]
 6: 0xb5145b node::Start(int, char**) [/opt/homebridge/bin/node]
 7: 0x7fd03a684d90  [/lib/x86_64-linux-gnu/libc.so.6]
 8: 0x7fd03a684e40 __libc_start_main [/lib/x86_64-linux-gnu/libc.so.6]
 9: 0xacfdce _start [/opt/homebridge/bin/node]
/opt/homebridge/bin/node[138]: ../src/node_platform.cc:68:std::unique_ptr<long unsigned int> node::WorkerThreadsTaskRunner::DelayedTaskScheduler::Start(): Assertion `(0) == (uv_thread_create(t.get(), start_thread, this))' failed.
 1: 0xb95b60 node::Abort() [/opt/homebridge/bin/node]
 2: 0xb95bde  [/opt/homebridge/bin/node]
 3: 0xc0447e  [/opt/homebridge/bin/node]
 4: 0xc04561 node::NodePlatform::NodePlatform(int, v8::TracingController*, v8::PageAllocator*) [/opt/homebridge/bin/node]
 5: 0xb50e03 node::InitializeOncePerProcess(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&, node::ProcessFlags::Flags) [/opt/homebridge/bin/node]
 6: 0xb5145b node::Start(int, char**) [/opt/homebridge/bin/node]
 7: 0x7fe48eaa3d90  [/lib/x86_64-linux-gnu/libc.so.6]
 8: 0x7fe48eaa3e40 __libc_start_main [/lib/x86_64-linux-gnu/libc.so.6]
 9: 0xacfdce _start [/opt/homebridge/bin/node]
/opt/homebridge/bin/node[142]: ../src/node_platform.cc:68:std::unique_ptr<long unsigned int> node::WorkerThreadsTaskRunner::DelayedTaskScheduler::Start(): Assertion `(0) == (uv_thread_create(t.get(), start_thread, this))' failed.
 1: 0xb95b60 node::Abort() [/opt/homebridge/bin/node]
 2: 0xb95bde  [/opt/homebridge/bin/node]
 3: 0xc0447e  [/opt/homebridge/bin/node]
 4: 0xc04561 node::NodePlatform::NodePlatform(int, v8::TracingController*, v8::PageAllocator*) [/opt/homebridge/bin/node]
 5: 0xb50e03 node::InitializeOncePerProcess(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&, node::ProcessFlags::Flags) [/opt/homebridge/bin/node]
 6: 0xb5145b node::Start(int, char**) [/opt/homebridge/bin/node]
 7: 0x7f46ac359d90  [/lib/x86_64-linux-gnu/libc.so.6]
 8: 0x7f46ac359e40 __libc_start_main [/lib/x86_64-linux-gnu/libc.so.6]
 9: 0xacfdce _start [/opt/homebridge/bin/node]
/opt/homebridge/bin/node[146]: ../src/node_platform.cc:68:std::unique_ptr<long unsigned int> node::WorkerThreadsTaskRunner::DelayedTaskScheduler::Start(): Assertion `(0) == (uv_thread_create(t.get(), start_thread, this))' failed.

Host Operating System

Ubuntu / Debian (or a variant)

Host Architecture

x86_64 / amd64

github-actions[bot] commented 4 months ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

github-actions[bot] commented 3 months ago

This issue has been closed as no further activity has occurred.