[GH-ISSUE #1665] Bug: Fails to stop a supervisord process that doesn't exist #996

Open
opened 2026-03-01 14:47:47 +03:00 by kerem · 0 comments
Owner

Originally created by @sclu1034 on GitHub (Feb 26, 2025).
Original GitHub issue: https://github.com/ArchiveBox/ArchiveBox/issues/1665

Originally assigned to: @pirate on GitHub.

Provide a screenshot and describe the bug

During startup, ArchiveBox failed consistently by trying to terminate a supervisord process that didn't exist.

It took me a while to figure out that there is a /data/tmp/supervisord.pid file that can outlive previous instances, because it's in the persisted /data volume. This made ArchiveBox incorrectly believe that a process was already running.

Deleting the file solved my issue for the time being, but some suggestions to improve this:

  • Given that all documentation points out /data as the directory to store permanently, putting a tmp folder in there seems rather counter-productive. If, for some reason, the application architecture demands that anyways, the documentation should point out this folder (e.g. the example docker-compose.yml could include a volume entry to mount it to the host's /tmp)
  • Since the supervisord process can never outlive the container, the PID file should never outlive the container either. I.e. it should be written to the container's internal /tmp, not to a volume that may be persisted outside the container
  • The function stop_existing_supervisord_process should recognize the scenario where a PID file exists but no matching process, and correctly clean up the file, then proceed startup as usual.

Steps to reproduce

1. Create a file `/data/tmp/supervisord.pid` with some random number as content (to simulate it not having been cleaned up by a previous instance)
2. Start ArchiveBox

Logs or errors

[i] [2025-02-26 08:38:48] ArchiveBox v0.8.4: archivebox server --quick-init 0.0.0.0:8000
    > /data
[*] Verifying and updating existing ArchiveBox collection to v0.8.4...
----------------------------------------------------------------------
[*] 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, 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 1637 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
Error connecting to existing supervisord: [Errno 111] Connection refused
[🦸‍♂️] Stopping supervisord process (pid=161)...
╭───────────────────── Traceback (most recent call last) ──────────────────────╮
│ /usr/local/lib/python3.11/site-packages/psutil/_pslinux.py:1717 in wrapper   │
│                                                                              │
│   1714 │   @functools.wraps(fun)                                             │
│   1715 │   def wrapper(self, *args, **kwargs):                               │
│   1716 │   │   try:                                                          │
│ ❱ 1717 │   │   │   return fun(self, *args, **kwargs)                         │
│   1718 │   │   except PermissionError:                                       │
│   1719 │   │   │   raise AccessDenied(self.pid, self._name)                  │
│   1720 │   │   except ProcessLookupError:                                    │
│                                                                              │
│ ╭──────────────────────────── locals ────────────────────────────╮           │
│ │   args = ()                                                    │           │
│ │    fun = <function Process._parse_stat_file at 0x14e57859f060> │           │
│ │ kwargs = {}                                                    │           │
│ │   self = <psutil._pslinux.Process object at 0x14e5787bfbf0>    │           │
│ ╰────────────────────────────────────────────────────────────────╯           │
│                                                                              │
│ /usr/local/lib/python3.11/site-packages/psutil/_common.py:508 in wrapper     │
│                                                                              │
│   505 │   │   │   try:                                                       │
│   506 │   │   │   │   return fun(self)                                       │
│   507 │   │   │   except Exception as err:  # noqa: BLE001                   │
│ ❱ 508 │   │   │   │   raise raise_from(err, None)                            │
│   509 │   │   except KeyError:                                               │
│   510 │   │   │   # case 3: we entered oneshot() ctx but there's no cache    │511 │   │   │   # for this entry yet                                       │
│                                                                              │
│ ╭─────────────────────────── locals ───────────────────────────╮             │
│ │  fun = <function Process._parse_stat_file at 0x14e57859efc0> │             │
│ │ self = <psutil._pslinux.Process object at 0x14e5787bfbf0>    │             │
│ ╰──────────────────────────────────────────────────────────────╯             │
│ in raise_from:3                                                              │
│ ╭───── locals ──────╮                                                        │
│ │ from_value = None │                                                        │
│ │      value = None │                                                        │
│ ╰───────────────────╯                                                        │
│                                                                              │
│ /usr/local/lib/python3.11/site-packages/psutil/_common.py:506 in wrapper     │
│                                                                              │
│   503 │   │   except AttributeError:                                         │
│   504 │   │   │   # case 2: we never entered oneshot() ctx                   │505 │   │   │   try:                                                       │
│ ❱ 506 │   │   │   │   return fun(self)                                       │
│   507 │   │   │   except Exception as err:  # noqa: BLE001                   │508 │   │   │   │   raise raise_from(err, None)                            │
│   509 │   │   except KeyError:                                               │
│                                                                              │
│ ╭─────────────────────────── locals ───────────────────────────╮             │
│ │  fun = <function Process._parse_stat_file at 0x14e57859efc0> │             │
│ │ self = <psutil._pslinux.Process object at 0x14e5787bfbf0>    │             │
│ ╰──────────────────────────────────────────────────────────────╯             │
│                                                                              │
│ /usr/local/lib/python3.11/site-packages/psutil/_pslinux.py:1780 in           │
│ _parse_stat_file                                                             │
│                                                                              │
│   1777 │   │   The return value is cached in case oneshot() ctx manager is   │
│   1778 │   │   in use.                                                       │
│   1779 │   │   """                                                           │
│ ❱ 1780 │   │   data = bcat("%s/%s/stat" % (self._procfs_path, self.pid))     │
│   1781 │   │   # Process name is between parentheses. It can contain spaces  │
│   1782 │   │   # other parentheses. This is taken into account by looking fo │
│   1783 │   │   # the first occurrence of "(" and the last occurrence of ")". │
│                                                                              │
│ ╭───────────────────────── locals ──────────────────────────╮                │
│ │ self = <psutil._pslinux.Process object at 0x14e5787bfbf0> │                │
│ ╰───────────────────────────────────────────────────────────╯                │
│                                                                              │
│ /usr/local/lib/python3.11/site-packages/psutil/_common.py:851 in bcat        │
│                                                                              │
│   848                                                                        │
│   849 def bcat(fname, fallback=_DEFAULT):                                    │
│   850 │   """Same as above but opens file in binary mode."""                 │
│ ❱ 851 │   return cat(fname, fallback=fallback, _open=open_binary)            │
│   852                                                                        │
│   853                                                                        │
│   854 def bytes2human(n, format="%(value).1f%(symbol)s"):                    │
│                                                                              │
│ ╭─────────────────── locals ───────────────────╮                             │
│ │ fallback = <object object at 0x14e578a1d9d0> │                             │
│ │    fname = '/proc/161/stat'                  │                             │
│ ╰──────────────────────────────────────────────╯                             │
│                                                                              │
│ /usr/local/lib/python3.11/site-packages/psutil/_common.py:839 in cat         │
│                                                                              │
│   836 │   it can't be read().                                                │
│   837 │   """                                                                │
│   838if fallback is _DEFAULT:                                           │
│ ❱ 839 │   │   with _open(fname) as f:                                        │
│   840 │   │   │   return f.read()                                            │
│   841else:                                                              │
│   842 │   │   try:                                                           │
│                                                                              │
│ ╭────────────────────── locals ───────────────────────╮                      │
│ │    _open = <function open_binary at 0x14e57856cf40> │                      │
│ │ fallback = <object object at 0x14e578a1d9d0>        │                      │
│ │    fname = '/proc/161/stat'                         │                      │
│ ╰─────────────────────────────────────────────────────╯                      │
│                                                                              │
│ /usr/local/lib/python3.11/site-packages/psutil/_common.py:799 in open_binary │
│                                                                              │
│   796                                                                        │
│   797                                                                        │
│   798 def open_binary(fname):                                                │
│ ❱ 799return open(fname, "rb", buffering=FILE_READ_BUFFER_SIZE)          │
│   800                                                                        │
│   801                                                                        │
│   802 def open_text(fname):                                                  │
│                                                                              │
│ ╭───────── locals ─────────╮                                                 │
│ │ fname = '/proc/161/stat' │                                                 │
│ ╰──────────────────────────╯                                                 │
╰──────────────────────────────────────────────────────────────────────────────╯
FileNotFoundError: [Errno 2] No such file or directory: '/proc/161/stat'
During handling of the above exception, another exception occurred:
╭───────────────────── Traceback (most recent call last) ──────────────────────╮
│ /usr/local/lib/python3.11/site-packages/psutil/__init__.py:355 in _init      │
│                                                                              │
│    352 │   │   self._exitcode = _SENTINEL                                    │
│    353 │   │   # cache creation time for later use in is_running() method    │354 │   │   try:                                                          │
│ ❱  355 │   │   │   self.create_time()                                        │
│    356 │   │   except AccessDenied:                                          │
│    357 │   │   │   # We should never get here as AFAIK we're able to get     │358 │   │   │   # process creation time on all platforms even as a        │
│                                                                              │
│ ╭────────────────────────── locals ──────────────────────────╮               │
│ │ _ignore_nsp = False                                        │               │
│ │         msg = 'process PID not found'                      │               │
│ │         pid = 161                                          │               │
│ │        self = psutil.Process(pid=161, status='terminated') │               │
│ ╰────────────────────────────────────────────────────────────╯               │
│                                                                              │
│ /usr/local/lib/python3.11/site-packages/psutil/__init__.py:757 in            │
│ create_time                                                                  │
│                                                                              │
│    754 │   │   The return value is cached after first call.                  │
│    755 │   │   """                                                           │
│    756 │   │   if self._create_time is None:                                 │
│ ❱  757 │   │   │   self._create_time = self._proc.create_time()              │
│    758 │   │   return self._create_time                                      │
│    759 │                                                                     │
│    760 │   def cwd(self):                                                    │
│                                                                              │
│ ╭────────────────────── locals ───────────────────────╮                      │
│ │ self = psutil.Process(pid=161, status='terminated') │                      │
│ ╰─────────────────────────────────────────────────────╯                      │
│                                                                              │
│ /usr/local/lib/python3.11/site-packages/psutil/_pslinux.py:1717 in wrapper   │
│                                                                              │
│   1714 │   @functools.wraps(fun)                                             │
│   1715 │   def wrapper(self, *args, **kwargs):                               │
│   1716 │   │   try:                                                          │
│ ❱ 1717 │   │   │   return fun(self, *args, **kwargs)                         │
│   1718 │   │   except PermissionError:                                       │
│   1719 │   │   │   raise AccessDenied(self.pid, self._name)                  │
│   1720 │   │   except ProcessLookupError:                                    │
│                                                                              │
│ ╭────────────────────────── locals ───────────────────────────╮              │
│ │   args = ()                                                 │              │
│ │    fun = <function Process.create_time at 0x14e5785a85e0>   │              │
│ │ kwargs = {}                                                 │              │
│ │   self = <psutil._pslinux.Process object at 0x14e5787bfbf0> │              │
│ ╰─────────────────────────────────────────────────────────────╯              │
│                                                                              │
│ /usr/local/lib/python3.11/site-packages/psutil/_pslinux.py:1948 in           │
│ create_time                                                                  │
│                                                                              │
│   1945 │                                                                     │
│   1946 │   @wrap_exceptions                                                  │
│   1947 │   def create_time(self):                                            │
│ ❱ 1948 │   │   ctime = float(self._parse_stat_file()['create_time'])         │
│   1949 │   │   # According to documentation, starttime is in field 21 and th │
│   1950 │   │   # unit is jiffies (clock ticks).                              │
│   1951 │   │   # We first divide it for clock ticks and then add uptime retu │
│                                                                              │
│ ╭───────────────────────── locals ──────────────────────────╮                │
│ │ self = <psutil._pslinux.Process object at 0x14e5787bfbf0> │                │
│ ╰───────────────────────────────────────────────────────────╯                │
│                                                                              │
│ /usr/local/lib/python3.11/site-packages/psutil/_pslinux.py:1726 in wrapper   │
│                                                                              │
│   1723 │   │   except FileNotFoundError:                                     │
│   1724 │   │   │   self._raise_if_zombie()                                   │
│   1725 │   │   │   if not os.path.exists("%s/%s" % (self._procfs_path, self. │
│ ❱ 1726 │   │   │   │   raise NoSuchProcess(self.pid, self._name)             │
│   1727 │   │   │   raise                                                     │
│   1728 │                                                                     │
│   1729 │   return wrapper                                                    │
│                                                                              │
│ ╭──────────────────────────── locals ────────────────────────────╮           │
│ │   args = ()                                                    │           │
│ │    fun = <function Process._parse_stat_file at 0x14e57859f060> │           │
│ │ kwargs = {}                                                    │           │
│ │   self = <psutil._pslinux.Process object at 0x14e5787bfbf0>    │           │
│ ╰────────────────────────────────────────────────────────────────╯           │
╰──────────────────────────────────────────────────────────────────────────────╯
NoSuchProcess: process no longer exists (pid=161)
During handling of the above exception, another exception occurred:
╭───────────────────── Traceback (most recent call last) ──────────────────────╮
│ /usr/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 0x14e57a8be5c0>                             │     │
│ │   re = <module 're' from '/usr/local/lib/python3.11/re/__init__.py'> │     │
│ │  sys = <module 'sys' (built-in)>                                     │     │
│ ╰──────────────────────────────────────────────────────────────────────╯     │
│                                                                              │
│ /app/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', '--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            │ │
│ │                   0x14e57dc5bb50>                                        │ │
│ │ log_cli_command = <function log_cli_command at 0x14e57a839c60>           │ │
│ │          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                                             │ │
│ │                   }                                                      │ │
│ ╰──────────────────────────────────────────────────────────────────────────╯ │
│                                                                              │
│ /app/archivebox/cli/__init__.py:118 in run_subcommand                        │
│                                                                              │
│   115 │   │   │   check_migrations()                                         │
│   116 │                                                                      │
│   117 │   module = import_module('.archivebox_{}'.format(subcommand), __pack │
│ ❱ 118 │   module.main(args=subcommand_args, stdin=stdin, pwd=pwd)    # type: │
│   119 │                                                                      │
│   120 │   # wait for webhooks, signals, and other background jobs to finish  │
│   121 │   wait_for_bg_threads_to_exit(timeout=60)                            │
│                                                                              │
│ ╭───────────────────────────────── locals ─────────────────────────────────╮ │
│ │ cmd_requires_db = False                                                  │ │
│ │    init_pending = True                                                   │ │
│ │          module = <module 'archivebox.cli.archivebox_server' from        │ │
│ │                   '/app/archivebox/cli/archivebox_server.py'>            │ │
│ │             pwd = PosixPath('/data')                                     │ │
│ │    setup_django = <function setup_django at 0x14e57b261b20>              │ │
│ │           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: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 c │
│   66 │   │   reload=command.reload,                                          │
│   67 │   │   debug=command.debug,                                            │
│                                                                              │
│ ╭───────────────────────────────── 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)                                         │ │
│ │  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('/data')                                             │ │
│ │   stdin = <_io.TextIOWrapper name='<stdin>' mode='r' encoding='utf-8'>   │ │
│ ╰──────────────────────────────────────────────────────────────────────────╯ │
│                                                                              │
│ /app/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('/data')                                 │ │
│ │                args = ()                                                 │ │
│ │ check_argument_type = <function                                          │ │
│ │                       enforce_types.<locals>.typechecked_function.<loca… │ │
│ │                       at 0x14e57874e5c0>                                 │ │
│ │                func = <function server at 0x14e57a6f7380>                │ │
│ │              kwargs = {                                                  │ │
│ │                       │   'runserver_args': [                            │ │
│ │                       │   │   '0.0.0.0:8000',                            │ │
│ │                       │   │   '--noreload'                               │ │
│ │                       │   ],                                             │ │
│ │                       │   'reload': False,                               │ │
│ │                       │   'debug': False,                                │ │
│ │                       │   'init': False,                                 │ │
│ │                       │   'quick_init': True,                            │ │
│ │                       │   'createsuperuser': 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, out_dir:            │ │
│ │                       pathlib.Path = PosixPath('/data')) -> None>        │ │
│ ╰──────────────────────────────────────────────────────────────────────────╯ │
│                                                                              │
│ /app/archivebox/main.py:1376 in server                                       │
│                                                                              │
│   1373 │   │   from queues.supervisor_util import get_or_create_supervisord_ │
│   1374 │   │                                                                 │
│   1375 │   │   print()                                                       │
│ ❱ 1376 │   │   supervisor = get_or_create_supervisord_process(daemonize=Fals │
│   1377 │   │                                                                 │
│   1378 │   │   bg_workers = [                                                │
│   1379 │   │   │   {                                                         │
│                                                                              │
│ ╭───────────────────────────────── locals ─────────────────────────────────╮ │
│ │                      call_command = <function call_command at            │ │
│ │                                     0x14e57c1ee660>                      │ │
│ │                            config = <module 'archivebox.config' from     │ │
│ │                                     '/app/archivebox/config.py'>         │ │
│ │                   createsuperuser = False                                │ │
│ │                             debug = False                                │ │
│ │ get_or_create_supervisord_process = <function                            │ │
│ │                                     get_or_create_supervisord_process at │ │
│ │                                     0x14e5784125c0>                      │ │
│ │                              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', '--noreload']       │ │
│ │                      start_worker = <function start_worker at            │ │
│ │                                     0x14e578412660>                      │ │
│ │                       stop_worker = <function stop_worker at             │ │
│ │                                     0x14e578412840>                      │ │
│ │                              User = <class                               │ │
│ │                                     'django.contrib.auth.models.User'>   │ │
│ │                      watch_worker = <function watch_worker at            │ │
│ │                                     0x14e578412700>                      │ │
│ ╰──────────────────────────────────────────────────────────────────────────╯ │
│                                                                              │
│ /app/archivebox/queues/supervisor_util.py:134 in                             │
│ get_or_create_supervisord_process                                            │
│                                                                              │
│   131 def get_or_create_supervisord_process(daemonize=True):                 │
│   132 │   supervisor = get_existing_supervisord_process()                    │
│   133 │   if supervisor is None:                                             │
│ ❱ 134 │   │   stop_existing_supervisord_process()                            │
│   135 │   │   supervisor = start_new_supervisord_process(daemonize=daemonize │
│   136 │                                                                      │
│   137 │   assert supervisor and supervisor.getPID(), "Failed to start superv │
│                                                                              │
│ ╭────── locals ──────╮                                                       │
│ │  daemonize = False │                                                       │
│ │ supervisor = None  │                                                       │
│ ╰────────────────────╯                                                       │
│                                                                              │
│ /app/archivebox/queues/supervisor_util.py:90 in                              │
│ stop_existing_supervisord_process                                            │
│                                                                              │
│    87 │                                                                      │
│    88 │   try:                                                               │
│    89 │   │   print(f"[🦸‍♂️] Stopping supervisord process (pid={pid})...")    │
│ ❱  90 │   │   proc = psutil.Process(pid)                                     │
│    91 │   │   proc.terminate()                                               │
│    92 │   │   proc.wait()                                                    │
│    93 │   except Exception:                                                  │
│                                                                              │
│ ╭─ locals ──╮                                                                │
│ │ pid = 161 │                                                                │
│ ╰───────────╯                                                                │
│                                                                              │
│ /usr/local/lib/python3.11/site-packages/psutil/__init__.py:319 in __init__   │
│                                                                              │
│    316"""                                                               │
│    317 │                                                                     │
│    318 │   def __init__(self, pid=None):                                     │
│ ❱  319 │   │   self._init(pid)                                               │
│    320 │                                                                     │
│    321 │   def _init(self, pid, _ignore_nsp=False):                          │
│    322 │   │   if pid is None:                                               │
│                                                                              │
│ ╭────────────────────── locals ───────────────────────╮                      │
│ │  pid = 161                                          │                      │
│ │ self = psutil.Process(pid=161, status='terminated') │                      │
│ ╰─────────────────────────────────────────────────────╯                      │
│                                                                              │
│ /usr/local/lib/python3.11/site-packages/psutil/__init__.py:368 in _init      │
│                                                                              │
│    365 │   │   except NoSuchProcess:                                         │
│    366 │   │   │   if not _ignore_nsp:                                       │
│    367 │   │   │   │   msg = "process PID not found"                         │
│ ❱  368 │   │   │   │   raise NoSuchProcess(pid, msg=msg)                     │
│    369 │   │   │   else:                                                     │
│    370 │   │   │   │   self._gone = True                                     │
│    371 │   │   # This pair is supposed to identify a Process instance        │
│                                                                              │
│ ╭────────────────────────── locals ──────────────────────────╮               │
│ │ _ignore_nsp = False                                        │               │
│ │         msg = 'process PID not found'                      │               │
│ │         pid = 161                                          │               │
│ │        self = psutil.Process(pid=161, status='terminated') │               │
│ ╰────────────────────────────────────────────────────────────╯               │
╰──────────────────────────────────────────────────────────────────────────────╯
NoSuchProcess: process PID not found (pid=161)

ArchiveBox Version

0.8.4 according to the log
(can't run `version` when it doesn't start)

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

Docker (or Podman/LXC/K8s/TrueNAS/Proxmox/etc)

What operating system are you running on?

Unraid

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

  • some of data/ is on a local SSD or NVMe drive
  • some of data/ is on a spinning hard drive or external USB drive
  • some of data/ is on a network mount (e.g. NFS/SMB/Ceph/GlusterFS/etc.)
  • some of data/ is on a FUSE mount (e.g. SSHFS/RClone/S3/B2/Google Drive/Dropbox/etc.)

Docker Compose Configuration


ArchiveBox Configuration


Originally created by @sclu1034 on GitHub (Feb 26, 2025). Original GitHub issue: https://github.com/ArchiveBox/ArchiveBox/issues/1665 Originally assigned to: @pirate on GitHub. ### Provide a screenshot and describe the bug During startup, ArchiveBox failed consistently by trying to terminate a supervisord process that didn't exist. It took me a while to figure out that there is a `/data/tmp/supervisord.pid` file that can outlive previous instances, because it's in the persisted `/data` volume. This made ArchiveBox incorrectly believe that a process was already running. Deleting the file solved my issue for the time being, but some suggestions to improve this: - Given that all documentation points out `/data` as the directory to store permanently, putting a `tmp` folder in there seems rather counter-productive. If, for some reason, the application architecture demands that anyways, the documentation should point out this folder (e.g. the example `docker-compose.yml` could include a volume entry to mount it to the host's `/tmp`) - Since the supervisord process can never outlive the container, the PID file should never outlive the container either. I.e. it should be written to the container's _internal_ `/tmp`, not to a volume that may be persisted outside the container - The function `stop_existing_supervisord_process` should recognize the scenario where a PID file exists but no matching process, and correctly clean up the file, then proceed startup as usual. ### Steps to reproduce ```markdown 1. Create a file `/data/tmp/supervisord.pid` with some random number as content (to simulate it not having been cleaned up by a previous instance) 2. Start ArchiveBox ``` ### Logs or errors ```shell [i] [2025-02-26 08:38:48] ArchiveBox v0.8.4: archivebox server --quick-init 0.0.0.0:8000 > /data [*] Verifying and updating existing ArchiveBox collection to v0.8.4... ---------------------------------------------------------------------- [*] 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, 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 1637 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 Error connecting to existing supervisord: [Errno 111] Connection refused [🦸‍♂️] Stopping supervisord process (pid=161)... ╭───────────────────── Traceback (most recent call last) ──────────────────────╮ │ /usr/local/lib/python3.11/site-packages/psutil/_pslinux.py:1717 in wrapper │ │ │ │ 1714 │ @functools.wraps(fun) │ │ 1715 │ def wrapper(self, *args, **kwargs): │ │ 1716 │ │ try: │ │ ❱ 1717 │ │ │ return fun(self, *args, **kwargs) │ │ 1718 │ │ except PermissionError: │ │ 1719 │ │ │ raise AccessDenied(self.pid, self._name) │ │ 1720 │ │ except ProcessLookupError: │ │ │ │ ╭──────────────────────────── locals ────────────────────────────╮ │ │ │ args = () │ │ │ │ fun = <function Process._parse_stat_file at 0x14e57859f060> │ │ │ │ kwargs = {} │ │ │ │ self = <psutil._pslinux.Process object at 0x14e5787bfbf0> │ │ │ ╰────────────────────────────────────────────────────────────────╯ │ │ │ │ /usr/local/lib/python3.11/site-packages/psutil/_common.py:508 in wrapper │ │ │ │ 505 │ │ │ try: │ │ 506 │ │ │ │ return fun(self) │ │ 507 │ │ │ except Exception as err: # noqa: BLE001 │ │ ❱ 508 │ │ │ │ raise raise_from(err, None) │ │ 509 │ │ except KeyError: │ │ 510 │ │ │ # case 3: we entered oneshot() ctx but there's no cache │ │ 511 │ │ │ # for this entry yet │ │ │ │ ╭─────────────────────────── locals ───────────────────────────╮ │ │ │ fun = <function Process._parse_stat_file at 0x14e57859efc0> │ │ │ │ self = <psutil._pslinux.Process object at 0x14e5787bfbf0> │ │ │ ╰──────────────────────────────────────────────────────────────╯ │ │ in raise_from:3 │ │ ╭───── locals ──────╮ │ │ │ from_value = None │ │ │ │ value = None │ │ │ ╰───────────────────╯ │ │ │ │ /usr/local/lib/python3.11/site-packages/psutil/_common.py:506 in wrapper │ │ │ │ 503 │ │ except AttributeError: │ │ 504 │ │ │ # case 2: we never entered oneshot() ctx │ │ 505 │ │ │ try: │ │ ❱ 506 │ │ │ │ return fun(self) │ │ 507 │ │ │ except Exception as err: # noqa: BLE001 │ │ 508 │ │ │ │ raise raise_from(err, None) │ │ 509 │ │ except KeyError: │ │ │ │ ╭─────────────────────────── locals ───────────────────────────╮ │ │ │ fun = <function Process._parse_stat_file at 0x14e57859efc0> │ │ │ │ self = <psutil._pslinux.Process object at 0x14e5787bfbf0> │ │ │ ╰──────────────────────────────────────────────────────────────╯ │ │ │ │ /usr/local/lib/python3.11/site-packages/psutil/_pslinux.py:1780 in │ │ _parse_stat_file │ │ │ │ 1777 │ │ The return value is cached in case oneshot() ctx manager is │ │ 1778 │ │ in use. │ │ 1779 │ │ """ │ │ ❱ 1780 │ │ data = bcat("%s/%s/stat" % (self._procfs_path, self.pid)) │ │ 1781 │ │ # Process name is between parentheses. It can contain spaces │ │ 1782 │ │ # other parentheses. This is taken into account by looking fo │ │ 1783 │ │ # the first occurrence of "(" and the last occurrence of ")". │ │ │ │ ╭───────────────────────── locals ──────────────────────────╮ │ │ │ self = <psutil._pslinux.Process object at 0x14e5787bfbf0> │ │ │ ╰───────────────────────────────────────────────────────────╯ │ │ │ │ /usr/local/lib/python3.11/site-packages/psutil/_common.py:851 in bcat │ │ │ │ 848 │ │ 849 def bcat(fname, fallback=_DEFAULT): │ │ 850 │ """Same as above but opens file in binary mode.""" │ │ ❱ 851 │ return cat(fname, fallback=fallback, _open=open_binary) │ │ 852 │ │ 853 │ │ 854 def bytes2human(n, format="%(value).1f%(symbol)s"): │ │ │ │ ╭─────────────────── locals ───────────────────╮ │ │ │ fallback = <object object at 0x14e578a1d9d0> │ │ │ │ fname = '/proc/161/stat' │ │ │ ╰──────────────────────────────────────────────╯ │ │ │ │ /usr/local/lib/python3.11/site-packages/psutil/_common.py:839 in cat │ │ │ │ 836 │ it can't be read(). │ │ 837 │ """ │ │ 838 │ if fallback is _DEFAULT: │ │ ❱ 839 │ │ with _open(fname) as f: │ │ 840 │ │ │ return f.read() │ │ 841 │ else: │ │ 842 │ │ try: │ │ │ │ ╭────────────────────── locals ───────────────────────╮ │ │ │ _open = <function open_binary at 0x14e57856cf40> │ │ │ │ fallback = <object object at 0x14e578a1d9d0> │ │ │ │ fname = '/proc/161/stat' │ │ │ ╰─────────────────────────────────────────────────────╯ │ │ │ │ /usr/local/lib/python3.11/site-packages/psutil/_common.py:799 in open_binary │ │ │ │ 796 │ │ 797 │ │ 798 def open_binary(fname): │ │ ❱ 799 │ return open(fname, "rb", buffering=FILE_READ_BUFFER_SIZE) │ │ 800 │ │ 801 │ │ 802 def open_text(fname): │ │ │ │ ╭───────── locals ─────────╮ │ │ │ fname = '/proc/161/stat' │ │ │ ╰──────────────────────────╯ │ ╰──────────────────────────────────────────────────────────────────────────────╯ FileNotFoundError: [Errno 2] No such file or directory: '/proc/161/stat' During handling of the above exception, another exception occurred: ╭───────────────────── Traceback (most recent call last) ──────────────────────╮ │ /usr/local/lib/python3.11/site-packages/psutil/__init__.py:355 in _init │ │ │ │ 352 │ │ self._exitcode = _SENTINEL │ │ 353 │ │ # cache creation time for later use in is_running() method │ │ 354 │ │ try: │ │ ❱ 355 │ │ │ self.create_time() │ │ 356 │ │ except AccessDenied: │ │ 357 │ │ │ # We should never get here as AFAIK we're able to get │ │ 358 │ │ │ # process creation time on all platforms even as a │ │ │ │ ╭────────────────────────── locals ──────────────────────────╮ │ │ │ _ignore_nsp = False │ │ │ │ msg = 'process PID not found' │ │ │ │ pid = 161 │ │ │ │ self = psutil.Process(pid=161, status='terminated') │ │ │ ╰────────────────────────────────────────────────────────────╯ │ │ │ │ /usr/local/lib/python3.11/site-packages/psutil/__init__.py:757 in │ │ create_time │ │ │ │ 754 │ │ The return value is cached after first call. │ │ 755 │ │ """ │ │ 756 │ │ if self._create_time is None: │ │ ❱ 757 │ │ │ self._create_time = self._proc.create_time() │ │ 758 │ │ return self._create_time │ │ 759 │ │ │ 760 │ def cwd(self): │ │ │ │ ╭────────────────────── locals ───────────────────────╮ │ │ │ self = psutil.Process(pid=161, status='terminated') │ │ │ ╰─────────────────────────────────────────────────────╯ │ │ │ │ /usr/local/lib/python3.11/site-packages/psutil/_pslinux.py:1717 in wrapper │ │ │ │ 1714 │ @functools.wraps(fun) │ │ 1715 │ def wrapper(self, *args, **kwargs): │ │ 1716 │ │ try: │ │ ❱ 1717 │ │ │ return fun(self, *args, **kwargs) │ │ 1718 │ │ except PermissionError: │ │ 1719 │ │ │ raise AccessDenied(self.pid, self._name) │ │ 1720 │ │ except ProcessLookupError: │ │ │ │ ╭────────────────────────── locals ───────────────────────────╮ │ │ │ args = () │ │ │ │ fun = <function Process.create_time at 0x14e5785a85e0> │ │ │ │ kwargs = {} │ │ │ │ self = <psutil._pslinux.Process object at 0x14e5787bfbf0> │ │ │ ╰─────────────────────────────────────────────────────────────╯ │ │ │ │ /usr/local/lib/python3.11/site-packages/psutil/_pslinux.py:1948 in │ │ create_time │ │ │ │ 1945 │ │ │ 1946 │ @wrap_exceptions │ │ 1947 │ def create_time(self): │ │ ❱ 1948 │ │ ctime = float(self._parse_stat_file()['create_time']) │ │ 1949 │ │ # According to documentation, starttime is in field 21 and th │ │ 1950 │ │ # unit is jiffies (clock ticks). │ │ 1951 │ │ # We first divide it for clock ticks and then add uptime retu │ │ │ │ ╭───────────────────────── locals ──────────────────────────╮ │ │ │ self = <psutil._pslinux.Process object at 0x14e5787bfbf0> │ │ │ ╰───────────────────────────────────────────────────────────╯ │ │ │ │ /usr/local/lib/python3.11/site-packages/psutil/_pslinux.py:1726 in wrapper │ │ │ │ 1723 │ │ except FileNotFoundError: │ │ 1724 │ │ │ self._raise_if_zombie() │ │ 1725 │ │ │ if not os.path.exists("%s/%s" % (self._procfs_path, self. │ │ ❱ 1726 │ │ │ │ raise NoSuchProcess(self.pid, self._name) │ │ 1727 │ │ │ raise │ │ 1728 │ │ │ 1729 │ return wrapper │ │ │ │ ╭──────────────────────────── locals ────────────────────────────╮ │ │ │ args = () │ │ │ │ fun = <function Process._parse_stat_file at 0x14e57859f060> │ │ │ │ kwargs = {} │ │ │ │ self = <psutil._pslinux.Process object at 0x14e5787bfbf0> │ │ │ ╰────────────────────────────────────────────────────────────────╯ │ ╰──────────────────────────────────────────────────────────────────────────────╯ NoSuchProcess: process no longer exists (pid=161) During handling of the above exception, another exception occurred: ╭───────────────────── Traceback (most recent call last) ──────────────────────╮ │ /usr/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 0x14e57a8be5c0> │ │ │ │ re = <module 're' from '/usr/local/lib/python3.11/re/__init__.py'> │ │ │ │ sys = <module 'sys' (built-in)> │ │ │ ╰──────────────────────────────────────────────────────────────────────╯ │ │ │ │ /app/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', '--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 │ │ │ │ 0x14e57dc5bb50> │ │ │ │ log_cli_command = <function log_cli_command at 0x14e57a839c60> │ │ │ │ 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 │ │ │ │ } │ │ │ ╰──────────────────────────────────────────────────────────────────────────╯ │ │ │ │ /app/archivebox/cli/__init__.py:118 in run_subcommand │ │ │ │ 115 │ │ │ check_migrations() │ │ 116 │ │ │ 117 │ module = import_module('.archivebox_{}'.format(subcommand), __pack │ │ ❱ 118 │ module.main(args=subcommand_args, stdin=stdin, pwd=pwd) # type: │ │ 119 │ │ │ 120 │ # wait for webhooks, signals, and other background jobs to finish │ │ 121 │ wait_for_bg_threads_to_exit(timeout=60) │ │ │ │ ╭───────────────────────────────── locals ─────────────────────────────────╮ │ │ │ cmd_requires_db = False │ │ │ │ init_pending = True │ │ │ │ module = <module 'archivebox.cli.archivebox_server' from │ │ │ │ '/app/archivebox/cli/archivebox_server.py'> │ │ │ │ pwd = PosixPath('/data') │ │ │ │ setup_django = <function setup_django at 0x14e57b261b20> │ │ │ │ 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: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 c │ │ 66 │ │ reload=command.reload, │ │ 67 │ │ debug=command.debug, │ │ │ │ ╭───────────────────────────────── 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) │ │ │ │ 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('/data') │ │ │ │ stdin = <_io.TextIOWrapper name='<stdin>' mode='r' encoding='utf-8'> │ │ │ ╰──────────────────────────────────────────────────────────────────────────╯ │ │ │ │ /app/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('/data') │ │ │ │ args = () │ │ │ │ check_argument_type = <function │ │ │ │ enforce_types.<locals>.typechecked_function.<loca… │ │ │ │ at 0x14e57874e5c0> │ │ │ │ func = <function server at 0x14e57a6f7380> │ │ │ │ kwargs = { │ │ │ │ │ 'runserver_args': [ │ │ │ │ │ │ '0.0.0.0:8000', │ │ │ │ │ │ '--noreload' │ │ │ │ │ ], │ │ │ │ │ 'reload': False, │ │ │ │ │ 'debug': False, │ │ │ │ │ 'init': False, │ │ │ │ │ 'quick_init': True, │ │ │ │ │ 'createsuperuser': 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, out_dir: │ │ │ │ pathlib.Path = PosixPath('/data')) -> None> │ │ │ ╰──────────────────────────────────────────────────────────────────────────╯ │ │ │ │ /app/archivebox/main.py:1376 in server │ │ │ │ 1373 │ │ from queues.supervisor_util import get_or_create_supervisord_ │ │ 1374 │ │ │ │ 1375 │ │ print() │ │ ❱ 1376 │ │ supervisor = get_or_create_supervisord_process(daemonize=Fals │ │ 1377 │ │ │ │ 1378 │ │ bg_workers = [ │ │ 1379 │ │ │ { │ │ │ │ ╭───────────────────────────────── locals ─────────────────────────────────╮ │ │ │ call_command = <function call_command at │ │ │ │ 0x14e57c1ee660> │ │ │ │ config = <module 'archivebox.config' from │ │ │ │ '/app/archivebox/config.py'> │ │ │ │ createsuperuser = False │ │ │ │ debug = False │ │ │ │ get_or_create_supervisord_process = <function │ │ │ │ get_or_create_supervisord_process at │ │ │ │ 0x14e5784125c0> │ │ │ │ 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', '--noreload'] │ │ │ │ start_worker = <function start_worker at │ │ │ │ 0x14e578412660> │ │ │ │ stop_worker = <function stop_worker at │ │ │ │ 0x14e578412840> │ │ │ │ User = <class │ │ │ │ 'django.contrib.auth.models.User'> │ │ │ │ watch_worker = <function watch_worker at │ │ │ │ 0x14e578412700> │ │ │ ╰──────────────────────────────────────────────────────────────────────────╯ │ │ │ │ /app/archivebox/queues/supervisor_util.py:134 in │ │ get_or_create_supervisord_process │ │ │ │ 131 def get_or_create_supervisord_process(daemonize=True): │ │ 132 │ supervisor = get_existing_supervisord_process() │ │ 133 │ if supervisor is None: │ │ ❱ 134 │ │ stop_existing_supervisord_process() │ │ 135 │ │ supervisor = start_new_supervisord_process(daemonize=daemonize │ │ 136 │ │ │ 137 │ assert supervisor and supervisor.getPID(), "Failed to start superv │ │ │ │ ╭────── locals ──────╮ │ │ │ daemonize = False │ │ │ │ supervisor = None │ │ │ ╰────────────────────╯ │ │ │ │ /app/archivebox/queues/supervisor_util.py:90 in │ │ stop_existing_supervisord_process │ │ │ │ 87 │ │ │ 88 │ try: │ │ 89 │ │ print(f"[🦸‍♂️] Stopping supervisord process (pid={pid})...") │ │ ❱ 90 │ │ proc = psutil.Process(pid) │ │ 91 │ │ proc.terminate() │ │ 92 │ │ proc.wait() │ │ 93 │ except Exception: │ │ │ │ ╭─ locals ──╮ │ │ │ pid = 161 │ │ │ ╰───────────╯ │ │ │ │ /usr/local/lib/python3.11/site-packages/psutil/__init__.py:319 in __init__ │ │ │ │ 316 │ """ │ │ 317 │ │ │ 318 │ def __init__(self, pid=None): │ │ ❱ 319 │ │ self._init(pid) │ │ 320 │ │ │ 321 │ def _init(self, pid, _ignore_nsp=False): │ │ 322 │ │ if pid is None: │ │ │ │ ╭────────────────────── locals ───────────────────────╮ │ │ │ pid = 161 │ │ │ │ self = psutil.Process(pid=161, status='terminated') │ │ │ ╰─────────────────────────────────────────────────────╯ │ │ │ │ /usr/local/lib/python3.11/site-packages/psutil/__init__.py:368 in _init │ │ │ │ 365 │ │ except NoSuchProcess: │ │ 366 │ │ │ if not _ignore_nsp: │ │ 367 │ │ │ │ msg = "process PID not found" │ │ ❱ 368 │ │ │ │ raise NoSuchProcess(pid, msg=msg) │ │ 369 │ │ │ else: │ │ 370 │ │ │ │ self._gone = True │ │ 371 │ │ # This pair is supposed to identify a Process instance │ │ │ │ ╭────────────────────────── locals ──────────────────────────╮ │ │ │ _ignore_nsp = False │ │ │ │ msg = 'process PID not found' │ │ │ │ pid = 161 │ │ │ │ self = psutil.Process(pid=161, status='terminated') │ │ │ ╰────────────────────────────────────────────────────────────╯ │ ╰──────────────────────────────────────────────────────────────────────────────╯ NoSuchProcess: process PID not found (pid=161) ``` ### ArchiveBox Version ```shell 0.8.4 according to the log (can't run `version` when it doesn't start) ``` ### How did you install the version of ArchiveBox you are using? Docker (or Podman/LXC/K8s/TrueNAS/Proxmox/etc) ### What operating system are you running on? Unraid ### What type of drive are you using to store your ArchiveBox data? - [x] some of `data/` is on a local SSD or NVMe drive - [x] some of `data/` is on a spinning hard drive or external USB drive - [ ] some of `data/` is on a network mount (e.g. NFS/SMB/Ceph/GlusterFS/etc.) - [ ] some of `data/` is on a FUSE mount (e.g. SSHFS/RClone/S3/B2/Google Drive/Dropbox/etc.) ### Docker Compose Configuration ```shell ``` ### ArchiveBox Configuration ```shell ```
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#996
No description provided.