So I managed to debug this a bit more and it looks like uWSGI itself is
fine as I can run it directly, but either my nginx or service is causing
the issue.
My service looks like:
[Unit]
Description=uWSGI instance to serve flexlm
After=network.target
[Service]
User=shareef
Group=nginx
WorkingDirectory=/home/shareef/html/flexlm
Environment="PATH=/home/shareef/html/flexlm/venv/bin"
ExecStart=/home/shareef/html/flexlm/venv/bin/uwsgi --ini
/home/shareef/html/flexlm/flexlm.ini
[Install]
WantedBy=multi-user.target
and my nginx config looks like:
server {
listen 80;
server_name flexlm.me.com ;
location / {
include uwsgi_params ;
uwsgi_pass unix:/home/shareef/html/flexlm/flexlm.sock;
}
}
On Tue, Dec 3, 2019 at 12:22 PM Shareef Jalloq <[email protected]> wrote:
> Hi there,
>
> new user here and I've been trying to set up a Flask app using the
> tutorial here:
> https://www.digitalocean.com/community/tutorials/how-to-serve-flask-applications-with-uwsgi-and-nginx-on-centos-7
>
> The Flask app just runs a Python script and I render a page with the
> output. The script calls the FlexLM lmstat command line utility and gets a
> list of license features in use.
>
> I can run the Flask app in standalone mode using 'flask run', but if I try
> to run the uwsgi app, I get a file not found error from lmstat itself. If
> I copy the shell command my script is running and run that in a shell, I
> get the correct output it's not a typo in my setup. If I update my script
> to read the license files then it also opens them with no issues.
>
> So what is it about running shell commands under uwsgi/nginx that could
> cause this symptom? I've modified permissions to make the license file
> readable by all so I don't think it's permissions. Bit stuck as to what to
> check next. uwsgi.ini follows.
>
> Shareef.
>
>
> [uwsgi]
> module = wsgi
>
> master = true
> processes = 5
> logto = /tmp/flexlm.log
> socket = flexlm.sock
> chmod-socket = 666
> vacuum = true
>
> die-on-term = true
>
_______________________________________________
uWSGI mailing list
[email protected]
http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi