[GH-ISSUE #1524] Bug: Unable to start server without supervisord #902

Closed
opened 2026-03-01 14:47:10 +03:00 by kerem · 6 comments
Owner

Originally created by @prurigro on GitHub (Sep 25, 2024).
Original GitHub issue: https://github.com/ArchiveBox/ArchiveBox/issues/1524

Describe the bug

There now appears to be a hard dependency on supervisord for archivebox server, meaning that most distros running archivebox outside of docker won't be able to use the server feature.

Steps to reproduce

  1. Install archivebox on a system that doesn't use supervisord
  2. Run archivebox server --init 0.0.0.0:8888
  3. View the error: AssertionError: Failed to start supervisord or connect to it!

Screenshots or log output

Supervisord starting...
/bin/sh: line 1: supervisord: command not found
╭─────────────────────────────── Traceback (most recent call last) ────────────────────────────────╮
│ /home/username/.local/bin/archivebox:8 in <module>                                               │
│                                                                                                  │
│   5 from archivebox.cli import main                                                              │
│   6 if __name__ == '__main__':                                                                   │
│   7 │   sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])                         │
│ ❱ 8 │   sys.exit(main())                                                                         │
│   9                                                                                              │
│                                                                                                  │
│ ╭──────────────────────────── locals ────────────────────────────╮                               │
│ │ main = <function main at 0x7c68e80c4fe0>                       │                               │
│ │   re = <module 're' from '/usr/lib/python3.12/re/__init__.py'> │                               │
│ │  sys = <module 'sys' (built-in)>                               │                               │
│ ╰────────────────────────────────────────────────────────────────╯                               │
│                                                                                                  │
│ /home/username/.local/pipx/venvs/archivebox/lib/python3.12/site-packages/archivebox/cli/__init__ │
│ .py:181 in main                                                                                  │
│                                                                                                  │
│   178 │   │   │   pwd=pwd or OUTPUT_DIR                                                          │
│   179 │   │   )                                                                                  │
│   180 │                                                                                          │
│ ❱ 181 │   run_subcommand(                                                                        │
│   182 │   │   subcommand=command.subcommand,                                                     │
│   183 │   │   subcommand_args=command.subcommand_args,                                           │
│   184 │   │   stdin=stdin,                                                                       │
│                                                                                                  │
│ ╭─────────────────────────────────────────── locals ───────────────────────────────────────────╮ │
│ │            args = ['server', '--init', '0.0.0.0:8888']                                       │ │
│ │         command = Namespace(help=False, version=False, subcommand='server',                  │ │
│ │                   subcommand_args=['--init', '0.0.0.0:8888'])                                │ │
│ │           group = <argparse._MutuallyExclusiveGroup object at 0x7c68e818b740>                │ │
│ │ log_cli_command = <function log_cli_command at 0x7c68e784cae0>                               │ │
│ │          parser = ArgumentParser(prog='archivebox', usage=None, description='ArchiveBox: The │ │
│ │                   self-hosted internet archive', formatter_class=<class                      │ │
│ │                   'argparse.HelpFormatter'>, conflict_handler='error', add_help=False)       │ │
│ │             pwd = None                                                                       │ │
│ │           stdin = <_io.TextIOWrapper name='<stdin>' mode='r' encoding='utf-8'>               │ │
│ │     subcommands = {                                                                          │ │
│ │                   │   'help': 'Print the ArchiveBox help message and usage',                 │ │
│ │                   │   'version': 'Print the ArchiveBox version and dependency information',  │ │
│ │                   │   'init': 'Initialize a new ArchiveBox collection in the current         │ │
│ │                   directory',                                                                │ │
│ │                   │   'config': 'Get and set your ArchiveBox project configuration values',  │ │
│ │                   │   'setup': 'Automatically install all ArchiveBox dependencies and        │ │
│ │                   extras',                                                                   │ │
│ │                   │   'add': 'Add a new URL or list of URLs to your archive',                │ │
│ │                   │   'remove': 'Remove the specified URLs from the archive',                │ │
│ │                   │   'update': 'Import any new links from subscriptions and retry any       │ │
│ │                   previously failed/skipped '+5,                                             │ │
│ │                   │   'list': 'List, filter, and export information about archive entries',  │ │
│ │                   │   'status': 'Print out some info and statistics about the archive        │ │
│ │                   collection',                                                               │ │
│ │                   │   ... +5                                                                 │ │
│ │                   }                                                                          │ │
│ ╰──────────────────────────────────────────────────────────────────────────────────────────────╯ │
│                                                                                                  │
│ /home/username/.local/pipx/venvs/archivebox/lib/python3.12/site-packages/archivebox/cli/__init__ │
│ .py:118 in run_subcommand                                                                        │
│                                                                                                  │
│   115 │   │   │   check_migrations()                                                             │
│   116 │                                                                                          │
│   117 │   module = import_module('.archivebox_{}'.format(subcommand), __package__)               │
│ ❱ 118 │   module.main(args=subcommand_args, stdin=stdin, pwd=pwd)    # type: ignore              │
│   119 │                                                                                          │
│   120 │   # wait for webhooks, signals, and other background jobs to finish before exit          │
│   121 │   wait_for_bg_threads_to_exit(timeout=60)                                                │
│                                                                                                  │
│ ╭─────────────────────────────────────────── locals ───────────────────────────────────────────╮ │
│ │ cmd_requires_db = False                                                                      │ │
│ │    init_pending = True                                                                       │ │
│ │          module = <module 'archivebox.cli.archivebox_server' from                            │ │
│ │                   '/home/username/.local/pipx/venvs/archivebox/lib/python3.12/site-packages… │ │
│ │             pwd = PosixPath('/home/username/ArchiveBox')                                     │ │
│ │    setup_django = <function setup_django at 0x7c68e80c4cc0>                                  │ │
│ │           stdin = <_io.TextIOWrapper name='<stdin>' mode='r' encoding='utf-8'>               │ │
│ │      subcommand = 'server'                                                                   │ │
│ │ subcommand_args = ['--init', '0.0.0.0:8888']                                                 │ │
│ ╰──────────────────────────────────────────────────────────────────────────────────────────────╯ │
│                                                                                                  │
│ /home/username/.local/pipx/venvs/archivebox/lib/python3.12/site-packages/archivebox/cli/archiveb │
│ ox_server.py:64 in main                                                                          │
│                                                                                                  │
│   61 │   command = parser.parse_args(args or ())                                                 │
│   62 │   reject_stdin(__command__, stdin)                                                        │
│   63 │                                                                                           │
│ ❱ 64 │   server(                                                                                 │
│   65 │   │   runserver_args=command.runserver_args + (['--nothreading'] if command.nothreadin    │
│   66 │   │   reload=command.reload,                                                              │
│   67 │   │   debug=command.debug,                                                                │
│                                                                                                  │
│ ╭─────────────────────────────────────────── locals ───────────────────────────────────────────╮ │
│ │    args = ['--init', '0.0.0.0:8888']                                                         │ │
│ │ command = Namespace(runserver_args=['0.0.0.0:8888'], reload=False, debug=False,              │ │
│ │           nothreading=False, init=True, quick_init=False, createsuperuser=False)             │ │
│ │  parser = ArgumentParser(prog='archivebox server', usage=None, description='Run the          │ │
│ │           ArchiveBox HTTP server', formatter_class=<class                                    │ │
│ │           'archivebox.logging_util.SmartFormatter'>, conflict_handler='error',               │ │
│ │           add_help=True)                                                                     │ │
│ │     pwd = PosixPath('/home/username/ArchiveBox')                                             │ │
│ │   stdin = <_io.TextIOWrapper name='<stdin>' mode='r' encoding='utf-8'>                       │ │
│ ╰──────────────────────────────────────────────────────────────────────────────────────────────╯ │
│                                                                                                  │
│ /home/username/.local/pipx/venvs/archivebox/lib/python3.12/site-packages/archivebox/util.py:160  │
│ in typechecked_function                                                                          │
│                                                                                                  │
│   157 │   │   for arg_key, arg_val in kwargs.items():                                            │
│   158 │   │   │   check_argument_type(arg_key, arg_val)                                          │
│   159 │   │                                                                                      │
│ ❱ 160 │   │   return func(*args, **kwargs)                                                       │
│   161 │                                                                                          │
│   162 │   return typechecked_function                                                            │
│   163                                                                                            │
│                                                                                                  │
│ ╭─────────────────────────────────────────── locals ───────────────────────────────────────────╮ │
│ │             arg_key = 'out_dir'                                                              │ │
│ │             arg_val = PosixPath('/home/username/ArchiveBox')                                 │ │
│ │                args = ()                                                                     │ │
│ │ check_argument_type = <function                                                              │ │
│ │                       enforce_types.<locals>.typechecked_function.<locals>.check_argument_t… │ │
│ │                       at 0x7c68e58199e0>                                                     │ │
│ │                func = <function server at 0x7c68e774c180>                                    │ │
│ │              kwargs = {                                                                      │ │
│ │                       │   'runserver_args': ['0.0.0.0:8888', '--noreload'],                  │ │
│ │                       │   'reload': False,                                                   │ │
│ │                       │   'debug': False,                                                    │ │
│ │                       │   'init': True,                                                      │ │
│ │                       │   'quick_init': False,                                               │ │
│ │                       │   'createsuperuser': False,                                          │ │
│ │                       │   'out_dir': PosixPath('/home/username/ArchiveBox')                  │ │
│ │                       }                                                                      │ │
│ │                 sig = <Signature (runserver_args: Optional[List[str]] = None, reload: bool = │ │
│ │                       False, debug: bool = False, init: bool = False, quick_init: bool =     │ │
│ │                       False, createsuperuser: bool = False, out_dir: pathlib.Path =          │ │
│ │                       PosixPath('/home/username/ArchiveBox')) -> None>                       │ │
│ ╰──────────────────────────────────────────────────────────────────────────────────────────────╯ │
│                                                                                                  │
│ /home/username/.local/pipx/venvs/archivebox/lib/python3.12/site-packages/archivebox/main.py:1376 │
│ in server                                                                                        │
│                                                                                                  │
│   1373 │   │   from queues.supervisor_util import get_or_create_supervisord_process, start_work  │
│   1374 │   │                                                                                     │
│   1375 │   │   print()                                                                           │
│ ❱ 1376 │   │   supervisor = get_or_create_supervisord_process(daemonize=False)                   │
│   1377 │   │                                                                                     │
│   1378 │   │   bg_workers = [                                                                    │
│   1379 │   │   │   {                                                                             │
│                                                                                                  │
│ ╭─────────────────────────────────────────── locals ───────────────────────────────────────────╮ │
│ │                      call_command = <function call_command at 0x7c68e92c4c20>                │ │
│ │                            config = <module 'archivebox.config' from                         │ │
│ │                                     '/home/username/.local/pipx/venvs/archivebox/lib/python… │ │
│ │                   createsuperuser = False                                                    │ │
│ │                             debug = False                                                    │ │
│ │ get_or_create_supervisord_process = <function get_or_create_supervisord_process at           │ │
│ │                                     0x7c68e55c5a80>                                          │ │
│ │                              host = '0.0.0.0'                                                │ │
│ │                     host_and_port = '0.0.0.0:8888'                                           │ │
│ │                              init = True                                                     │ │
│ │                           out_dir = PosixPath('/home/username/ArchiveBox')                   │ │
│ │                              port = '8888'                                                   │ │
│ │                        quick_init = False                                                    │ │
│ │                            reload = False                                                    │ │
│ │                    runserver_args = ['0.0.0.0:8888', '--noreload']                           │ │
│ │                      start_worker = <function start_worker at 0x7c68e55c51c0>                │ │
│ │                       stop_worker = <function stop_worker at 0x7c68e5510040>                 │ │
│ │                              User = <class 'django.contrib.auth.models.User'>                │ │
│ │                      watch_worker = <function watch_worker at 0x7c68e55c4900>                │ │
│ ╰──────────────────────────────────────────────────────────────────────────────────────────────╯ │
│                                                                                                  │
│ /home/username/.local/pipx/venvs/archivebox/lib/python3.12/site-packages/archivebox/queues/super │
│ visor_util.py:137 in get_or_create_supervisord_process                                           │
│                                                                                                  │
│   134 │   │   stop_existing_supervisord_process()                                                │
│   135 │   │   supervisor = start_new_supervisord_process(daemonize=daemonize)                    │
│   136 │                                                                                          │
│ ❱ 137 │   assert supervisor and supervisor.getPID(), "Failed to start supervisord or connect t   │
│   138 │   return supervisor                                                                      │
│   139                                                                                            │
│   140 def start_worker(supervisor, daemon, lazy=False):                                          │
│                                                                                                  │
│ ╭────── locals ──────╮                                                                           │
│ │  daemonize = False │                                                                           │
│ │ supervisor = None  │                                                                           │
│ ╰────────────────────╯                                                                           │
╰──────────────────────────────────────────────────────────────────────────────────────────────────╯
AssertionError: Failed to start supervisord or connect to it!

ArchiveBox version

The version is the latest git master (COMMIT_HASH shows as "unknown" in the --version output below)

0.8.4
ArchiveBox v0.8.4 COMMIT_HASH=unknown BUILD_TIME=2024-09-11 16:40:49 1726087249
IN_DOCKER=False IN_QEMU=False ARCH=x86_64 OS=Linux PLATFORM=Linux-6.10.10-arch1-1-x86_64-with-glibc2.40 PYTHON=Cpython
FS_ATOMIC=True FS_REMOTE=False FS_USER=1000:100 FS_PERMS=644
DEBUG=False IS_TTY=True TZ=UTC SEARCH_BACKEND=ripgrep LDAP=False

[i] Dependency versions:
 √  PYTHON_BINARY         v3.12.6         valid     /usr/bin/python3.12
 √  SQLITE_BINARY         v2.6.0          valid     /usr/lib/python3.12/sqlite3/dbapi2.py
 √  DJANGO_BINARY         v5.1.1          valid     /home/username/.local/pipx/venvs/archivebox/lib/python3.12/site-packages/django/__init__.py
 √  ARCHIVEBOX_BINARY     v0.8.4          valid     /home/username/.local/pipx/venvs/archivebox/bin/archivebox

 √  CURL_BINARY           v8.10.1         valid     /usr/bin/curl
 √  WGET_BINARY           v1.24.5         valid     /usr/bin/wget
 √  NODE_BINARY           v22.9.0         valid     /usr/bin/node
 √  SINGLEFILE_BINARY     v2.0.60         valid     /home/username/.local/share/node/lib/node_modules/single-file-cli/single-file-node.js
 √  READABILITY_BINARY    v0.0.6          valid     /home/username/.local/share/node/lib/node_modules/readability-extractor/readability-extractor
 √  MERCURY_BINARY        v1.0.0          valid     /home/username/.local/share/node/lib/node_modules/@postlight/parser/cli.js
 √  GIT_BINARY            v2.46.2         valid     /usr/bin/git
 √  YOUTUBEDL_BINARY      v2024.8.6       valid     /usr/bin/yt-dlp
 √  CHROME_BINARY         v128.0.6613     valid     /usr/bin/chromium
 √  RIPGREP_BINARY        v14.1.1         valid     /usr/bin/rg

[i] Source-code locations:
 √  PACKAGE_DIR           32 files        valid     /home/username/.local/pipx/venvs/archivebox/lib/python3.12/site-packages/archivebox
 √  TEMPLATES_DIR         3 files         valid     /home/username/.local/pipx/venvs/archivebox/lib/python3.12/site-packages/archivebox/templates

[i] Data locations:
 √  OUTPUT_DIR            10 files        valid     /home/username/ArchiveBox
 √  CONFIG_FILE           159.0 Bytes     valid     ./ArchiveBox.conf
 √  SQL_INDEX             1.6 MB          valid     ./index.sqlite3
 √  ARCHIVE_DIR           49 files        valid     ./archive
 √  SOURCES_DIR           59 files        valid     ./sources
 √  PERSONAS_DIR          1 files         valid     ./personas
 √  LOGS_DIR              1 files         valid     ./logs
 √  CACHE_DIR             0 files         valid     ./cache
 -  CUSTOM_TEMPLATES_DIR  -               disabled  None
Originally created by @prurigro on GitHub (Sep 25, 2024). Original GitHub issue: https://github.com/ArchiveBox/ArchiveBox/issues/1524 #### Describe the bug There now appears to be a hard dependency on supervisord for `archivebox server`, meaning that most distros running archivebox outside of docker won't be able to use the server feature. #### Steps to reproduce 1. Install archivebox on a system that doesn't use supervisord 2. Run `archivebox server --init 0.0.0.0:8888` 3. View the error: `AssertionError: Failed to start supervisord or connect to it!` #### Screenshots or log output ``` Supervisord starting... /bin/sh: line 1: supervisord: command not found ╭─────────────────────────────── Traceback (most recent call last) ────────────────────────────────╮ │ /home/username/.local/bin/archivebox:8 in <module> │ │ │ │ 5 from archivebox.cli import main │ │ 6 if __name__ == '__main__': │ │ 7 │ sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) │ │ ❱ 8 │ sys.exit(main()) │ │ 9 │ │ │ │ ╭──────────────────────────── locals ────────────────────────────╮ │ │ │ main = <function main at 0x7c68e80c4fe0> │ │ │ │ re = <module 're' from '/usr/lib/python3.12/re/__init__.py'> │ │ │ │ sys = <module 'sys' (built-in)> │ │ │ ╰────────────────────────────────────────────────────────────────╯ │ │ │ │ /home/username/.local/pipx/venvs/archivebox/lib/python3.12/site-packages/archivebox/cli/__init__ │ │ .py:181 in main │ │ │ │ 178 │ │ │ pwd=pwd or OUTPUT_DIR │ │ 179 │ │ ) │ │ 180 │ │ │ ❱ 181 │ run_subcommand( │ │ 182 │ │ subcommand=command.subcommand, │ │ 183 │ │ subcommand_args=command.subcommand_args, │ │ 184 │ │ stdin=stdin, │ │ │ │ ╭─────────────────────────────────────────── locals ───────────────────────────────────────────╮ │ │ │ args = ['server', '--init', '0.0.0.0:8888'] │ │ │ │ command = Namespace(help=False, version=False, subcommand='server', │ │ │ │ subcommand_args=['--init', '0.0.0.0:8888']) │ │ │ │ group = <argparse._MutuallyExclusiveGroup object at 0x7c68e818b740> │ │ │ │ log_cli_command = <function log_cli_command at 0x7c68e784cae0> │ │ │ │ parser = ArgumentParser(prog='archivebox', usage=None, description='ArchiveBox: The │ │ │ │ self-hosted internet archive', formatter_class=<class │ │ │ │ 'argparse.HelpFormatter'>, conflict_handler='error', add_help=False) │ │ │ │ pwd = None │ │ │ │ stdin = <_io.TextIOWrapper name='<stdin>' mode='r' encoding='utf-8'> │ │ │ │ subcommands = { │ │ │ │ │ 'help': 'Print the ArchiveBox help message and usage', │ │ │ │ │ 'version': 'Print the ArchiveBox version and dependency information', │ │ │ │ │ 'init': 'Initialize a new ArchiveBox collection in the current │ │ │ │ directory', │ │ │ │ │ 'config': 'Get and set your ArchiveBox project configuration values', │ │ │ │ │ 'setup': 'Automatically install all ArchiveBox dependencies and │ │ │ │ extras', │ │ │ │ │ 'add': 'Add a new URL or list of URLs to your archive', │ │ │ │ │ 'remove': 'Remove the specified URLs from the archive', │ │ │ │ │ 'update': 'Import any new links from subscriptions and retry any │ │ │ │ previously failed/skipped '+5, │ │ │ │ │ 'list': 'List, filter, and export information about archive entries', │ │ │ │ │ 'status': 'Print out some info and statistics about the archive │ │ │ │ collection', │ │ │ │ │ ... +5 │ │ │ │ } │ │ │ ╰──────────────────────────────────────────────────────────────────────────────────────────────╯ │ │ │ │ /home/username/.local/pipx/venvs/archivebox/lib/python3.12/site-packages/archivebox/cli/__init__ │ │ .py:118 in run_subcommand │ │ │ │ 115 │ │ │ check_migrations() │ │ 116 │ │ │ 117 │ module = import_module('.archivebox_{}'.format(subcommand), __package__) │ │ ❱ 118 │ module.main(args=subcommand_args, stdin=stdin, pwd=pwd) # type: ignore │ │ 119 │ │ │ 120 │ # wait for webhooks, signals, and other background jobs to finish before exit │ │ 121 │ wait_for_bg_threads_to_exit(timeout=60) │ │ │ │ ╭─────────────────────────────────────────── locals ───────────────────────────────────────────╮ │ │ │ cmd_requires_db = False │ │ │ │ init_pending = True │ │ │ │ module = <module 'archivebox.cli.archivebox_server' from │ │ │ │ '/home/username/.local/pipx/venvs/archivebox/lib/python3.12/site-packages… │ │ │ │ pwd = PosixPath('/home/username/ArchiveBox') │ │ │ │ setup_django = <function setup_django at 0x7c68e80c4cc0> │ │ │ │ stdin = <_io.TextIOWrapper name='<stdin>' mode='r' encoding='utf-8'> │ │ │ │ subcommand = 'server' │ │ │ │ subcommand_args = ['--init', '0.0.0.0:8888'] │ │ │ ╰──────────────────────────────────────────────────────────────────────────────────────────────╯ │ │ │ │ /home/username/.local/pipx/venvs/archivebox/lib/python3.12/site-packages/archivebox/cli/archiveb │ │ ox_server.py:64 in main │ │ │ │ 61 │ command = parser.parse_args(args or ()) │ │ 62 │ reject_stdin(__command__, stdin) │ │ 63 │ │ │ ❱ 64 │ server( │ │ 65 │ │ runserver_args=command.runserver_args + (['--nothreading'] if command.nothreadin │ │ 66 │ │ reload=command.reload, │ │ 67 │ │ debug=command.debug, │ │ │ │ ╭─────────────────────────────────────────── locals ───────────────────────────────────────────╮ │ │ │ args = ['--init', '0.0.0.0:8888'] │ │ │ │ command = Namespace(runserver_args=['0.0.0.0:8888'], reload=False, debug=False, │ │ │ │ nothreading=False, init=True, quick_init=False, createsuperuser=False) │ │ │ │ parser = ArgumentParser(prog='archivebox server', usage=None, description='Run the │ │ │ │ ArchiveBox HTTP server', formatter_class=<class │ │ │ │ 'archivebox.logging_util.SmartFormatter'>, conflict_handler='error', │ │ │ │ add_help=True) │ │ │ │ pwd = PosixPath('/home/username/ArchiveBox') │ │ │ │ stdin = <_io.TextIOWrapper name='<stdin>' mode='r' encoding='utf-8'> │ │ │ ╰──────────────────────────────────────────────────────────────────────────────────────────────╯ │ │ │ │ /home/username/.local/pipx/venvs/archivebox/lib/python3.12/site-packages/archivebox/util.py:160 │ │ in typechecked_function │ │ │ │ 157 │ │ for arg_key, arg_val in kwargs.items(): │ │ 158 │ │ │ check_argument_type(arg_key, arg_val) │ │ 159 │ │ │ │ ❱ 160 │ │ return func(*args, **kwargs) │ │ 161 │ │ │ 162 │ return typechecked_function │ │ 163 │ │ │ │ ╭─────────────────────────────────────────── locals ───────────────────────────────────────────╮ │ │ │ arg_key = 'out_dir' │ │ │ │ arg_val = PosixPath('/home/username/ArchiveBox') │ │ │ │ args = () │ │ │ │ check_argument_type = <function │ │ │ │ enforce_types.<locals>.typechecked_function.<locals>.check_argument_t… │ │ │ │ at 0x7c68e58199e0> │ │ │ │ func = <function server at 0x7c68e774c180> │ │ │ │ kwargs = { │ │ │ │ │ 'runserver_args': ['0.0.0.0:8888', '--noreload'], │ │ │ │ │ 'reload': False, │ │ │ │ │ 'debug': False, │ │ │ │ │ 'init': True, │ │ │ │ │ 'quick_init': False, │ │ │ │ │ 'createsuperuser': False, │ │ │ │ │ 'out_dir': PosixPath('/home/username/ArchiveBox') │ │ │ │ } │ │ │ │ sig = <Signature (runserver_args: Optional[List[str]] = None, reload: bool = │ │ │ │ False, debug: bool = False, init: bool = False, quick_init: bool = │ │ │ │ False, createsuperuser: bool = False, out_dir: pathlib.Path = │ │ │ │ PosixPath('/home/username/ArchiveBox')) -> None> │ │ │ ╰──────────────────────────────────────────────────────────────────────────────────────────────╯ │ │ │ │ /home/username/.local/pipx/venvs/archivebox/lib/python3.12/site-packages/archivebox/main.py:1376 │ │ in server │ │ │ │ 1373 │ │ from queues.supervisor_util import get_or_create_supervisord_process, start_work │ │ 1374 │ │ │ │ 1375 │ │ print() │ │ ❱ 1376 │ │ supervisor = get_or_create_supervisord_process(daemonize=False) │ │ 1377 │ │ │ │ 1378 │ │ bg_workers = [ │ │ 1379 │ │ │ { │ │ │ │ ╭─────────────────────────────────────────── locals ───────────────────────────────────────────╮ │ │ │ call_command = <function call_command at 0x7c68e92c4c20> │ │ │ │ config = <module 'archivebox.config' from │ │ │ │ '/home/username/.local/pipx/venvs/archivebox/lib/python… │ │ │ │ createsuperuser = False │ │ │ │ debug = False │ │ │ │ get_or_create_supervisord_process = <function get_or_create_supervisord_process at │ │ │ │ 0x7c68e55c5a80> │ │ │ │ host = '0.0.0.0' │ │ │ │ host_and_port = '0.0.0.0:8888' │ │ │ │ init = True │ │ │ │ out_dir = PosixPath('/home/username/ArchiveBox') │ │ │ │ port = '8888' │ │ │ │ quick_init = False │ │ │ │ reload = False │ │ │ │ runserver_args = ['0.0.0.0:8888', '--noreload'] │ │ │ │ start_worker = <function start_worker at 0x7c68e55c51c0> │ │ │ │ stop_worker = <function stop_worker at 0x7c68e5510040> │ │ │ │ User = <class 'django.contrib.auth.models.User'> │ │ │ │ watch_worker = <function watch_worker at 0x7c68e55c4900> │ │ │ ╰──────────────────────────────────────────────────────────────────────────────────────────────╯ │ │ │ │ /home/username/.local/pipx/venvs/archivebox/lib/python3.12/site-packages/archivebox/queues/super │ │ visor_util.py:137 in get_or_create_supervisord_process │ │ │ │ 134 │ │ stop_existing_supervisord_process() │ │ 135 │ │ supervisor = start_new_supervisord_process(daemonize=daemonize) │ │ 136 │ │ │ ❱ 137 │ assert supervisor and supervisor.getPID(), "Failed to start supervisord or connect t │ │ 138 │ return supervisor │ │ 139 │ │ 140 def start_worker(supervisor, daemon, lazy=False): │ │ │ │ ╭────── locals ──────╮ │ │ │ daemonize = False │ │ │ │ supervisor = None │ │ │ ╰────────────────────╯ │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────╯ AssertionError: Failed to start supervisord or connect to it! ``` #### ArchiveBox version The version is the latest git master (COMMIT_HASH shows as "unknown" in the --version output below) ```logs 0.8.4 ArchiveBox v0.8.4 COMMIT_HASH=unknown BUILD_TIME=2024-09-11 16:40:49 1726087249 IN_DOCKER=False IN_QEMU=False ARCH=x86_64 OS=Linux PLATFORM=Linux-6.10.10-arch1-1-x86_64-with-glibc2.40 PYTHON=Cpython FS_ATOMIC=True FS_REMOTE=False FS_USER=1000:100 FS_PERMS=644 DEBUG=False IS_TTY=True TZ=UTC SEARCH_BACKEND=ripgrep LDAP=False [i] Dependency versions: √ PYTHON_BINARY v3.12.6 valid /usr/bin/python3.12 √ SQLITE_BINARY v2.6.0 valid /usr/lib/python3.12/sqlite3/dbapi2.py √ DJANGO_BINARY v5.1.1 valid /home/username/.local/pipx/venvs/archivebox/lib/python3.12/site-packages/django/__init__.py √ ARCHIVEBOX_BINARY v0.8.4 valid /home/username/.local/pipx/venvs/archivebox/bin/archivebox √ CURL_BINARY v8.10.1 valid /usr/bin/curl √ WGET_BINARY v1.24.5 valid /usr/bin/wget √ NODE_BINARY v22.9.0 valid /usr/bin/node √ SINGLEFILE_BINARY v2.0.60 valid /home/username/.local/share/node/lib/node_modules/single-file-cli/single-file-node.js √ READABILITY_BINARY v0.0.6 valid /home/username/.local/share/node/lib/node_modules/readability-extractor/readability-extractor √ MERCURY_BINARY v1.0.0 valid /home/username/.local/share/node/lib/node_modules/@postlight/parser/cli.js √ GIT_BINARY v2.46.2 valid /usr/bin/git √ YOUTUBEDL_BINARY v2024.8.6 valid /usr/bin/yt-dlp √ CHROME_BINARY v128.0.6613 valid /usr/bin/chromium √ RIPGREP_BINARY v14.1.1 valid /usr/bin/rg [i] Source-code locations: √ PACKAGE_DIR 32 files valid /home/username/.local/pipx/venvs/archivebox/lib/python3.12/site-packages/archivebox √ TEMPLATES_DIR 3 files valid /home/username/.local/pipx/venvs/archivebox/lib/python3.12/site-packages/archivebox/templates [i] Data locations: √ OUTPUT_DIR 10 files valid /home/username/ArchiveBox √ CONFIG_FILE 159.0 Bytes valid ./ArchiveBox.conf √ SQL_INDEX 1.6 MB valid ./index.sqlite3 √ ARCHIVE_DIR 49 files valid ./archive √ SOURCES_DIR 59 files valid ./sources √ PERSONAS_DIR 1 files valid ./personas √ LOGS_DIR 1 files valid ./logs √ CACHE_DIR 0 files valid ./cache - CUSTOM_TEMPLATES_DIR - disabled None ```
kerem closed this issue 2026-03-01 14:47:11 +03:00
Author
Owner

@pirate commented on GitHub (Sep 25, 2024):

Yes this is intentional, the new server is much more advanced than the old one and spawns a pool of several background workers now.

Why do you say distros won't be compatible outside of docker? Supervisord is readily available via pip, and is a pip dependency like any other. It does not depend on having a global supervisord daemon that's started at boot, so there's no expectation of a new apt/pkg install or any changes to the host's systemd/init system config.

Our use of supervisord is strictly as a sub process spawned when the server starts, using only the pip library and local config inside the /data folder, nothing is touched in /etc.

In fact, how did you manage to install it without supervisord (considering it's in the pip requirements for 0.8.4)?

(Also side note, the 09-11 build you're running is already 10k+ lines of changes behind 09-25 :dev 😀, this has probably the most active month of archivebox development in the project's history.)

<!-- gh-comment-id:2375015896 --> @pirate commented on GitHub (Sep 25, 2024): Yes this is intentional, the new server is much more advanced than the old one and spawns a pool of several background workers now. Why do you say distros won't be compatible outside of docker? Supervisord is readily available via pip, and is a pip dependency like any other. It does not depend on having a global supervisord daemon that's started at boot, so there's no expectation of a new apt/pkg install or any changes to the host's systemd/init system config. Our use of supervisord is strictly as a sub process spawned when the server starts, using only the pip library and local config inside the /data folder, nothing is touched in /etc. In fact, how did you manage to install it *without* supervisord (considering it's in the pip requirements for 0.8.4)? (Also side note, the 09-11 build you're running is already 10k+ lines of changes behind 09-25 :dev 😀, this has probably the most active month of archivebox development in the project's history.)
Author
Owner

@prurigro commented on GitHub (Sep 25, 2024):

Ahh, my mistake! The supervisord website made it look like it was a system-level service manager like systemd, and I wasn't able to find a package for it (turns out it's "supervisor" and not "supervisord").

It actually looks like it was installed, but it's in the pipx container's bin folder (from which only the archivebox executable is symlinked to ~/.local/bin/). I would have thought pipx would have had a trick for loading a package's own bin into $PATH while it's executing, but injecting that into a little wrapper before calling archivebox seems to do the trick!

Apologies for the confusion and thanks for pointing me in the right direction :) Also, thanks for keeping this project maintained, it's an awesome piece of kit :) I'll have to pull in the latest changes!

<!-- gh-comment-id:2375106174 --> @prurigro commented on GitHub (Sep 25, 2024): Ahh, my mistake! The supervisord website made it look like it was a system-level service manager like systemd, and I wasn't able to find a package for it (turns out it's "supervisor" and not "supervisord"). It actually looks like it was installed, but it's in the pipx container's bin folder (from which only the archivebox executable is symlinked to ~/.local/bin/). I would have thought pipx would have had a trick for loading a package's own bin into $PATH while it's executing, but injecting that into a little wrapper before calling archivebox seems to do the trick! Apologies for the confusion and thanks for pointing me in the right direction :) Also, thanks for keeping this project maintained, it's an awesome piece of kit :) I'll have to pull in the latest changes!
Author
Owner

@pirate commented on GitHub (Sep 25, 2024):

Ok that makes sense, no worries, I can easily fix that pipx issue on my side, archivebox actually includes a whole interface with pipx now so I have code already to handle that case. I'll set it to auto find the supervisor binary in the pipx path like it does for things like ytdlp/playwright/etc and other runtime dependencies used for the extractors.

<!-- gh-comment-id:2375115426 --> @pirate commented on GitHub (Sep 25, 2024): Ok that makes sense, no worries, I can easily fix that pipx issue on my side, archivebox actually includes a whole interface with pipx now so I have code already to handle that case. I'll set it to auto find the supervisor binary in the pipx path like it does for things like ytdlp/playwright/etc and other runtime dependencies used for the extractors.
Author
Owner

@JitteryDoodle commented on GitHub (Oct 15, 2024):

Is it odd that I'm getting the "failed to start supervisord or connect to it!" error message when using the docker container on the dev branch?

╭──────────────────────────────────────────────────────────────────────────────╮
│ [2024-10-15 02:32:30] ArchiveBox v0.8.5rc44: archivebox server --quick-init  │
│ 0.0.0.0:8000                                                                 │
╰──────────────────────────────────────────────────────────────────────────────╯
[*] Verifying and updating existing ArchiveBox collection to v0.8.5rc44...
----------------------------------------------------------------------

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

[*] Verifying main SQL index and running any migrations needed...
    Operations to perform:
      Apply all migrations: admin, api, auth, contenttypes, core, huey_monitor, machine, sessions, singlefile
    Running migrations:
    No migrations to apply.
    Operations to perform:
      Apply all migrations: huey_monitor
    Running migrations:
    No migrations to apply.

    √ ./index.sqlite3

[*] Checking links from indexes and archive folders (safe to Ctrl+C)...
    √ Loaded 579 links from existing main index.
    > Skipping full snapshot directory check (quick mode)

----------------------------------------------------------------------
[√] Done. Verified and updated the existing ArchiveBox collection.

[+] Starting ArchiveBox webserver...
    > Logging errors to ./logs/errors.log
    > Starting ArchiveBox webserver on http://0.0.0.0:8000

[🦸‍♂️] Supervisord starting...
2024-10-15 02:32:31,953 WARN No file matches via include "/data/tmp/c42fa52e/workers/*.conf"
2024-10-15 02:32:31,953 INFO Set uid to user 911 succeeded
Unlinking stale socket /data/tmp/c42fa52e/supervisord.sock
Unlinking stale socket /data/tmp/c42fa52e/supervisord.sock
Unlinking stale socket /data/tmp/c42fa52e/supervisord.sock
Unlinking stale socket /data/tmp/c42fa52e/supervisord.sock
Unlinking stale socket /data/tmp/c42fa52e/supervisord.sock
Unlinking stale socket /data/tmp/c42fa52e/supervisord.sock
Unlinking stale socket /data/tmp/c42fa52e/supervisord.sock
Unlinking stale socket /data/tmp/c42fa52e/supervisord.sock
Unlinking stale socket /data/tmp/c42fa52e/supervisord.sock
Unlinking stale socket /data/tmp/c42fa52e/supervisord.sock
╭───────────────────── Traceback (most recent call last) ──────────────────────╮
│ /usr/local/bin/archivebox:8 in <module>                                      │
│                                                                              │
│   6 if __name__ == '__main__':                                               │
│   7 │   sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])     │
│ ❱ 8 │   sys.exit(main())                                                     │
│   9                                                                          │
│                                                                              │
│ ╭────────────────────────────── locals ───────────────────────────────╮      │
│ │  re = <module 're' from '/usr/local/lib/python3.11/re/__init__.py'> │      │
│ │ sys = <module 'sys' (built-in)>                                     │      │
│ ╰─────────────────────────────────────────────────────────────────────╯      │
│                                                                              │
│ /app/archivebox/cli/__init__.py:253 in main                                  │
│                                                                              │
│   251 │                                                                      │
│   252 │   try:                                                               │
│ ❱ 253 │   │   run_subcommand(                                                │
│   254 │   │   │   subcommand=command.subcommand,                             │
│   255 │   │   │   subcommand_args=command.subcommand_args,                   │
│                                                                              │
│ ╭───────────────────────────────── locals ─────────────────────────────────╮ │
│ │    args = ['server', '--quick-init', '0.0.0.0:8000']                     │ │
│ │ command = Namespace(help=False, version=False, subcommand='server',      │ │
│ │           subcommand_args=['--quick-init', '0.0.0.0:8000'])              │ │
│ │   group = <argparse._MutuallyExclusiveGroup object at 0x14e88f648650>    │ │
│ │  parser = ArgumentParser(prog='archivebox', usage=None,                  │ │
│ │           description='ArchiveBox: The self-hosted internet archive',    │ │
│ │           formatter_class=<class 'argparse.HelpFormatter'>,              │ │
│ │           conflict_handler='error', add_help=False)                      │ │
│ │     pwd = None                                                           │ │
│ │   stdin = <_io.TextIOWrapper name='<stdin>' mode='r' encoding='utf-8'>   │ │
│ ╰──────────────────────────────────────────────────────────────────────────╯ │
│                                                                              │
│ /app/archivebox/cli/__init__.py:179 in run_subcommand                        │
│                                                                              │
│   177 │                                                                      │
│   178 │   module = import_module('.archivebox_{}'.format(subcommand), __pack │
│ ❱ 179 │   module.main(args=subcommand_args, stdin=stdin, pwd=pwd)    # type: │
│   180 │                                                                      │
│   181 │   # wait for webhooks, signals, and other background jobs to finish  │
│                                                                              │
│ ╭───────────────────────────────── locals ─────────────────────────────────╮ │
│ │        check_db = False                                                  │ │
│ │ cmd_requires_db = True                                                   │ │
│ │    init_pending = True                                                   │ │
│ │          module = <module 'archivebox.cli.archivebox_server' from        │ │
│ │                   '/app/archivebox/cli/archivebox_server.py'>            │ │
│ │             pwd = None                                                   │ │
│ │           stdin = <_io.TextIOWrapper name='<stdin>' mode='r'             │ │
│ │                   encoding='utf-8'>                                      │ │
│ │      subcommand = 'server'                                               │ │
│ │ subcommand_args = ['--quick-init', '0.0.0.0:8000']                       │ │
│ ╰──────────────────────────────────────────────────────────────────────────╯ │
│                                                                              │
│ /app/archivebox/cli/archivebox_server.py:70 in main                          │
│                                                                              │
│   68 │   reject_stdin(__command__, stdin)                                    │
│   69 │                                                                       │
│ ❱ 70 │   server(                                                             │
│   71 │   │   runserver_args=command.runserver_args + (['--nothreading'] if c │
│   72 │   │   reload=command.reload,                                          │
│                                                                              │
│ ╭───────────────────────────────── locals ─────────────────────────────────╮ │
│ │    args = ['--quick-init', '0.0.0.0:8000']                               │ │
│ │ command = Namespace(runserver_args=['0.0.0.0:8000'], reload=False,       │ │
│ │           debug=False, nothreading=False, init=False, quick_init=True,   │ │
│ │           createsuperuser=False, daemonize=False)                        │ │
│ │  parser = ArgumentParser(prog='archivebox server', usage=None,           │ │
│ │           description='Run the ArchiveBox HTTP server',                  │ │
│ │           formatter_class=<class                                         │ │
│ │           'archivebox.logging_util.SmartFormatter'>,                     │ │
│ │           conflict_handler='error', add_help=True)                       │ │
│ │     pwd = None                                                           │ │
│ │   stdin = <_io.TextIOWrapper name='<stdin>' mode='r' encoding='utf-8'>   │ │
│ ╰──────────────────────────────────────────────────────────────────────────╯ │
│                                                                              │
│ /app/archivebox/misc/util.py:163 in typechecked_function                     │
│                                                                              │
│   161 │   │   │   check_argument_type(arg_key, arg_val)                      │
│   162 │   │                                                                  │
│ ❱ 163 │   │   return func(*args, **kwargs)                                   │
│   164 │                                                                      │
│   165 │   return typechecked_function                                        │
│                                                                              │
│ ╭───────────────────────────────── locals ─────────────────────────────────╮ │
│ │ arg_key = 'out_dir'                                                      │ │
│ │ arg_val = PosixPath('/data')                                             │ │
│ │    args = ()                                                             │ │
│ │  kwargs = {                                                              │ │
│ │           │   'runserver_args': ['0.0.0.0:8000'],                        │ │
│ │           │   'reload': False,                                           │ │
│ │           │   'debug': False,                                            │ │
│ │           │   'init': False,                                             │ │
│ │           │   'quick_init': True,                                        │ │
│ │           │   'createsuperuser': False,                                  │ │
│ │           │   'daemonize': False,                                        │ │
│ │           │   'out_dir': PosixPath('/data')                              │ │
│ │           }                                                              │ │
│ │     sig = <Signature (runserver_args: Optional[List[str]] = None,        │ │
│ │           reload: bool = False, debug: bool = False, init: bool = False, │ │
│ │           quick_init: bool = False, createsuperuser: bool = False,       │ │
│ │           daemonize: bool = False, out_dir: pathlib.Path =               │ │
│ │           PosixPath('/data')) -> None>                                   │ │
│ ╰──────────────────────────────────────────────────────────────────────────╯ │
│                                                                              │
│ /app/archivebox/main.py:1440 in server                                       │
│                                                                              │
│   1438 │   │   print()                                                       │
│   1439 │   │                                                                 │
│ ❱ 1440 │   │   start_server_workers(host=host, port=port, daemonize=False)   │
│   1441 │   │                                                                 │
│   1442 │   │   print("\n[i][green][🟩] ArchiveBox server shut down gracefull │
│                                                                              │
│ ╭─────────────── locals ───────────────╮                                     │
│ │ createsuperuser = False              │                                     │
│ │       daemonize = False              │                                     │
│ │           debug = False              │                                     │
│ │            host = '0.0.0.0'          │                                     │
│ │   host_and_port = '0.0.0.0:8000'     │                                     │
│ │            init = False              │                                     │
│ │         out_dir = PosixPath('/data') │                                     │
│ │            port = '8000'             │                                     │
│ │      quick_init = True               │                                     │
│ │          reload = False              │                                     │
│ │  runserver_args = ['0.0.0.0:8000']   │                                     │
│ ╰──────────────────────────────────────╯                                     │
│                                                                              │
│ /app/archivebox/queues/supervisor_util.py:285 in start_server_workers        │
│                                                                              │
│   283                                                                        │
│   284 def start_server_workers(host='0.0.0.0', port='8000', daemonize=False) │
│ ❱ 285 │   supervisor = get_or_create_supervisord_process(daemonize=daemonize │
│   286 │                                                                      │
│   287 │   bg_workers = [                                                     │
│                                                                              │
│ ╭─────── locals ────────╮                                                    │
│ │ daemonize = False     │                                                    │
│ │      host = '0.0.0.0' │                                                    │
│ │      port = '8000'    │                                                    │
│ ╰───────────────────────╯                                                    │
│                                                                              │
│ /app/archivebox/queues/supervisor_util.py:163 in                             │
│ get_or_create_supervisord_process                                            │
│                                                                              │
│   161 │   │   time.sleep(0.5)                                                │
│   162 │                                                                      │
│ ❱ 163 │   assert supervisor, "Failed to start supervisord or connect to it!" │
│   164 │   supervisor.getPID()  # make sure it doesn't throw an exception     │
│   165                                                                        │
│                                                                              │
│ ╭────── locals ──────╮                                                       │
│ │  daemonize = False │                                                       │
│ │ supervisor = None  │                                                       │
│ ╰────────────────────╯                                                       │
╰──────────────────────────────────────────────────────────────────────────────╯
<!-- gh-comment-id:2412694532 --> @JitteryDoodle commented on GitHub (Oct 15, 2024): Is it odd that I'm getting the "failed to start supervisord or connect to it!" error message when using the docker container on the dev branch? ``` ╭──────────────────────────────────────────────────────────────────────────────╮ │ [2024-10-15 02:32:30] ArchiveBox v0.8.5rc44: archivebox server --quick-init │ │ 0.0.0.0:8000 │ ╰──────────────────────────────────────────────────────────────────────────────╯ [*] Verifying and updating existing ArchiveBox collection to v0.8.5rc44... ---------------------------------------------------------------------- [*] Verifying archive folder structure... + ./archive, ./sources, ./logs... + ./ArchiveBox.conf... [*] Verifying main SQL index and running any migrations needed... Operations to perform: Apply all migrations: admin, api, auth, contenttypes, core, huey_monitor, machine, sessions, singlefile Running migrations: No migrations to apply. Operations to perform: Apply all migrations: huey_monitor Running migrations: No migrations to apply. √ ./index.sqlite3 [*] Checking links from indexes and archive folders (safe to Ctrl+C)... √ Loaded 579 links from existing main index. > Skipping full snapshot directory check (quick mode) ---------------------------------------------------------------------- [√] Done. Verified and updated the existing ArchiveBox collection. [+] Starting ArchiveBox webserver... > Logging errors to ./logs/errors.log > Starting ArchiveBox webserver on http://0.0.0.0:8000 [🦸‍♂️] Supervisord starting... 2024-10-15 02:32:31,953 WARN No file matches via include "/data/tmp/c42fa52e/workers/*.conf" 2024-10-15 02:32:31,953 INFO Set uid to user 911 succeeded Unlinking stale socket /data/tmp/c42fa52e/supervisord.sock Unlinking stale socket /data/tmp/c42fa52e/supervisord.sock Unlinking stale socket /data/tmp/c42fa52e/supervisord.sock Unlinking stale socket /data/tmp/c42fa52e/supervisord.sock Unlinking stale socket /data/tmp/c42fa52e/supervisord.sock Unlinking stale socket /data/tmp/c42fa52e/supervisord.sock Unlinking stale socket /data/tmp/c42fa52e/supervisord.sock Unlinking stale socket /data/tmp/c42fa52e/supervisord.sock Unlinking stale socket /data/tmp/c42fa52e/supervisord.sock Unlinking stale socket /data/tmp/c42fa52e/supervisord.sock ╭───────────────────── Traceback (most recent call last) ──────────────────────╮ │ /usr/local/bin/archivebox:8 in <module> │ │ │ │ 6 if __name__ == '__main__': │ │ 7 │ sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) │ │ ❱ 8 │ sys.exit(main()) │ │ 9 │ │ │ │ ╭────────────────────────────── locals ───────────────────────────────╮ │ │ │ re = <module 're' from '/usr/local/lib/python3.11/re/__init__.py'> │ │ │ │ sys = <module 'sys' (built-in)> │ │ │ ╰─────────────────────────────────────────────────────────────────────╯ │ │ │ │ /app/archivebox/cli/__init__.py:253 in main │ │ │ │ 251 │ │ │ 252 │ try: │ │ ❱ 253 │ │ run_subcommand( │ │ 254 │ │ │ subcommand=command.subcommand, │ │ 255 │ │ │ subcommand_args=command.subcommand_args, │ │ │ │ ╭───────────────────────────────── locals ─────────────────────────────────╮ │ │ │ args = ['server', '--quick-init', '0.0.0.0:8000'] │ │ │ │ command = Namespace(help=False, version=False, subcommand='server', │ │ │ │ subcommand_args=['--quick-init', '0.0.0.0:8000']) │ │ │ │ group = <argparse._MutuallyExclusiveGroup object at 0x14e88f648650> │ │ │ │ parser = ArgumentParser(prog='archivebox', usage=None, │ │ │ │ description='ArchiveBox: The self-hosted internet archive', │ │ │ │ formatter_class=<class 'argparse.HelpFormatter'>, │ │ │ │ conflict_handler='error', add_help=False) │ │ │ │ pwd = None │ │ │ │ stdin = <_io.TextIOWrapper name='<stdin>' mode='r' encoding='utf-8'> │ │ │ ╰──────────────────────────────────────────────────────────────────────────╯ │ │ │ │ /app/archivebox/cli/__init__.py:179 in run_subcommand │ │ │ │ 177 │ │ │ 178 │ module = import_module('.archivebox_{}'.format(subcommand), __pack │ │ ❱ 179 │ module.main(args=subcommand_args, stdin=stdin, pwd=pwd) # type: │ │ 180 │ │ │ 181 │ # wait for webhooks, signals, and other background jobs to finish │ │ │ │ ╭───────────────────────────────── locals ─────────────────────────────────╮ │ │ │ check_db = False │ │ │ │ cmd_requires_db = True │ │ │ │ init_pending = True │ │ │ │ module = <module 'archivebox.cli.archivebox_server' from │ │ │ │ '/app/archivebox/cli/archivebox_server.py'> │ │ │ │ pwd = None │ │ │ │ stdin = <_io.TextIOWrapper name='<stdin>' mode='r' │ │ │ │ encoding='utf-8'> │ │ │ │ subcommand = 'server' │ │ │ │ subcommand_args = ['--quick-init', '0.0.0.0:8000'] │ │ │ ╰──────────────────────────────────────────────────────────────────────────╯ │ │ │ │ /app/archivebox/cli/archivebox_server.py:70 in main │ │ │ │ 68 │ reject_stdin(__command__, stdin) │ │ 69 │ │ │ ❱ 70 │ server( │ │ 71 │ │ runserver_args=command.runserver_args + (['--nothreading'] if c │ │ 72 │ │ reload=command.reload, │ │ │ │ ╭───────────────────────────────── locals ─────────────────────────────────╮ │ │ │ args = ['--quick-init', '0.0.0.0:8000'] │ │ │ │ command = Namespace(runserver_args=['0.0.0.0:8000'], reload=False, │ │ │ │ debug=False, nothreading=False, init=False, quick_init=True, │ │ │ │ createsuperuser=False, daemonize=False) │ │ │ │ parser = ArgumentParser(prog='archivebox server', usage=None, │ │ │ │ description='Run the ArchiveBox HTTP server', │ │ │ │ formatter_class=<class │ │ │ │ 'archivebox.logging_util.SmartFormatter'>, │ │ │ │ conflict_handler='error', add_help=True) │ │ │ │ pwd = None │ │ │ │ stdin = <_io.TextIOWrapper name='<stdin>' mode='r' encoding='utf-8'> │ │ │ ╰──────────────────────────────────────────────────────────────────────────╯ │ │ │ │ /app/archivebox/misc/util.py:163 in typechecked_function │ │ │ │ 161 │ │ │ check_argument_type(arg_key, arg_val) │ │ 162 │ │ │ │ ❱ 163 │ │ return func(*args, **kwargs) │ │ 164 │ │ │ 165 │ return typechecked_function │ │ │ │ ╭───────────────────────────────── locals ─────────────────────────────────╮ │ │ │ arg_key = 'out_dir' │ │ │ │ arg_val = PosixPath('/data') │ │ │ │ args = () │ │ │ │ kwargs = { │ │ │ │ │ 'runserver_args': ['0.0.0.0:8000'], │ │ │ │ │ 'reload': False, │ │ │ │ │ 'debug': False, │ │ │ │ │ 'init': False, │ │ │ │ │ 'quick_init': True, │ │ │ │ │ 'createsuperuser': False, │ │ │ │ │ 'daemonize': False, │ │ │ │ │ 'out_dir': PosixPath('/data') │ │ │ │ } │ │ │ │ sig = <Signature (runserver_args: Optional[List[str]] = None, │ │ │ │ reload: bool = False, debug: bool = False, init: bool = False, │ │ │ │ quick_init: bool = False, createsuperuser: bool = False, │ │ │ │ daemonize: bool = False, out_dir: pathlib.Path = │ │ │ │ PosixPath('/data')) -> None> │ │ │ ╰──────────────────────────────────────────────────────────────────────────╯ │ │ │ │ /app/archivebox/main.py:1440 in server │ │ │ │ 1438 │ │ print() │ │ 1439 │ │ │ │ ❱ 1440 │ │ start_server_workers(host=host, port=port, daemonize=False) │ │ 1441 │ │ │ │ 1442 │ │ print("\n[i][green][🟩] ArchiveBox server shut down gracefull │ │ │ │ ╭─────────────── locals ───────────────╮ │ │ │ createsuperuser = False │ │ │ │ daemonize = False │ │ │ │ debug = False │ │ │ │ host = '0.0.0.0' │ │ │ │ host_and_port = '0.0.0.0:8000' │ │ │ │ init = False │ │ │ │ out_dir = PosixPath('/data') │ │ │ │ port = '8000' │ │ │ │ quick_init = True │ │ │ │ reload = False │ │ │ │ runserver_args = ['0.0.0.0:8000'] │ │ │ ╰──────────────────────────────────────╯ │ │ │ │ /app/archivebox/queues/supervisor_util.py:285 in start_server_workers │ │ │ │ 283 │ │ 284 def start_server_workers(host='0.0.0.0', port='8000', daemonize=False) │ │ ❱ 285 │ supervisor = get_or_create_supervisord_process(daemonize=daemonize │ │ 286 │ │ │ 287 │ bg_workers = [ │ │ │ │ ╭─────── locals ────────╮ │ │ │ daemonize = False │ │ │ │ host = '0.0.0.0' │ │ │ │ port = '8000' │ │ │ ╰───────────────────────╯ │ │ │ │ /app/archivebox/queues/supervisor_util.py:163 in │ │ get_or_create_supervisord_process │ │ │ │ 161 │ │ time.sleep(0.5) │ │ 162 │ │ │ ❱ 163 │ assert supervisor, "Failed to start supervisord or connect to it!" │ │ 164 │ supervisor.getPID() # make sure it doesn't throw an exception │ │ 165 │ │ │ │ ╭────── locals ──────╮ │ │ │ daemonize = False │ │ │ │ supervisor = None │ │ │ ╰────────────────────╯ │ ╰──────────────────────────────────────────────────────────────────────────────╯ ```
Author
Owner

@michaeltieso commented on GitHub (Oct 16, 2024):

Has there been any updates to this? I'm getting the same issue on the dev branch.

<!-- gh-comment-id:2417508424 --> @michaeltieso commented on GitHub (Oct 16, 2024): Has there been any updates to this? I'm getting the same issue on the dev branch.
Author
Owner

@pirate commented on GitHub (Oct 16, 2024):

Huh I pushed several fixes that should work for the earlier issue, so it's likely a different original cause or at least some new bug.

Can you open a new issue plz with logs and version output.

<!-- gh-comment-id:2417737298 --> @pirate commented on GitHub (Oct 16, 2024): Huh I pushed several fixes that should work for the earlier issue, so it's likely a different original cause or at least some new bug. Can you open a new issue plz with logs and version output.
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#902
No description provided.