Bazarr exception(s)

I’ve been at this for 12 hours now so i believe its time to get a fresh pair of eyes on this.

I recently built a computer that i run Proxmox VE on. There’s a VM where docker and portainer is running. Even though portainer is nice, i just use it to easily see statuses of the docker containers. I primarily just use docker-composer.yaml files, something im relatively new with.

docker-compose.yaml
services:
  gluetun:
    image: qmcgaw/gluetun
    container_name: Gluetun
    cap_add:
      - NET_ADMIN # Allow gluetun to manage network-related operations
    environment:
      - VPN_SERVICE_PROVIDER=nordvpn
      - VPN_TYPE=openvpn
      - OPENVPN_USER=m41bfiuzmda4x2s2ET33Nadw # this info is found on nordvpn.com
      - OPENVPN_PASSWORD=dGvucwPRY9THr6YmiybrDnYr
      - SERVER_COUNTRIES=Norway,Sweden,Finland
      - PUID=1001
      - PGID=1001
      - TZ=Europe/Oslo
      - UPDATER_PERIOD=48h
    ports:
      - "8888:8888/tcp"  # Gluetun HTTP proxy
      - "8388:8388/tcp"  # Gluetun Shadowsocks tcp
      - "8388:8388/udp"  # Gluetun Shadowsocks udp
      - "8080:8080/tcp" # qBittorrent Http
      - "6881:6881/tcp" # qBittorrent TCP
      - "6881:6881/udp" # qBittorrent UDP
    restart: unless-stopped
    volumes:
      - /mnt/docker/config/gluetun:/gluetun
    networks:
      - vpn_network

  flaresolverr:
    image: flaresolverr/flaresolverr:latest
    container_name: Flaresolverr
    ports:
      - "8191:8191/tcp"
    environment:
      - LOG_LEVEL=info
      - LOG_HTML=false
      - CAPTCHA_SOLVER=none
      - TZ=Europe/Oslo
    restart: unless-stopped
    networks:
      - arr_stack

  radarr:
    image: linuxserver/radarr
    container_name: Radarr
    ports:
      - "5001:7878/tcp" # Http
    environment:
      - PUID=1001
      - PGID=1001
      - TZ=Europe/Oslo
    volumes:
      - /mnt/docker/config/radarr:/config
      - /mnt/docker/data:/data
    restart: unless-stopped
    networks:
      - arr_stack

  sonarr:
    image: linuxserver/sonarr
    container_name: Sonarr
    ports:
      - "5002:8989/tcp" # Http
    environment:
      - PUID=1001
      - PGID=1001
      - TZ=Europe/Oslo
    volumes:
      - /mnt/docker/config/sonarr:/config
      - /mnt/docker/data:/data
    restart: unless-stopped
    networks:
      - arr_stack

  lidarr:
    image: linuxserver/lidarr
    container_name: Lidarr
    ports:
      - "5005:8686/tcp" # Http
    environment:
      - PUID=1001
      - PGID=1001
      - TZ=Europe/Oslo
    volumes:
      - /mnt/docker/config/lidarr:/config
      - /mnt/docker/data:/data
    restart: unless-stopped
    networks:
      - arr_stack

  prowlarr:
    image: linuxserver/prowlarr
    container_name: Prowlarr
    ports:
      - "5003:9696/tcp" # Http
    environment:
      - PUID=1001
      - PGID=1001
      - TZ=Europe/Oslo
    volumes:
      - /mnt/docker/config/prowlarr:/config
    restart: unless-stopped
    networks:
      - arr_stack

  bazarr:
    image: linuxserver/bazarr:latest
    container_name: Bazarr
    ports:
      - "5004:6767/tcp"
    environment:
      - PUID=1001
      - PGID=1001
      - TZ=Europe/Oslo
    volumes:
      - /mnt/docker/config/bazarr:/config
    restart: unless-stopped
    networks:
      - arr_stack

  qbittorrent:
    image: linuxserver/qbittorrent
    container_name: Qbittorrent
    environment:
      - PUID=1001
      - PGID=1001
      - TZ=Europe/Oslo
      - WEBUI_PORT=8080
      - TORRENTING_PORT=6881
    volumes:
      - /mnt/docker/config/qbittorrent:/config
      - /mnt/docker/data:/data
      - /mnt/docker/config/qbittorrent/downloads:/downloads
    network_mode: "service:gluetun"  # Routes qBittorrent traffic through Gluetun
    restart: unless-stopped

networks:
  arr_stack:
    driver: bridge
  arr_vpn:
    driver: bridge
  vpn_network:
    driver: bridge

The only container that I’ve really had some issues with is the Bazarr one. The other ones have been running butter smooth. Now, the data that the docker volumes are mapped to are not technically on the VM. I am running TrueNAS on another VM, from there i have a shared SMB folder where the volumes are mapped to. That has been made possible with cifs-utils (smb client), by mounting the SMB folder paths to the local paths of the VM.

I’m trying not to yap too much, but i think that is about all you need to know. Here’s the Bazarr logs:

Bazarr log

───────────────────────────────────────
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:    1001
User GID:    1001
───────────────────────────────────────
Linuxserver.io version: v1.4.4-ls268
Build-date: 2024-09-17T21:27:43+00:00
───────────────────────────────────────
    
[custom-init] No custom files found, skipping...
/app/bazarr/bin/bazarr/../custom_libs/subzero/language.py:165: SyntaxWarning: invalid escape sequence '\.'
  IETF_MATCH = ".+\.([^-.]+)(?:-[A-Za-z]+)?$"
