66π
That there is no socket file probably means that supervisor isnβt running. A reason that it isnβt running might be that your qlimp.conf file has some sort of error in it. If you do a
sudo service supervisor start
you can see whether or not this is the case. If supervisor is already running, it will say. And if it is catching an error, it will usually give you a more helpful error message than supervisorctl.
27π
I have met the same issue as you and after several times, here comes the solution:
-
First remove the apt-get supervisor version:
sudo apt-get remove supervisor
-
Kill the backend supervisor process:
sudo ps -ef | grep supervisor
-
Then get the newest version(apt-get version was 3.0a8):
sudo easy_install(pip install) supervisor==3.0b2
-
Echo the config file(root premission):
echo_supervisord_conf > /etc/supervisord.conf
5.Start supervisord:
sudo supervisord
6.Enter supervisorctl:
sudo supervisorctl
Anything has been done! Have fun!
- [Django]-Is there a list of Pytz Timezones?
- [Django]-Function decorators with parameters on a class based view in Django
- [Django]-How do I restrict foreign keys choices to related objects only in django
- [Django]-How to convert JSON data into a Python object?
- [Django]-Django stops working with RuntimeError: populate() isn't reentrant
- [Django]-Django β How to pass several arguments to the url template tag
12π
Are you sure that supervisord is installed and running? Is there a socket file in present at /var/run/supervisor.sock
?
The error indicates that supervisorctl
, the control CLI, cannot reach the UNIX socket to communicate with supervisord
, the daemon.
You could also check /etc/supervisor/supervisord.conf
and see if the values for the unix_http_server
and supervisorctl
sections match.
Note that this is a Ubuntu-level problem, not a problem with Python, Django or nginx and as such this question probably belongs on ServerFault.
- [Django]-Django: Error: You don't have permission to access that port
- [Django]-Why is logged_out.html not overriding in django registration?
- [Django]-CORS error while consuming calling REST API with React
10π
On Ubuntu 16+ it seems to been caused by the switch to systemd, this workaround may fix for new servers:
# Make sure Supervisor comes up after a reboot.
$ sudo systemctl enable supervisor
# Bring Supervisor up right now.
$ sudo systemctl start supervisor
and then do check your status of iconic.conf [My example] of supervisor
$ sudo supervisorctl status iconic
PS: Make sure gunicorn should not have any problem while running.
- [Django]-Django admin and MongoDB, possible at all?
- [Django]-Error: No module named psycopg2.extensions
- [Django]-Django REST Framework β 405 METHOD NOT ALLOWED using SimpleRouter
5π
The error may be due to that you donβt have the privilege.
Maybe you can fix the error by this way, open your terminal, and input vim /etc/supervisord.conf
to edit the file, search the lines
[unix_http_server]
;file=/tmp/supervisor.sock ; (the path to the socket file)
;chmod=0700 ; socket file mode (default 0700)
and delete the Semicolon in the start of the string ;file=/tmp/supervisor.sock
and ;chmod=0700
, restart your supervisord. I suggest you do it.
- [Django]-Django: Implementing a Form within a generic DetailView
- [Django]-Want to disable signals in Django testing
- [Django]-Select_related with reverse foreign keys
3π
Make sure that in /etc/supervisor.conf
the following two sections exists
[unix_http_server]
file=/tmp/supervisor.sock ; path to your socket file
[rpcinterface:supervisor]
supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface
- [Django]-Select between two dates with Django
- [Django]-How to format time in django-rest-framework's serializer?
- [Django]-What is a django.utils.functional.__proxy__ object and what it helps with?
2π
You can do something like this :-
sudo touch /var/run/supervisor.sock
sudo chmod 777 /var/run/supervisor.sock
sudo service supervisor restart
Itβs definitely work, try this.
- [Django]-Django AutoField with primary_key vs default pk
- [Django]-Django or Django Rest Framework
- [Django]-Sorting related items in a Django template
2π
In my case, Supervisor was not running. To spot the issue I run:
sudo systemctl status supervisor.service
The problem was that I had my logs pointing to a non-existing directory, so I just had to create it.
I hope it helps π
- [Django]-How do I change the range of the x-axis with datetime?
- [Django]-Is there something similar to 'rake routes' in django?
- [Django]-How to reverse the URL of a ViewSet's custom action in django restframework
0π
touch /var/run/supervisor.sock
sudo supervisord -c /etc/supervisor/supervisord.conf
and after
supervisorctl restart all
if you want to listen the supervisor port
ps -ef | grep supervisord
if you want kill the process
kill -s SIGTERM 2503
- [Django]-Django REST Framework β 405 METHOD NOT ALLOWED using SimpleRouter
- [Django]-How can I find the union of two Django querysets?
- [Django]-Get all related Django model objects
0π
Create a conf file and below add lines
Remember that in order to work with Nginx, you must have to disable autostart on system boot, that you activated while installing Nginx.
https://askubuntu.com/questions/177041/nginx-disable-autostart
Note: All the supervisor processes must be on βdaemon offβ mode, in order to work with supervisor
[program:nginx]
command=/usr/sbin/nginx -g "daemon off;"
autostart=true
autorestart=true
startretries=5
stopasgroup=true
stopsignal=QUIT
numprocs=1
startsecs=0
process_name=WebServer(Nginx)
stderr_logfile=/var/log/nginx/error.log
stderr_logfile_maxbytes=10MB
stdout_logfile=/var/log/nginx/access.log
stdout_logfile_maxbytes=10MB
sudo supervisorctl reread && sudo supervisorctl update
- [Django]-Django template how to look up a dictionary value with a variable
- [Django]-How to find pg_config path
- [Django]-Docker/Kubernetes + Gunicorn/Celery β Multiple Workers vs Replicas?
0π
I have faced this error several times β
If server is newly created instance and facing this issue
Might be because of some wrong config or mistake happened during the process, or supervisor is not enabled.
-
Try restarting your supervisor and reconnecting ec2
or
-
Try reinstalling supervisor (@Scen)
or
-
Try approaches mentioned by @Yuvaraj Loganathan, @Dinesh Sunny. But mostly you might end up creating a new instance.
If server was running perfectly from long time but then it suddenly stopped
and threw
unix:///var/run/supervisor.sock no such file
on sudo supervisorctl status
.
It may be due to high memory usage, refer below image usage was 99% of 7.69GB earlier.
- You can find the above config after connecting with ec2 via
ssh
orputty
at the top. - You can upgrade your ec2 instance or you can then delete any extra files like logs (/var/logs), zip to free up the space. But careful do not delete any system files.
- Restart supervisor
sudo service supervisor restart
- Check
sudo supervisorctl status
- [Django]-Simple Log to File example for django 1.3+
- [Django]-How do I set up Jupyter/IPython Notebook for Django?
- [Django]-Django β accessing the RequestContext from within a custom filter