Issue with Service that i Created

Posted March 4, 2021 418 views
NginxUbuntuPythonPython FrameworksUbuntu 18.04

Having Issue with Service that i Created.

 gunicorn --bind wsgi:application  

This works well no issue at all.

But with the Service, I get an error.

Description=Gunicorn instance to serve lolf
Wants =
After =

ExecStart=/home/lolfbw/lolf/lolfenv/bin/gunicorn --workers 3 --bind unix:lolf.sock -m 007 wsgi


Error i am getting:

gunicorn[27945]:     final_start = datetime.fromisoformat(formated_start).timestamp()

gunicorn[27945]: ValueError: Invalid isoformat string: ' 00:00:00'

But I don’t get this error when running it as

>>  gunicorn --bind wsgi:application  

Any Idea why is that?

I am using Python3.9.

edited by bobbyiliev

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Submit an Answer
1 answer

Hi there,

I believe that it might be a problem with the Socket, I could suggest giving the full path to the socket.

Also have you tried using the Unit file from this tutorial here:

Let me know how it goes.

by Justin Ellingwood
Django is a powerful web framework that can help you get your Python application or website off the ground. Django includes a simplified development server for testing your code locally, but for anything even slightly production related, a more secure and powerful web server...
  • i tried that as well, didn’t help me out.

    • Hi there,

      Do you get the same error when using the exact same ExecStart line as per the tutorial?


      • ExecStart=/home/lolfbw/lolf/lolfenv/bin/gunicorn --workers 3 --bind unix:lolf.sock -m 007 wsgi:application
        ExecStart=/home/lolfbw/lolf/lolfenv/bin/gunicorn --workers 3 --bind unix:/home/lolfbw/lolf/lolf.sock -m 007 wsgi:application

        Getting same error with both.. Very Strange.

        • Hi there,

          Is your project open source? I could take a look at the code.

          As far as I can see the formated_start value is not being set correctly causing the service to crash.