giuseppe99barchetta / SuggestArr

Effortlessly request recommended movies, TV shows and anime to Jellyseer/Overseer based on your recently watched content on Jellyfin, Plex or Emby—let SuggestArr handle it all automatically, keeping your library fresh with new and exciting content!
MIT License
227 stars 2 forks source link

[BUG] #83

Closed jphaupt93 closed 3 weeks ago

jphaupt93 commented 1 month ago

Running via docker-compose on Ubuntu 20.04.6/Docker Compose version v2.27.0 and running into an error where the container launches but the webpage only returns "Internal Server Error". Ensured the directory I am mounting to the /app/config/config_files volume was created and opened up permissions on it to see if that would make a difference but no luck.

Snippet of docker-compose and logs included below, any help would be greatly appreciated!

Portion of my docker-compose.yml for the suggestarr container:

version: "3.7"

networks:
  docker_default:
    external:
      name: docker_default
services:
  suggestarr:
    image: ciuse99/suggestarr:latest
    container_name: suggestarr
    hostname: suggestarr
    restart: unless-stopped
    networks:
      - docker_default
    ports:
      - "5000:5000"
    volumes:
      - /opt/docker/suggestarr/config_files:/app/config/config_files

Log showing error after successfully launching the container and then trying to load the Suggestarr webpage:

