[GH-ISSUE #1610] Support: v0.7.2 cant store data/index.sqlite3 on SMB drive #2473

Closed
opened 2026-03-01 17:59:16 +03:00 by kerem · 3 comments
Owner

Originally created by @mmhussain-aankoop on GitHub (Dec 6, 2024).
Original GitHub issue: https://github.com/ArchiveBox/ArchiveBox/issues/1610

Originally assigned to: @pirate on GitHub.

Provide a screenshot and describe the bug

I am currently running ArchiveBox version 0.7.2 on my Ubuntu machine and have encountered an issue when initializing ArchiveBox in a directory mounted to an SMB share. The initialization fails with the following error:

archivebox init

Command '/usr/bin/chromium-browser' requires the chromium snap to be installed.
Please install it with:

snap install chromium


Command '/usr/bin/chromium-browser' requires the chromium snap to be installed.
Please install it with:

snap install chromium

[i] [2024-12-06 11:02:51] ArchiveBox v0.7.2: archivebox init
    > /home/archivebox/data


Command '/usr/bin/chromium-browser' requires the chromium snap to be installed.
Please install it with:

snap install chromium


Command '/usr/bin/chromium-browser' requires the chromium snap to be installed.
Please install it with:

snap install chromium


[+] Initializing a new ArchiveBox v0.7.2 collection...  
----------------------------------------------------------------------  

[+] Building archive folder structure...  
    + ./archive, ./sources, ./logs...  
    + ./ArchiveBox.conf...  

Command '/usr/bin/chromium-browser' requires the chromium snap to be installed.  
Please install it with:  

snap install chromium  

[+] Building main SQL index and running initial migrations...  
Traceback (most recent call last):  
  File "/usr/local/lib/python3.10/dist-packages/django/db/backends/base/base.py", line 242, in _commit  
    return self.connection.commit()  
sqlite3.OperationalError: database is locked  

...  

django.db.migrations.exceptions.MigrationSchemaMissing: Unable to create the django_migrations table (database is locked)  

However, when I initialize ArchiveBox in a directory located on the local hard disk of the same machine, it works as expected without any issues.

Here are the key details of my setup:

SMB Share: Mounted to /home/archivebox/data
Local Directory (Working): /home/archivebox/data1
Operating System: Ubuntu 22.04

Steps to reproduce

cd /home/archivebox/data
archivebox init

Logs or errors

archivebox init

Command '/usr/bin/chromium-browser' requires the chromium snap to be installed.
Please install it with:

snap install chromium


Command '/usr/bin/chromium-browser' requires the chromium snap to be installed.
Please install it with:

snap install chromium

[i] [2024-12-06 11:02:51] ArchiveBox v0.7.2: archivebox init
    > /home/archivebox/data


Command '/usr/bin/chromium-browser' requires the chromium snap to be installed.
Please install it with:

snap install chromium


Command '/usr/bin/chromium-browser' requires the chromium snap to be installed.
Please install it with:

snap install chromium

[+] Initializing a new ArchiveBox v0.7.2 collection...  
----------------------------------------------------------------------  

[+] Building archive folder structure...  
    + ./archive, ./sources, ./logs...  
    + ./ArchiveBox.conf...  

Command '/usr/bin/chromium-browser' requires the chromium snap to be installed.  
Please install it with:  

snap install chromium  

[+] Building main SQL index and running initial migrations...  
Traceback (most recent call last):  
  File "/usr/local/lib/python3.10/dist-packages/django/db/backends/base/base.py", line 242, in _commit  
    return self.connection.commit()  
sqlite3.OperationalError: database is locked  

...  

django.db.migrations.exceptions.MigrationSchemaMissing: Unable to create the django_migrations table (database is locked)

ArchiveBox Version

0.7.2
ArchiveBox v0.7.2 BUILD_TIME=2024-11-13 09:29:28 1731486568
IN_DOCKER=False IN_QEMU=False ARCH=x86_64 OS=Linux PLATFORM=Linux-5.15.0-126-generic-x86_64-with-glibc2.35 PYTHON=Cpython
FS_ATOMIC=True FS_REMOTE=True FS_USER=1001:1001 FS_PERMS=644
DEBUG=False IS_TTY=True TZ=UTC SEARCH_BACKEND=ripgrep LDAP=False

How did you install the version of ArchiveBox you are using?

pip

What operating system are you running on?

Linux (Ubuntu/Debian/Arch/Alpine/etc.)

What type of drive are you using to store your ArchiveBox data?

  • data/ is on a local SSD or NVMe drive
  • data/ is on a spinning hard drive or external USB drive
  • data/ is on a network mount (e.g. NFS/SMB/CIFS/etc.)
  • data/ is on a FUSE mount (e.g. SSHFS/RClone/S3/B2/OneDrive, etc.)

Docker Compose Configuration


ArchiveBox Configuration

[SERVER_CONFIG]
SECRET_KEY = *****************************
Originally created by @mmhussain-aankoop on GitHub (Dec 6, 2024). Original GitHub issue: https://github.com/ArchiveBox/ArchiveBox/issues/1610 Originally assigned to: @pirate on GitHub. ### Provide a screenshot and describe the bug I am currently running ArchiveBox version 0.7.2 on my Ubuntu machine and have encountered an issue when initializing ArchiveBox in a directory mounted to an SMB share. The initialization fails with the following error: ```logs archivebox init Command '/usr/bin/chromium-browser' requires the chromium snap to be installed. Please install it with: snap install chromium Command '/usr/bin/chromium-browser' requires the chromium snap to be installed. Please install it with: snap install chromium [i] [2024-12-06 11:02:51] ArchiveBox v0.7.2: archivebox init > /home/archivebox/data Command '/usr/bin/chromium-browser' requires the chromium snap to be installed. Please install it with: snap install chromium Command '/usr/bin/chromium-browser' requires the chromium snap to be installed. Please install it with: snap install chromium [+] Initializing a new ArchiveBox v0.7.2 collection... ---------------------------------------------------------------------- [+] Building archive folder structure... + ./archive, ./sources, ./logs... + ./ArchiveBox.conf... Command '/usr/bin/chromium-browser' requires the chromium snap to be installed. Please install it with: snap install chromium [+] Building main SQL index and running initial migrations... Traceback (most recent call last): File "/usr/local/lib/python3.10/dist-packages/django/db/backends/base/base.py", line 242, in _commit return self.connection.commit() sqlite3.OperationalError: database is locked ... django.db.migrations.exceptions.MigrationSchemaMissing: Unable to create the django_migrations table (database is locked) ``` However, when I initialize ArchiveBox in a directory located on the local hard disk of the same machine, it works as expected without any issues. Here are the key details of my setup: SMB Share: Mounted to /home/archivebox/data Local Directory (Working): /home/archivebox/data1 Operating System: Ubuntu 22.04 ### Steps to reproduce ```markdown cd /home/archivebox/data archivebox init ``` ### Logs or errors ```shell archivebox init Command '/usr/bin/chromium-browser' requires the chromium snap to be installed. Please install it with: snap install chromium Command '/usr/bin/chromium-browser' requires the chromium snap to be installed. Please install it with: snap install chromium [i] [2024-12-06 11:02:51] ArchiveBox v0.7.2: archivebox init > /home/archivebox/data Command '/usr/bin/chromium-browser' requires the chromium snap to be installed. Please install it with: snap install chromium Command '/usr/bin/chromium-browser' requires the chromium snap to be installed. Please install it with: snap install chromium [+] Initializing a new ArchiveBox v0.7.2 collection... ---------------------------------------------------------------------- [+] Building archive folder structure... + ./archive, ./sources, ./logs... + ./ArchiveBox.conf... Command '/usr/bin/chromium-browser' requires the chromium snap to be installed. Please install it with: snap install chromium [+] Building main SQL index and running initial migrations... Traceback (most recent call last): File "/usr/local/lib/python3.10/dist-packages/django/db/backends/base/base.py", line 242, in _commit return self.connection.commit() sqlite3.OperationalError: database is locked ... django.db.migrations.exceptions.MigrationSchemaMissing: Unable to create the django_migrations table (database is locked) ``` ### ArchiveBox Version ```shell 0.7.2 ArchiveBox v0.7.2 BUILD_TIME=2024-11-13 09:29:28 1731486568 IN_DOCKER=False IN_QEMU=False ARCH=x86_64 OS=Linux PLATFORM=Linux-5.15.0-126-generic-x86_64-with-glibc2.35 PYTHON=Cpython FS_ATOMIC=True FS_REMOTE=True FS_USER=1001:1001 FS_PERMS=644 DEBUG=False IS_TTY=True TZ=UTC SEARCH_BACKEND=ripgrep LDAP=False ``` ### How did you install the version of ArchiveBox you are using? pip ### What operating system are you running on? Linux (Ubuntu/Debian/Arch/Alpine/etc.) ### What type of drive are you using to store your ArchiveBox data? - [ ] `data/` is on a local SSD or NVMe drive - [ ] `data/` is on a spinning hard drive or external USB drive - [x] `data/` is on a network mount (e.g. NFS/SMB/CIFS/etc.) - [ ] `data/` is on a FUSE mount (e.g. SSHFS/RClone/S3/B2/OneDrive, etc.) ### Docker Compose Configuration ```shell ``` ### ArchiveBox Configuration ```shell [SERVER_CONFIG] SECRET_KEY = ***************************** ```
kerem closed this issue 2026-03-01 17:59:16 +03:00
Author
Owner

@pirate commented on GitHub (Dec 6, 2024):

You cannot store the index.sqlite3 file on an SMB share as SMB shares do not support the multi-writer consistency guarantees needed for SQLite WAL-mode to work. https://sqlite.org/draft/useovernet.html

You can store data/archive on the SMB share, but data/index.sqlite3 must be an a local drive.

https://github.com/ArchiveBox/ArchiveBox/wiki/Setting-Up-Storage#supported-remote-filesystems

<!-- gh-comment-id:2524429895 --> @pirate commented on GitHub (Dec 6, 2024): You cannot store the `index.sqlite3` file on an SMB share as SMB shares do not support the multi-writer consistency guarantees needed for SQLite WAL-mode to work. https://sqlite.org/draft/useovernet.html You can store `data/archive` on the SMB share, but `data/index.sqlite3` must be an a local drive. https://github.com/ArchiveBox/ArchiveBox/wiki/Setting-Up-Storage#supported-remote-filesystems
Author
Owner

@mmhussain-aankoop commented on GitHub (Dec 12, 2024):

This works. Thanks for your help

<!-- gh-comment-id:2538560553 --> @mmhussain-aankoop commented on GitHub (Dec 12, 2024): This works. Thanks for your help
Author
Owner

@Sharpie commented on GitHub (Jan 9, 2025):

Mounting the SMB share with nobrl, which disables Byte Range Locking also works. This is somewhat risky, but in my case it feels like a fit because:

  • My Archivebox instance is a low-load hobby project, not a high load production instance
  • The instance is running under Kubernetes which mitigates the possibility of multiple writers to a large degree via StatefuSet using volumes in ReadWriteOncePod access mode.
  • The storage is backed up regularly, so I have a chance at recovery if there is an oopsie.
<!-- gh-comment-id:2580944143 --> @Sharpie commented on GitHub (Jan 9, 2025): Mounting the SMB share with `nobrl`, which disables Byte Range Locking also works. This is somewhat risky, but in my case it feels like a fit because: - My Archivebox instance is a low-load hobby project, not a high load production instance - The instance is running under Kubernetes which mitigates the possibility of multiple writers to a large degree via `StatefuSet` using volumes in `ReadWriteOncePod` access mode. - The storage is backed up regularly, so I have a chance at recovery if there is an oopsie.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/ArchiveBox#2473
No description provided.