大网数据广告活动
服务器运维问答

uwsgi: strange error message: unknown config directive: inifile

· 52CE 我爱测

I have a uwsgi.ini file. It works perfectly, but if I add strict=true it fails with the message [strict-mode] unknown config directive: inifile however the word inifile doesn't even exist in my inifile. In order to reproduce the …

问题原文

原帖链接 · gelonida · CC BY-SA 4.0

I have a uwsgi.ini file. It works perfectly, but if I add strict=true it fails with the message

[strict-mode] unknown config directive: inifile

however the word inifile doesn't even exist in my inifile.

In order to reproduce the error I went so far, that I created a uwsgi.ini file with only two lines.

[uwsgi]
strict=true

If I run uwsgi --ini uwsgi.ini I get above mentioned error

If I set strict to false I get of course errors about missing parameters.

Even if I use a yaml file with following contents:

uwsgi:
    strict: true

and I call with uwsgi -y uwsgi.yaml

I get:

[uWSGI] getting YAML configuration from uwsgi.yaml
[strict-mode] unknown config directive: inifile

So I think uwsgi wants to tell me something different, but I don't know what.

I like to keep the strict flag to be protected against typos or options that became obsolete or just exist in newer versions. It is difficult to diagnose if I don't get help finding the offending line.

I tested with uwsgi 2.0.18 and 2.0.21

已采纳解答

原帖链接 · anx · CC BY-SA 4.0

If its not in your file, it could still be from one of the other source of configuration.

You may not have that option in the specified file. But uwsgi, by default, parses environment minus the UWSGI_ prefix, should you have anything starting with that there. Confirm it using:

env | grep -i uwsgi

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2023-07-19)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 4.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。