1

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
  • 8,963
  • 5
  • 24
  • 48
gelonida
  • 259
  • 3
  • 16
  • 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 – djdomi Jul 19 '23 at 16:42
  • 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 Jul 19 '23 at 20:45
  • I added the 'linux' tag and fixed a few minor typos – gelonida Jul 19 '23 at 20:57
  • 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 – gelonida Jul 19 '23 at 22:41

1 Answers1

1

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
anx
  • 8,963
  • 5
  • 24
  • 48
  • 1
    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. – gelonida Jul 20 '23 at 07:23