You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

supervisord v2.1为何无法读取指定INI配置文件?

Troubleshooting Supervisord v2.1 Include Directive Not Loading External Config

Since you’ve confirmed the program config works when added directly to the main supervisord.conf, the issue is isolated to how the [include] directive is being handled. Here are targeted troubleshooting steps:

  • Validate the [include] syntax for v2.1
    Older versions of supervisord (like v2.1) have stricter rules for the files parameter. Unlike newer versions, it may not support comma-separated paths. Even if you only have one file, double-check:

    Ensure the path is specified without commas. If you ever add more files later, use spaces or newlines to separate them instead.
    Example corrected include section:

    [include]
    files = /etc/supervisord.d/myapp.ini
    
  • Check permissions and ownership of the external INI file
    The supervisord process runs as a specific user (usually root or a dedicated service user). Verify that this user has read access to /etc/supervisord.d/myapp.ini:
    Run this command to check permissions:

    ls -l /etc/supervisord.d/myapp.ini
    

    The file should have at least 644 permissions (read access for all users) or be owned by the user running supervisord.

  • Verify the include path is accurate
    Typos or incorrect paths are a common culprit. Run this command to confirm the file exists at the specified location:

    test -f /etc/supervisord.d/myapp.ini && echo "File exists" || echo "File missing"
    

    Double-check for typos like supervisor.d instead of supervisord.d, or missing slashes in the path.

  • Enable verbose logging to debug include loading
    Start supervisord with increased verbosity to see if it’s attempting to load the include file:

    supervisord -n -vv
    

    Look for log lines like:

    INFO supervisord: Reading include file '/etc/supervisord.d/myapp.ini'
    If you don’t see this line, the [include] directive isn’t being processed. If you see an error (e.g., permission denied), that’s your root cause.

  • Ensure the [include] section is placed correctly
    In supervisord v2.1, the [include] section must appear after all other sections in the main config file. If it’s placed before sections like [supervisord] or [unix_http_server], it might be ignored. Move the [include] block to the very end of supervisord.conf and test again.

  • Confirm supervisord is using the correct main config
    Sometimes supervisord loads a different config file than expected (e.g., from ~/.supervisord.conf instead of /etc/supervisord.conf). Explicitly specify the config path when starting:

    supervisord -n -c /etc/supervisord.conf
    

    This ensures you’re testing the exact config file where you added the [include] directive.

内容的提问来源于stack exchange,提问作者Chris F

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.15 03:17:55