/app/bazarr/bin/bazarr/../custom_libs/subzero/language.py:166: SyntaxWarning: invalid escape sequence '\.'
  ENDSWITH_LANGUAGECODE_RE = re.compile("\.([^-.]{2,3})(?:-[A-Za-z]{2,})?$")
/app/bazarr/bin/bazarr/../custom_libs/subzero/language.py:170: SyntaxWarning: invalid escape sequence '\.'
  language_match = re.match(".+\.([^\.]+)$" if not ietf
Traceback (most recent call last):
  File "/app/bazarr/bin/bazarr/../libs/sqlalchemy/engine/base.py", line 1960, in _exec_single_context
    self.dialect.do_execute(
  File "/app/bazarr/bin/bazarr/../libs/sqlalchemy/engine/default.py", line 924, in do_execute
    cursor.execute(statement, parameters)
sqlite3.OperationalError: database is locked
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
  File "/app/bazarr/bin/bazarr/main.py", line 22, in <module>
    from init import *  # noqa E402
    ^^^^^^^^^^^^^^^^^^
  File "/app/bazarr/bin/bazarr/init.py", line 219, in <module>
    init_db()
  File "/app/bazarr/bin/bazarr/app/database.py", line 302, in init_db
    metadata.create_all(engine)
  File "/app/bazarr/bin/bazarr/../libs/sqlalchemy/sql/schema.py", line 5825, in create_all
    bind._run_ddl_visitor(
  File "/app/bazarr/bin/bazarr/../libs/sqlalchemy/engine/base.py", line 3233, in _run_ddl_visitor
    conn._run_ddl_visitor(visitorcallable, element, **kwargs)
  File "/app/bazarr/bin/bazarr/../libs/sqlalchemy/engine/base.py", line 2439, in _run_ddl_visitor
    visitorcallable(self.dialect, self, **kwargs).traverse_single(element)
  File "/app/bazarr/bin/bazarr/../libs/sqlalchemy/sql/visitors.py", line 664, in traverse_single
    return meth(obj, **kw)
           ^^^^^^^^^^^^^^^
  File "/app/bazarr/bin/bazarr/../libs/sqlalchemy/sql/ddl.py", line 918, in visit_metadata
    self.traverse_single(
  File "/app/bazarr/bin/bazarr/../libs/sqlalchemy/sql/visitors.py", line 664, in traverse_single
    return meth(obj, **kw)
           ^^^^^^^^^^^^^^^
  File "/app/bazarr/bin/bazarr/../libs/sqlalchemy/sql/ddl.py", line 956, in visit_table
    )._invoke_with(self.connection)
      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/bazarr/bin/bazarr/../libs/sqlalchemy/sql/ddl.py", line 314, in _invoke_with
    return bind.execute(self)
           ^^^^^^^^^^^^^^^^^^
  File "/app/bazarr/bin/bazarr/../libs/sqlalchemy/engine/base.py", line 1408, in execute
    return meth(
           ^^^^^
  File "/app/bazarr/bin/bazarr/../libs/sqlalchemy/sql/ddl.py", line 180, in _execute_on_connection
    return connection._execute_ddl(
           ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/bazarr/bin/bazarr/../libs/sqlalchemy/engine/base.py", line 1519, in _execute_ddl
    ret = self._execute_context(
          ^^^^^^^^^^^^^^^^^^^^^^
  File "/app/bazarr/bin/bazarr/../libs/sqlalchemy/engine/base.py", line 1839, in _execute_context
    return self._exec_single_context(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/bazarr/bin/bazarr/../libs/sqlalchemy/engine/base.py", line 1979, in _exec_single_context
    self._handle_dbapi_exception(
  File "/app/bazarr/bin/bazarr/../libs/sqlalchemy/engine/base.py", line 2335, in _handle_dbapi_exception
    raise sqlalchemy_exception.with_traceback(exc_info[2]) from e
  File "/app/bazarr/bin/bazarr/../libs/sqlalchemy/engine/base.py", line 1960, in _exec_single_context
    self.dialect.do_execute(
  File "/app/bazarr/bin/bazarr/../libs/sqlalchemy/engine/default.py", line 924, in do_execute
    cursor.execute(statement, parameters)
sqlalchemy.exc.OperationalError: (sqlite3.OperationalError) database is locked
[SQL: 
CREATE TABLE system (
	id INTEGER NOT NULL, 
	configured TEXT, 
	updated TEXT, 
	PRIMARY KEY (id)
)
]
(Background on this error at: https://sqlalche.me/e/20/e3q8)

The exception messages are a bit too specific for me to understand what the problem here is.
I do think that this is permission related, but i don’t think its on TrueNAS’s end, since it works fine with all the other docker containers.

I’d be happy to provide more info if that is necessary, hopefully one of you geeks can help me sort this out <3.

Is the config mount also on smb? Databases do not support file based remote storage and as such, neither do we.

Try having the config mount local and test

Yes the config mount is also on SMB.

Databases do not support file based remote storage

Wow, i did not expect that. That was the case here, thank you for the help.
Issue resolved!

If you must keep it remote, look into iscsi, this is a block based remote storage, and databases do support block based

Glad you got it sorted

I recently set up TrueNAS and thats when i decided to move the configs along with where the movies and tv shows were going to be stored. I moved the configs back to being locally on the VM, there’s honestly no need for them to be on an SMB share.

I really appreciate the quick response time that i got here.

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.