Octoprint stuck in "Starting Up" mode from new docker install

What is the problem?

I have installed the latest docker image on an RPI 3B from where I used to run an older docker image from 12 months ago. I've installed from scratch as doing a straight pull/upgrade didn't work.

I have a RPI camera directly connected and an additional docker image running MJPG Streamer (which I can access)

I have an Ender3 V2 connected via USB running mriscoc Professional Firmware which I have connected with using older octoprint in the past

UI shows "Octoprint is still starting up".... forever

What did you already try to solve it?

  • I have tried upgrading from old image (no longer available)
  • I have tried building from scratch (dockerhub)
  • I have tried building from bleeding image (dev)
  • I have tried commenting out camera references
  • I have tried using local volume rather than network attached
  • I have tried translating to port 5000 instead of 80
  • I have tried running as root or pi user

Have you tried running in safe mode?

Octoprint kicks into safe mode when I recreate image with updates to docker-compose.yml over existing volume and still doesn't work.

LOG File is something I cannot decipher or find online other than it throwing an exception.

[s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] 01-mjpg-streamer-config: executing... 
[cont-init.d] 01-mjpg-streamer-config: exited 0.
[cont-init.d] v3-dir-structure-check: executing... 
[cont-init.d] v3-dir-structure-check: exited 0.
[cont-init.d] done.
[services.d] starting services
[services.d] done.
MJPG Streamer Version.: 2.0
 i: Using V4L2 device.: /dev/video0
 i: Desired Resolution: 640 x 480
 i: Frames Per Second.: -1
 i: Format............: JPEG
 i: TV-Norm...........: DEFAULT
 o: www-folder-path......: /usr/local/share/mjpg-streamer/www/
 o: HTTP TCP port........: 8080
 o: HTTP Listen Address..: (null)
 o: username:password....: disabled
 o: commands.............: enabled
[WARNING] 337/053230 (223) : Failed to setup watchdog timer for thread 1, disabling lockup detection.
[WARNING] 337/053230 (223) : Failed to setup watchdog timer for thread 2, disabling lockup detection.
[WARNING] 337/053230 (223) : Failed to setup watchdog timer for thread 0, disabling lockup detection.
libv4l2: error turning on stream: Invalid argument
Unable to start capture: Invalid argument
 i: Can't enable video in first time
 i: cleaning up resources allocated by input thread
