Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Bug Report: bench update fails when restarting supervisor workers on Debian 12 (Frappe v16) #1690

@Shinonn23

Description

@Shinonn23

Describe the bug

Running bench update --reset --no-backup fails during the supervisor reload step.
The failure occurs when bench attempts to restart the erp-workers supervisor group, which does not exist on this system. This results in ERROR (no such file) for all worker processes and causes the entire update command to exit with a non-zero status.

This happens even though:

  • App updates
  • Migrations
  • Asset builds
    all complete successfully.

To Reproduce

Steps to reproduce the behavior:

  1. Use a bench setup without ERPNext (Frappe only).

  2. Switch Frappe branch from develop to version-16:

    bench switch-branch version-16 --update
  3. Run:

    bench update --reset --no-backup
  4. Observe failure during supervisor reload.


Expected behavior

bench update should:

  • Skip restarting supervisor groups that do not exist, or
  • Treat missing supervisor groups as a warning instead of a fatal error.

The update process should complete successfully if core steps (migrate, build assets, etc.) succeed.


Actual behavior

The update fails with the following error:

erp-workers:erp-frappe-schedule: ERROR (no such file)
erp-workers:erp-frappe-short-worker-0: ERROR (no such file)
erp-workers:erp-frappe-long-worker-0: ERROR (no such file)

bench.exceptions.CommandFailedError: sudo supervisorctl restart erp-workers:

OS

  • Linux: Debian GNU/Linux 12 (bookworm)

Version Information

  • Bench Version: 5.29.0

  • Bench Branch: PyPI (latest)

  • Frappe Version: v16.1.1

  • ERPNext Version: N/A

  • Custom Apps:

    • eef

Additional context

  • This bench setup does not include ERPNext.
  • Supervisor web processes (erp-web) restart successfully.
  • The erp-workers supervisor group does not exist on this system.
  • No manual modifications were made to supervisor configuration.
  • The issue appeared after switching the Frappe branch from develop to version-16.

Possible solution

  • Check for the existence of a supervisor group before attempting to restart it.
  • Handle missing supervisor groups gracefully (warning instead of error).
  • Make supervisor restart failures non-fatal during bench update.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions