So, as it turns out, the supervisor configuration had relative paths to the
gunicorn.conf file, and was giving an error complaining that it could not
find the file. So, I had to hard code the full path like this:
command=/home/ubuntu/.virtualenvs/my_dango_project/bin/gunicorn -c
/home/ubuntu/mezzanine/my_django_project/gunicorn.conf.py -p
/home/ubuntu/mezzanine/my_django_project/gunicorn.pid
my_django_project.wsgi:application
Now, the question is: Why did I have to do that? Why does the supervisor
conf template from mezzanine not work out-of-the-box? I was hoping the fab
deploy would work automatically, and it almost did... Is the solution to
edit the template in the mezzanine repo to include the full url to those
gunicorn conf files? Or is there something screwy with my system?
On Monday, November 16, 2015 at 1:21:16 PM UTC-5, Joshua Glenn wrote:
>
>
> So, I am getting the error as described below.
>
> It is saying that the connection is refused. But is not telling me why
> it's refusing the connection. Based on the information I have seen in my
> Google searches, it seems like it's telling me that the host associated
> with the request is not in the list of allowed hosts. Is that what it's
> telling me? Or are there other possibilities?
>
> I have checked to make sure that I have the allowed host settings
> correctly set in ```local_settings.py```. Any ideas as to where I should go
> from here?
>
> If I change the upstream server to point to a running instance of the
> Django runserver for the project, I am able to browse the actual site. It's
> just the upstream gunicorn server that doesn't work. But obviously I can't
> use the run server in a production environment.
>
> Any ideas or advice?
>
> 2015/11/16 18:10:30 [error] 21888#0: *1 connect() to
> unix:/home/ubuntu/mezzanine/example_com/gunicorn.sock failed (111:
> Connection refused) while connecting to upstream, client: {clientip},
> server: subdomain.example.com, request: "GET / HTTP/1.1", upstream:
> "http://unix:/home/ubuntu/mezzanine/example_com/gunicorn.sock:/", host: "
> subdomain.example.com"
>
>
>
--
You received this message because you are subscribed to the Google Groups
"Mezzanine Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.