Gunicorn Missing '=', what the hell is this?


#1

Hi there,

To wards the end of LPTHW Zed suggests going off and learning Django. It also became apparent to me that I need to get comfortable with testing so I have been working through Obey the testing Goat.

I saw it described as ‘learn Django through testing’.

I have hit a wall at: https://www.obeythetestinggoat.com/book/chapter_automate_deployment_with_fabric.html

My github repo for this project is: https://github.com/BainesB/MyLittleList.git

The site that I am trying to build is: http://www.muddymarvellous.co.uk/ and .com

ssh’d into my server, when I do:

sudo systemctl enable gunicorn-muddymarvellous.com

I get Failed to execute operation: Invalid argument’.

When I do:
sudo systemctl start muddymarvellous.com
I get Failed to start gunicorn-muddymarvellous.co.uk.service: Unit gunicorn-muddymarvellous.co.uk.service is not loaded properly: Invalid argument.

My investigation so far.

Hypothesis: syntax error / typo

/etc/systemd/system/gunicorn-muddymarvellous.co.uk.service had a tab, rather than 4spaces before ‘–bind unix:’ and the some on the line bellow so I have changed that. To no effect.

Hypothesis: not named correctly:

sudo ls /etc/systemd/system/gu*
returns:

etc/systemd/system/gunicorn-muddymarvellous.com
etc/systemd/system/gunicorn-muddymarvellous.com. service
etc/systemd/system/gunicorn-muddymarvellous.co.uk.service

Q: should there be a etc/systemd/system/gunicorn-muddymarvellous.co…
Q: are these named wrong?

The ‘gunicorn-mysite’ bit of ‘sudo systemctl enable gunicorn-superlists.ottg.eu’ command wont tab complete for me.

sudo journalctl -b | grep muddy | less

shows me that there are lots of instances of:
ubuntu-512mb-lon1-01 systemd[1]: [etc/systemd/system/gunicorn-muddymarvellous.co.uk.service:9 Missing ‘=’.

I have looked in the authers git repo and gunicorn template. --ch08l007-- seems to have an ‘=’ in all the places I do. So I think I must still be miss understanding something.

Googling: gunicorn Missing ‘=’. It seems that some people are having a thing where the socket files aren’t being made.

  • Is this liky to be the case? How can I investigate?

I see that /tmp is a place for temp files. Which is why there seems to be only one file with a really long name in there, when I: ls /tmp

Is there anything else I can do to debug this?

What should I be looking at? Is there something wrong with my approach.

This has stalled me for a few weeks now. Anything help that move me forward would be gratefully received.


#2

Another odd thing that I have noticed and can’t explain. opening /etc/nginx/sites-enabled/muddymarvellous.com has color text.

and /etc/nginx/sites-enabled/muddymarvellous.co.uk the text is all white.

Does this mean something isn’t linked up properly? Not sure what to ask google.


#3

Hi, sorry extremely late reply. My notification settings turned off and I only recently realized. I would say if you are just a website then gunicorn might be the right option. I would ask with the gunicorn people to see if maybe they have a solution. Otherwise you can just run it with the regular Django spur should work.