suggestarr  | 2024-11-01 21:19:21,372 CRIT Supervisor is running as root.  Privileges were not dropped because no user is specified in the config file.  If you intend to run as root, you can set user=root in the config file to avoid this message.
suggestarr  | 2024-11-01 21:19:21,373 INFO supervisord started with pid 1
suggestarr  | 2024-11-01 21:19:22,377 INFO spawned: 'cron' with pid 6
suggestarr  | 2024-11-01 21:19:22,382 INFO spawned: 'uvicorn' with pid 7
suggestarr  | 2024-11-01 21:19:22,958 - api_service.utils.utils - INFO - 
suggestarr  |         
suggestarr  |         =====================================================================================
suggestarr  |         |   Welcome to the SuggestArr Application!                                          |
suggestarr  |         |   Manage your settings through the web interface at: http://localhost:5000        |
suggestarr  |         |   Fill in the input fields with your data and let the cron job handle the rest!   |
suggestarr  |         |   To run the automation process immediately, click the 'Force Run' button.        |
suggestarr  |         |   The 'Force Run' button will appear only after you save your settings.           |
suggestarr  |         |   To leave feedback visit: https://github.com/giuseppe99barchetta/SuggestArr      |
suggestarr  |         =====================================================================================
suggestarr  |         
suggestarr  | 2024-11-01 21:19:23,959 INFO success: cron entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
suggestarr  | 2024-11-01 21:19:23,959 INFO success: uvicorn entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
suggestarr  | ERROR:    Exception in ASGI application
suggestarr  | Traceback (most recent call last):
suggestarr  |   File "/usr/local/lib/python3.13/site-packages/uvicorn/protocols/http/h11_impl.py", line 406, in run_asgi
suggestarr  |     result = await app(  # type: ignore[func-returns-value]
suggestarr  |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
suggestarr  |         self.scope, self.receive, self.send
suggestarr  |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
suggestarr  |     )
suggestarr  |     ^
suggestarr  |   File "/usr/local/lib/python3.13/site-packages/uvicorn/middleware/proxy_headers.py", line 60, in __call__
suggestarr  |     return await self.app(scope, receive, send)
suggestarr  |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
suggestarr  |   File "/usr/local/lib/python3.13/site-packages/asgiref/wsgi.py", line 21, in __call__
suggestarr  |     await WsgiToAsgiInstance(self.wsgi_application)(scope, receive, send)
suggestarr  |   File "/usr/local/lib/python3.13/site-packages/asgiref/wsgi.py", line 51, in __call__
suggestarr  |     await self.run_wsgi_app(body)
suggestarr  |   File "/usr/local/lib/python3.13/site-packages/asgiref/sync.py", line 455, in __call__
suggestarr  |     exec_coro = loop.run_in_executor(
suggestarr  |         executor,
suggestarr  |     ...<7 lines>...
suggestarr  |         ),
suggestarr  |     )
suggestarr  |   File "/usr/local/lib/python3.13/asyncio/base_events.py", line 897, in run_in_executor
suggestarr  |     executor.submit(func, *args), loop=self)
suggestarr  |     ~~~~~~~~~~~~~~~^^^^^^^^^^^^^
suggestarr  |   File "/usr/local/lib/python3.13/concurrent/futures/thread.py", line 179, in submit
suggestarr  |     self._adjust_thread_count()
suggestarr  |     ~~~~~~~~~~~~~~~~~~~~~~~~~^^
suggestarr  |   File "/usr/local/lib/python3.13/concurrent/futures/thread.py", line 202, in _adjust_thread_count
suggestarr  |     t.start()
suggestarr  |     ~~~~~~~^^
suggestarr  |   File "/usr/local/lib/python3.13/threading.py", line 973, in start
suggestarr  |     _start_joinable_thread(self._bootstrap, handle=self._handle,
suggestarr  |     ~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
suggestarr  |                            daemon=self.daemon)
suggestarr  |                            ^^^^^^^^^^^^^^^^^^^
suggestarr  | RuntimeError: can't start new thread
suggestarr  | ERROR:    Exception in ASGI application
suggestarr  | Traceback (most recent call last):
suggestarr  |   File "/usr/local/lib/python3.13/site-packages/uvicorn/protocols/http/h11_impl.py", line 406, in run_asgi
suggestarr  |     result = await app(  # type: ignore[func-returns-value]
suggestarr  |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
suggestarr  |         self.scope, self.receive, self.send
suggestarr  |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
suggestarr  |     )
suggestarr  |     ^
suggestarr  |   File "/usr/local/lib/python3.13/site-packages/uvicorn/middleware/proxy_headers.py", line 60, in __call__
suggestarr  |     return await self.app(scope, receive, send)
suggestarr  |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
suggestarr  |   File "/usr/local/lib/python3.13/site-packages/asgiref/wsgi.py", line 21, in __call__
suggestarr  |     await WsgiToAsgiInstance(self.wsgi_application)(scope, receive, send)
suggestarr  |   File "/usr/local/lib/python3.13/site-packages/asgiref/wsgi.py", line 51, in __call__
suggestarr  |     await self.run_wsgi_app(body)
suggestarr  |   File "/usr/local/lib/python3.13/site-packages/asgiref/sync.py", line 455, in __call__
suggestarr  |     exec_coro = loop.run_in_executor(
suggestarr  |         executor,
suggestarr  |     ...<7 lines>...
suggestarr  |         ),
suggestarr  |     )
suggestarr  |   File "/usr/local/lib/python3.13/asyncio/base_events.py", line 897, in run_in_executor
suggestarr  |     executor.submit(func, *args), loop=self)
suggestarr  |     ~~~~~~~~~~~~~~~^^^^^^^^^^^^^
suggestarr  |   File "/usr/local/lib/python3.13/concurrent/futures/thread.py", line 179, in submit
suggestarr  |     self._adjust_thread_count()
suggestarr  |     ~~~~~~~~~~~~~~~~~~~~~~~~~^^
suggestarr  |   File "/usr/local/lib/python3.13/concurrent/futures/thread.py", line 202, in _adjust_thread_count
suggestarr  |     t.start()
suggestarr  |     ~~~~~~~^^
suggestarr  |   File "/usr/local/lib/python3.13/threading.py", line 973, in start
suggestarr  |     _start_joinable_thread(self._bootstrap, handle=self._handle,
suggestarr  |     ~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
suggestarr  |                            daemon=self.daemon)
suggestarr  |                            ^^^^^^^^^^^^^^^^^^^
suggestarr  | RuntimeError: can't start new thread
giuseppe99barchetta commented 4 weeks ago

Hi! Thank you for opening the issue! Have you tried with older versions or with the nightly tag?

vahtos commented 4 weeks ago

@jphaupt93 What is the output of docker version?

@giuseppe99barchetta I believe this may be related to using an older version of Docker on the host while using an image with a newer version of glibc. See https://stackoverflow.com/questions/70087344/python-in-docker-runtimeerror-cant-start-new-thread

jphaupt93 commented 3 weeks ago

@jphaupt93 What is the output of docker version?

@giuseppe99barchetta I believe this may be related to using an older version of Docker on the host while using an image with a newer version of glibc. See https://stackoverflow.com/questions/70087344/python-in-docker-runtimeerror-cant-start-new-thread

Ah that was definitely the issue, updating Docker Engine to the latest version resolved. Thanks for the quick reply.