[WARNING] 337/053230 (223) : Failed to setup watchdog timer for thread 3, disabling lockup detection.
2023-12-04 05:32:33,889 - octoprint.startup - INFO - ******************************************************************************
2023-12-04 05:32:33,892 - octoprint.startup - INFO - Starting OctoPrint 1.9.3
2023-12-04 05:32:33,893 - octoprint.startup - INFO - Starting in SAFE MODE. Third party plugins will be disabled!
2023-12-04 05:32:33,893 - octoprint.startup - INFO - Reason for safe mode: problem during last startup
2023-12-04 05:32:33,893 - octoprint.startup - INFO - ******************************************************************************
2023-12-04 05:32:34,632 - octoprint.util.connectivity.connectivity_checker - INFO - Connectivity state is currently: online
2023-12-04 05:32:34,632 - octoprint.util.connectivity.connectivity_checker - INFO - Connecting to 1.1.1.1:53 is working
2023-12-04 05:32:34,633 - octoprint.util.connectivity.connectivity_checker - INFO - Resolving octoprint.org is working
2023-12-04 05:32:34,653 - octoprint.plugin.core - INFO - Loading plugins from /usr/local/lib/python3.10/site-packages/octoprint/plugins, /octoprint/octoprint/plugins and installed plugin packages...
2023-12-04 05:32:39,033 - octoprint.plugin.core - INFO - Plugin Pi Support Plugin (2023.10.10) did not pass check, not loading.
2023-12-04 05:32:39,282 - octoprint.plugin.core - INFO - Found 18 plugin(s) providing 18 mixin implementations, 34 hook handlers
2023-12-04 05:32:39,353 - octoprint.server.heartbeat - INFO - Starting server heartbeat, 900.0s interval
2023-12-04 05:32:39,708 - octoprint.server - INFO - Intermediary server started
2023-12-04 05:32:39,775 - octoprint.filemanager.storage - INFO - Initializing the file metadata for /octoprint/octoprint/uploads...
2023-12-04 05:32:39,780 - octoprint.filemanager.storage - INFO - ... file metadata for /octoprint/octoprint/uploads initialized successfully.
2023-12-04 05:32:39,790 - octoprint.server - INFO - Added new permission from plugin action_command_notification: PLUGIN_ACTION_COMMAND_NOTIFICATION_SHOW (needs: "Need(method='role', value='plugin_action_command_notification_show')")
2023-12-04 05:32:39,791 - octoprint.server - INFO - Added new permission from plugin action_command_notification: PLUGIN_ACTION_COMMAND_NOTIFICATION_CLEAR (needs: "Need(method='role', value='plugin_action_command_notification_clear')")
2023-12-04 05:32:39,791 - octoprint.server - INFO - Added new permission from plugin action_command_prompt: PLUGIN_ACTION_COMMAND_PROMPT_INTERACT (needs: "Need(method='role', value='plugin_action_command_prompt_interact')")
2023-12-04 05:32:39,792 - octoprint.server - INFO - Added new permission from plugin announcements: PLUGIN_ANNOUNCEMENTS_READ (needs: "Need(method='role', value='plugin_announcements_read')")
2023-12-04 05:32:39,793 - octoprint.server - INFO - Added new permission from plugin announcements: PLUGIN_ANNOUNCEMENTS_MANAGE (needs: "Need(method='role', value='plugin_announcements_manage'), Need(method='role', value='plugin_announcements_read')")
127.0.0.1 - - [04/Dec/2023 05:32:39] "GET /online.gif?_=1701667935394 HTTP/1.1" 404 -
2023-12-04 05:32:39,794 - octoprint.server - INFO - Added new permission from plugin appkeys: PLUGIN_APPKEYS_ADMIN (needs: "Need(method='role', value='plugin_appkeys_admin')")
2023-12-04 05:32:39,795 - octoprint.server - INFO - Added new permission from plugin appkeys: PLUGIN_APPKEYS_GRANT (needs: "Need(method='role', value='plugin_appkeys_user')")
2023-12-04 05:32:39,795 - octoprint.server - INFO - Added new permission from plugin backup: PLUGIN_BACKUP_ACCESS (needs: "Need(method='role', value='plugin_backup_access')")
2023-12-04 05:32:39,844 - octoprint.server - INFO - Added new permission from plugin firmware_check: PLUGIN_FIRMWARE_CHECK_DISPLAY (needs: "Need(method='role', value='plugin_firmware_check_display')")
2023-12-04 05:32:39,850 - octoprint.server - INFO - Added new permission from plugin logging: PLUGIN_LOGGING_MANAGE (needs: "Need(method='role', value='plugin_logging_manage')")
2023-12-04 05:32:39,853 - octoprint.server - INFO - Added new permission from plugin pluginmanager: PLUGIN_PLUGINMANAGER_LIST (needs: "Need(method='role', value='plugin_pluginmanager_list')")
2023-12-04 05:32:39,856 - octoprint.server - INFO - Added new permission from plugin pluginmanager: PLUGIN_PLUGINMANAGER_MANAGE (needs: "Need(method='role', value='plugin_pluginmanager_manage')")2023-12-04 05:32:39,859 - octoprint.server - INFO - Added new permission from plugin pluginmanager: PLUGIN_PLUGINMANAGER_INSTALL (needs: "Need(method='role', value='plugin_pluginmanager_install'), Need(method='role', value='plugin_pluginmanager_manage')")
2023-12-04 05:32:39,865 - octoprint.server - INFO - Added new permission from plugin softwareupdate: PLUGIN_SOFTWAREUPDATE_CHECK (needs: "Need(method='role', value='plugin_softwareupdate_check')")
2023-12-04 05:32:39,867 - octoprint.server - INFO - Added new permission from plugin softwareupdate: PLUGIN_SOFTWAREUPDATE_UPDATE (needs: "Need(method='role', value='plugin_softwareupdate_update')")
2023-12-04 05:32:39,870 - octoprint.server - INFO - Added new permission from plugin softwareupdate: PLUGIN_SOFTWAREUPDATE_CONFIGURE (needs: "Need(method='role', value='plugin_softwareupdate_configure')")
127.0.0.1 - - [04/Dec/2023 05:32:40] "GET /intermediary.gif?_=1701667936961 HTTP/1.1" 200 -
127.0.0.1 - - [04/Dec/2023 05:32:40] "GET /intermediary.gif?_=1701667939472 HTTP/1.1" 200 -
127.0.0.1 - - [04/Dec/2023 05:32:41] "GET /intermediary.gif?_=1701667939989 HTTP/1.1" 200 -
127.0.0.1 - - [04/Dec/2023 05:32:41] "GET /intermediary.gif?_=1701667940494 HTTP/1.1" 200 -
2023-12-04 05:32:42,074 - octoprint.util.pip - INFO - Using "/usr/local/bin/python -m pip" as command to invoke pip
127.0.0.1 - - [04/Dec/2023 05:32:42] "GET /intermediary.gif?_=1701667940999 HTTP/1.1" 200 -
127.0.0.1 - - [04/Dec/2023 05:32:42] "GET /intermediary.gif?_=1701667941517 HTTP/1.1" 200 -
127.0.0.1 - - [04/Dec/2023 05:32:43] "GET /intermediary.gif?_=1701667942011 HTTP/1.1" 200 -
127.0.0.1 - - [04/Dec/2023 05:32:43] "GET /intermediary.gif?_=1701667942534 HTTP/1.1" 200 -
2023-12-04 05:32:44,283 - octoprint.util.pip - INFO - Version of pip is 23.0.1
127.0.0.1 - - [04/Dec/2023 05:32:44] "GET /intermediary.gif?_=1701667943028 HTTP/1.1" 200 -
2023-12-04 05:32:44,750 - octoprint.util.pip - INFO - pip installs to /usr/local/lib/python3.10/site-packages (writable -> yes), --user flag needed -> no, virtual env -> no
2023-12-04 05:32:44,751 - octoprint.util.pip - INFO - ==> pip ok -> yes
Exception in thread Thread-11 (_run_loop):
Traceback (most recent call last):
  File "/usr/local/lib/python3.10/threading.py", line 1016, in _bootstrap_inner
    self.run()
  File "/usr/local/lib/python3.10/threading.py", line 953, in run
    self._target(*self._args, **self._kwargs)
  File "/usr/local/lib/python3.10/site-packages/zeroconf/_core.py", line 490, in _run_loop
    self.loop = asyncio.new_event_loop()
  File "/usr/local/lib/python3.10/asyncio/events.py", line 783, in new_event_loop
    return get_event_loop_policy().new_event_loop()
  File "/usr/local/lib/python3.10/asyncio/events.py", line 673, in new_event_loop
    return self._loop_factory()
  File "/usr/local/lib/python3.10/asyncio/unix_events.py", line 64, in __init__
    super().__init__(selector)
  File "/usr/local/lib/python3.10/asyncio/selector_events.py", line 50, in __init__
    super().__init__()
  File "/usr/local/lib/python3.10/asyncio/base_events.py", line 402, in __init__
    self._clock_resolution = time.get_clock_info('monotonic').resolution
PermissionError: [Errno 1] Operation not permitted
Exception ignored in: <function BaseEventLoop.__del__ at 0x757e84f0>
Traceback (most recent call last):
  File "/usr/local/lib/python3.10/asyncio/base_events.py", line 688, in __del__
    _warn(f"unclosed event loop {self!r}", ResourceWarning, source=self)
  File "/usr/local/lib/python3.10/asyncio/base_events.py", line 424, in __repr__
    f'closed={self.is_closed()} debug={self.get_debug()}>'
  File "/usr/local/lib/python3.10/asyncio/base_events.py", line 1928, in get_debug
    return self._debug
AttributeError: '_UnixSelectorEventLoop' object has no attribute '_debug'
127.0.0.1 - - [04/Dec/2023 05:32:44] "GET /intermediary.gif?_=1701667943555 HTTP/1.1" 200 -
127.0.0.1 - - [04/Dec/2023 05:32:45] "GET /intermediary.gif?_=1701667944059 HTTP/1.1" 200 -
127.0.0.1 - - [04/Dec/2023 05:32:45] "GET /intermediary.gif?_=1701667944578 HTTP/1.1" 200 -

Docker-compose.yml

version: '2.4'

services:
  octoprint:
    image: octoprint/octoprint
    restart: unless-stopped
    container_name: octoprint
    ports:
      - 5001:80
    devices:
    # use `python -m serial.tools.miniterm` to see what the name is of the printer, this requires pyserial
      - /dev/ttyUSB0:/dev/ttyUSB0
      - /dev/video0:/dev/video0
    volumes:
     - ./octoprint:/octoprint
    # uncomment the lines below to ensure camera streaming is enabled when
    # you add a video device
    environment:
      - ENABLE_MJPG_STREAMER=true

Can anyone help?

Have found issue on github as follows...

I have applied this temporary fix succesfully and am up and running again.

1 Like