Question about uwsgi_nadine.sock.

41 views
Skip to first unread message

mmi...@mc-miller.net

unread,
Feb 15, 2019, 1:48:12 PM2/15/19
to The Nadine Project
I was going through to make sure all config files were correct and everything was in place when I came upon the section in /etc/nginx/sites-available/nadine that has the following:

location / {
   include uwsgi_params;
   uwsgi_pass unix: /home/nadine/webapp/run/uwsgi_nadine.sock;
}

I went to the location of where it should be and it is missing. I was using https://nadine.readthedocs.io/en/master/. I did not follow in order because from past experiences they don't always work for the current OS build. I am on a freshly installed and upgraded Ubuntu 18.04 LTS. It took me 3 reloads to figure out what order and what commands had to be used. So I got to this point and when I go to the site I get a 502 Bad Gateway and I believe it may because I am missing uwsgi_nadine.sock. There is nothing in the documentation about uwsgi_nadine.sock and I am unable to find it on the system. So I am at a loss as to how to fix this missing uwsgi_nadine.sock. Any help would be greatly appreciated. 

Jacob Sayles

unread,
Feb 15, 2019, 3:45:00 PM2/15/19
to The Nadine Project
Yes it looks like there are a few holes in the documentation.  If anyone wants to volunteer I'd love a hand getting that section of the docs up to date.  

So to start, can you fire up Nadine using ./manage.py runserver?  That proves that Nadine itself is functional and you are only dealing with the connection with nginx and uwsgi.    If that socket file isn't created there than it's not running and nginx won't be able to connect.  I've used gunicorn and supervisor before and that's worked pretty well.  Recently I've switched to using apache and mod_wsgi.  

Jacob Sayles
Technical Director
Kanawha Design Studio

--
You received this message because you are subscribed to the Google Groups "The Nadine Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nadineprojec...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

mmi...@mc-miller.net

unread,
Feb 16, 2019, 11:48:26 AM2/16/19
to The Nadine Project
To add to my previous reply, is uWSGI suppose to be installed as well? or is it part of the Nadine setup? The only thing in the documents about uWSGI is when you do: sudo cp etc/uwsgi/apps-available/nadine.yaml /etc/uwsgi/apps-available/ and also when you do: sudo ln -s /etc/uwsgi/apps-available/nadine.yaml /etc/uwsgi/apps-enabled/. Those are the only 2 lines that reference anything to do with uwsgi. 

mmi...@mc-miller.net

unread,
Feb 16, 2019, 11:48:27 AM2/16/19
to The Nadine Project
I made sure before looking for everything that I had ran ./manage.py runserver, so it was running. I have ran: find /home/nadine/ -name uwsgi_nadine.sock and it is not finding it in my system.

On Friday, February 15, 2019 at 3:45:00 PM UTC-5, Jacob Sayles wrote:

Jacob Sayles

unread,
Feb 16, 2019, 12:09:42 PM2/16/19
to The Nadine Project
Yes you need a WSGI service to create that side of the connection that nginx or apache connect to.  The is where gunicorn, uwsgi, or mod_wsgi come in.  This step is just missing in the Nadine docs so you'll need to supplement with other tutorials.  This one would work:  https://linuxconfig.org/how-to-host-django-with-nginx-on-ubuntu-18-04-bionic-beaver-linux

I apologize about the spotty documentation.  Please keep in mind that with me being in-between projects right now, I'm not being paid by anyone to work on Nadine.  I've put a lot of work in to it over the past 10 years but free software isn't really free.  It's more philanthropic and I put it out there in open source to inspire collaboration.  

Jacob Sayles
Technical Director
Kanawha Design Studio

Michael Miller

unread,
Feb 16, 2019, 6:45:33 PM2/16/19
to The Nadine Project
Hi Jacob,

Thanks for the information. I am trying to get as much information as I can so that I can clean up the documentation that you already have. I am trying to get everything in order as far as what I have in front of me. I was looking ahead and was checking out the Front-End Testing and noticed that the information was for iOS but not for Ubuntu/Debian. Is there something I can add to the documentation so Front-End Testing can be done on Ubuntu/Debian? 

I will get everything in order and I can send you the documentation when I am finished. I believe everything will stay the same except for everything from 2.1.1 through 2.4.5 along with the addition to the information for Front-End Testing for Ubuntu/Debian. 

Jacob Sayles

unread,
Feb 18, 2019, 1:50:23 PM2/18/19
to The Nadine Project
That's great.  Thank you for offering to help.  I haven't run the Front-End tests for some time so they probably need more than just setup, but first let's get them running.  You won't need uwsgi for that though, just runserver.  

Jacob Sayles
Technical Director
Kanawha Design Studio

Michael Miller

unread,
Feb 19, 2019, 12:36:32 PM2/19/19
to The Nadine Project
Hi Jacob,

Your welcome for the help. It gives me a chance to increase my documentation writing. I was following what I had figured out and ran into the one issue. It seems that after you get the server running and then do section 2.2.4 and then do section 2.4.5 the uwsgi_nadine.sock is still missing. So when I did start uswgi it showed up but there is nothing in it, it is totally empty. So what writes to it and when should uwsgi be running? Should it be started right after the server is running or before the server is running? Also is there a way to fix the uwsgi_nadine.sock with out wiping and installing everything again? I am going to try a few things to see what happens.

Michael Miller

unread,
Feb 19, 2019, 7:52:59 PM2/19/19
to The Nadine Project
Hi Jacob,

Well I have been able to get everything to do what it is suppose to do but when the uwsgi_nadine.sock is generated/created it just comes up empty. I have no idea why it never has any information in it. It is also a file that cannot be edited either with sudo command or even root. 

One other thing I did notice is in 2.4.4 it has $ cd /home/nadine/webapp/nadine/conf. Well /nadine/conf does not go to /webapp/. So the current dir for it is cd /home/nadine/nadine/nadine/conf/.

I am so close but this sock is the only thing that is the issue right now. It is created but it is empty when it is created.
Reply all
Reply to author
Forward
0 new messages