<div dir="ltr"><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small">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.</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small"><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small">My service looks like:</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small"><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small">[Unit]<br>Description=uWSGI instance to serve flexlm<br>After=network.target<br><br>[Service]<br>User=shareef<br>Group=nginx<br>WorkingDirectory=/home/shareef/html/flexlm<br>Environment="PATH=/home/shareef/html/flexlm/venv/bin"<br>ExecStart=/home/shareef/html/flexlm/venv/bin/uwsgi --ini /home/shareef/html/flexlm/flexlm.ini<br><br>[Install]<br>WantedBy=multi-user.target<br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small"><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small"><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small">and my nginx config looks like:</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small"><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small">    server {<br>             listen 80;<br>           server_name <a href="http://flexlm.me.com">flexlm.me.com</a> ;<br>         <br>     location / {<br>             include uwsgi_params ;<br>                uwsgi_pass unix:/home/shareef/html/flexlm/flexlm.sock;<br>          }<br>    }<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Dec 3, 2019 at 12:22 PM Shareef Jalloq <<a href="mailto:shareef@jalloq.co.uk">shareef@jalloq.co.uk</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small">Hi there,</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small"><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small">new user here and I've been trying to set up a Flask app using the tutorial here:  <a href="https://www.digitalocean.com/community/tutorials/how-to-serve-flask-applications-with-uwsgi-and-nginx-on-centos-7" style="font-family:Arial,Helvetica,sans-serif" target="_blank">https://www.digitalocean.com/community/tutorials/how-to-serve-flask-applications-with-uwsgi-and-nginx-on-centos-7</a></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small"><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small">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.</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small"><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small">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.</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small"><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small">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.</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small"><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small">Shareef.</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small"><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small"><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small">[uwsgi]<br>module = wsgi<br><br>master = true<br>processes = 5<br>logto = /tmp/flexlm.log<br>socket = flexlm.sock<br>chmod-socket = 666<br>vacuum = true<br>    <br>die-on-term = true<br></div></div>
</blockquote></div>