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

Unhandled Exception rises after few seconds, server closes - starting after version V1.5.0-LS280 #149

Open
1 task done
hexenbane opened this issue Dec 28, 2024 · 5 comments

Comments

@hexenbane
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

after version V1.5.0-LS280 the container starts, but then after a few seconds the following error arises, server is not accessible but the container keeps running:

2024-12-27 22:58:17,404 - root (7903b5e4bb28) : ERROR (server:73) - BAZARR cannot start because of unhandled exception.
self.server.close()

Expected Behavior

Webserver accessible after container running

Steps To Reproduce

after running a few seconds the webserver closes, permissions on volumes are unchanged, the error disappears on version LS280, after this version the same error appears

Environment

- OS:Ubuntu 24.04
- How docker service was installed: official repositories with official guide

CPU architecture

x86-64

Docker creation

compose file if needed:
services:
  bazarr:
    container_name: "bazarr"
    environment:
      - "PUID=1000"
      - "PGID=1000"
      - "TZ=Etc/UTC"
    image: "ghcr.io/linuxserver/bazarr:latest"
    ports:
      - "6767:6767"
    restart: "unless-stopped"
    volumes:
      - "/data/movies:/movies"
      - "/data/series:/tv"
      - "/data/docker_configs/bazarr/config:/config"

Container logs

[migrations] started
[migrations] no migrations found
───────────────────────────────────────
      ██╗     ███████╗██╗ ██████╗
      ██║     ██╔════╝██║██╔═══██╗
      ██║     ███████╗██║██║   ██║
      ██║     ╚════██║██║██║   ██║
      ███████╗███████║██║╚██████╔╝
      ╚══════╝╚══════╝╚═╝ ╚═════╝
   Brought to you by linuxserver.io
───────────────────────────────────────
To support the app dev(s) visit:
Bazarr: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=XHHRWXT9YB7WE&source=url
To support LSIO projects visit:
https://www.linuxserver.io/donate/
───────────────────────────────────────
GID/UID
───────────────────────────────────────
User UID:    1000
User GID:    1000
───────────────────────────────────────
Linuxserver.io version: v1.5.0-ls284
Build-date: 2024-12-25T22:17:44+00:00
───────────────────────────────────────
    
[custom-init] No custom files found, skipping...
2024-12-27 22:58:17,404 - root                             (7903b5e4bb28) :  ERROR (server:73) - BAZARR cannot start because of unhandled exception.
Closing database...
Closing webserver...
Traceback (most recent call last):
  File "/app/bazarr/bin/bazarr/app/server.py", line 46, in configure_server
    self.server = create_server(app,
                  ^^^^^^^^^^^^^^^^^^
  File "/app/bazarr/bin/bazarr/../libs/waitress/server.py", line 78, in create_server
    last_serv = TcpWSGIServer(
                ^^^^^^^^^^^^^^
  File "/app/bazarr/bin/bazarr/../libs/waitress/server.py", line 243, in __init__
    self.bind_server_socket()
  File "/app/bazarr/bin/bazarr/../libs/waitress/server.py", line 364, in bind_server_socket
    self.bind(sockaddr)
  File "/app/bazarr/bin/bazarr/../libs/waitress/wasyncore.py", line 395, in bind
    return self.socket.bind(addr)
           ^^^^^^^^^^^^^^^^^^^^^^
OSError: [Errno 99] Address not available
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
  File "/app/bazarr/bin/bazarr/main.py", line 43, in <module>
    from app.server import webserver, app  # noqa E402
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/bazarr/bin/bazarr/app/server.py", line 108, in <module>
    webserver = Server()
                ^^^^^^^^
  File "/app/bazarr/bin/bazarr/app/server.py", line 42, in __init__
    self.configure_server()
  File "/app/bazarr/bin/bazarr/app/server.py", line 74, in configure_server
    self.shutdown()
  File "/app/bazarr/bin/bazarr/app/server.py", line 100, in shutdown
    self.close_all()
  File "/app/bazarr/bin/bazarr/app/server.py", line 97, in close_all
    self.server.close()
    ^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'close'
Copy link

Thanks for opening your first issue here! Be sure to follow the relevant issue templates, or risk having this issue marked as invalid.

@marapavelka
Copy link

I have the same problem. The last two versions v1.5.0-ls283 and v1.5.0-ls284 don't work, I had to revert to v1.4.5-ls282.

@brycied00d
Copy link

v1.5.0-ls284 is working fine for me. The exception (OSError: [Errno 99] Address not available) suggests that the issue may be rooted in your configuration (bazarr's config.yaml), or something unique to your system(s).

  • What value do you have set for general.ip? Mine's ip: 0.0.0.0 which, as far as I know, is the default.
  • If you start a new container with an empty /config folder, or just edit your docker-compose.yml to use a new directory, e.g. test-dir:/config, causing bazarr to start with an empty/default configuration, is it able to start and respond? This would confirm that the issue is unique to your config.yaml.

@marapavelka
Copy link

In Settings > General > Host > Address I had the IP address of my server. When I changed it to an asterisk in v1.4.5-ls282, it now works in v1.5.0-ls284. Thanks @brycied00d for pointing me in the right direction :)

@hexenbane
Copy link
Author

I can confirm that was the issue. The IP address in the config was not set to 0.0.0.0, but my internal servers' IPs were.

You have to let the container recreate the config file and then copy and paste your Providers, Radarr, and Sonarr, to make it work and keep everything intact.

Thanks!

[migrations] started
[migrations] no migrations found
───────────────────────────────────────
██╗ ███████╗██╗ ██████╗
██║ ██╔════╝██║██╔═══██╗
██║ ███████╗██║██║ ██║
██║ ╚════██║██║██║ ██║
███████╗███████║██║╚██████╔╝
╚══════╝╚══════╝╚═╝ ╚═════╝
Brought to you by linuxserver.io
───────────────────────────────────────
To support the app dev(s) visit:
Bazarr: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=XHHRWXT9YB7WE&source=url
To support LSIO projects visit:
https://www.linuxserver.io/donate/
───────────────────────────────────────
GID/UID
───────────────────────────────────────
User UID: 1000
User GID: 1000
───────────────────────────────────────
Linuxserver.io version: v1.5.0-ls284
Build-date: 2024-12-25T22:17:44+00:00
───────────────────────────────────────

[custom-init] No custom files found, skipping...
Connection to localhost (127.0.0.1) 6767 port [tcp/*] succeeded!
[ls.io-init] done.
2024-12-29 12:55:33,821 - waitress (72c15be5db28) : INFO (wasyncore:485) - BAZARR is started and waiting for requests on: http://0.0.0.0:6767
2024-12-29 12:55:33,836 - root (72c124a1cb30) : INFO (signalr_client:189) - BAZARR trying to connect to Radarr SignalR feed...
2024-12-29 12:55:33,840 - root (72c124e1cb30) : INFO (signalr_client:122) - BAZARR trying to connect to Sonarr SignalR feed...
2024-12-29 12:55:33,863 - root (72c124a1cb30) : INFO (signalr_client:150) - BAZARR SignalR client for Sonarr is connected and waiting for events.
2024-12-29 12:55:33,883 - root (72c12461cb30) : INFO (signalr_client:217) - BAZARR SignalR client for Radarr is connected and waiting for events.

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

No branches or pull requests

3 participants