New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
sudo supervisorctl returns Errno (2): unix:///tmp/supervisor.sock no such file #1084
Comments
I changed the socket file location to /var/run and everything worked. Can someone explain to me why? |
I don't see any code in our tree that uses I noticed above that you aren't specifying an explicit path to a config file with the This seems to be an issue related to how this particular system is configured. I don't think there is anything we can do here so I am going to close this issue for now. There may be others who can help with installation and usage questions on the supervisor-users mailing list. We use this issue tracker mainly for bugs in Supervisor itself. |
I said I CHANGED the default configuration file for the sock file from /tmp/supervisor.sock to /var/run/supervisor.sock. My initial comment was with the default CentOS config file. There is definitely a bug here - I just don't know where. |
It's possible but I don't have enough information to confirm that. If you can provide specific instructions to reproduce a bug, we can certainly reopen. Since it works as you expect from some environments on your machine and not others, please look at the difference between those environments and in particular, try the As far the CentOS package goes, nobody that works on this code is familiar with it. However, you may find other CentOS users on the mailing list. |
Here is just a general question: Does the default supervisor.conf file use /tmp? That seems very dangerous. |
There isn't such a default file. There's only a command, For other general questions, please ask them on the mailing list. That's the usual place and there are more people there that can answer as well. |
he is talking about the following section in the config file
after a while supervisor stop running and start giving an error
I had the same problem multiple times on different computers, but all of them running Centos (6, 7) is this a bug, or are we missing something in the config file. |
The fix or me was to move the sock file to /var/run. But of course, that was a royal pain in the butt because there is really no way to restart supervisor when you change the sock file location gracefully. |
I did change thr location of the file. And yes I am having trouble restarting supervisor. Did you manage to find a workaround |
That's unfortunately a design limitation in supervisor I believe. Supervisor is actually an http RPC server that accepts "commands" over a socket via supervisorctl. For localhost connections, supervisor uses a Unix domain socket. But if the running server is already listening on one Unix domain socket located in /tmp and you change the configuration file to now zonk it under /var/run without restarting supervisor, the next invocation of the client will pick up /var/run and think supervisor is down because it is temporarily connecting to the wrong socket. The only way I can see to change this gracefully is to shutdown supervisor (i.e. systemctl stop supervisord/service supervisord stop), edit /etc/supervisor.conf, and then start it again. What we really need is a way to tell supervisor to reload its config WITHOUT using supervisorctl (so reload is not I want). Something even to the tune of kill -SIGHUP or USER1? |
Currently the problem I am having is a way to setup supervisor to start after a reboot of the system. when the file was at /tmp, it was working fine but after I switched to /var . I can't seem to get it to work |
Yes, I just enabled it via systemd (systemctl enable supervisord). What error are you actually seeing then? If you change the location of the sock file you must change it both in the "file" line you cited above as well the "serverurl" line under [supervisorctl] section. |
so if I placed the sock file in currently it is pointed to |
That would be your problem then. Try:
|
anything else I might be missing. The config file
|
and thanks a lot for the help, I really appreciate it |
What is github for? :-) I would put the pid file in /var/run as well and the logfile in /var/log but that's just me! Anyway, it should come up now without issue. Let me know. |
you are awesome, you know that |
Again, any time. Happy Supervisoring! |
Folks, Can you please help me, I have the following issue(unix:///var/run/supervisor.sock refused connection) and I see the supervisor.sock is empty Please find the supervisord.conf @ /etc/ ; Sample supervisor config file. [unix_http_server] ;[inet_http_server] ; inet (TCP) server disabled by default [supervisord] ; the below section must remain in the config file for RPC [supervisorctl] ; The below sample program section shows all possible program subsection values, ;[program:theprogramname] ; The below sample eventlistener section shows all possible ;[eventlistener:theeventlistenername] ; The below sample group section shows all possible group values, ;[group:thegroupname] ; The [include] section can just contain the "files" setting. This ;[include] and I have also replaced the supervisord.conf @ /etc/supervisor to the above format |
Error the same: i have created config file with command: This error in Amazon Linux 2 AMI server. Any help? thanks. |
RHEL 7.4 x86_64
supervisor-3.3.1-1.noarch
The issue is the following:
When our web application written in php does something like this:
The script gets executed but the call to 'supervisorctl status ' within it fails with Errno 2 complaining the UNIX domain socket doesn't exist. However, it most certainly exists and is listening:
It's 0777 because I set it to 0777. It was original 0700 but the problem persists either way.
Also note that the script in question is in the suders file, part of a cmd alias (bunch of commands grouped with the same rules):
Looking at source, it seems the following lines are failing:
Note that L520 should be removed but a minor nit. L521 though is failing and for the life of me I don't understand why. The error message itself is strange since self.socketfile I verified is indeed the string '/tmp/supervisor.sock' but the exception seems to think it's trying to open 'unix:///tmp/supervisor.sock'.
What's even more strange is if I do the following:
Everything looks good!
Why oh why does executing from php a script under sudo as apache cause supervisorctl not to be able to open the UNIX domain socket that is clearly sitting in /tmp and listening?
EDIT: EL6 seems to work with zero code changes. But EL7 fails. The only difference I can think of is python 2.6 vs 2.7.
The text was updated successfully, but these errors were encountered: