Score:1

uwsgi: strange error message: unknown config directive: inifile

de flag

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

djdomi avatar
za flag
please take a look at [ask] because for the moment the question is off topic due it does not fulfill the minimum requirements for serverfault.com
gelonida avatar
de flag
I read "How to Ask" and am not sure what exactly you are missing. Do you think that this question is more appropriate for Superuser? If so I can delete it and post it there. If it's something else, then please tell me. - serverfault has a tag uwsgi. As my problem is a uwsgi problem I tagged it with it. - The title describes the problem - my question contains all necessary information to reproduce the issue and shows what I tried already. - I specified the uwsgi versions I tested with. Please clarify
gelonida avatar
de flag
I added the 'linux' tag and fixed a few minor typos
gelonida avatar
de flag
as I added the linux tag I also prefixed the question with uwsgi. so that even users who look at the question due to the linux tag know immediately that the issue is a uwsgi issue
Score:1
fr flag
anx

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
gelonida avatar
de flag
Your answer is spot on. I completely missed this second source for uwsgi directives. I do have indeed an environment variable `UWSGI_INIFILE` which indicates where I can locate the configuration file of uwsgi. I need this for another tool and under some circumstances the parent process starting uwsgi can see this environment variable. I guess I have to rename it.
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.