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
Python Error when running supervisorctl #376
Comments
What's in your |
I'm going to close this due to lack of activity. If you're still having this issue and can provide more information, we can reopen. |
I get the exact same error on a freshly installed supervisor with the default configuration file as output by echo_supervisord_conf. I installed the configuration file locally, and am running it as a regular user and not root: $ supervisorctl
error: <class 'socket.error'>, [Errno 97] Address family not supported by protocol: file: /usr/lib/python2.7/socket.py line: 571
supervisor> |
@bbirand if you execute supervisorctl -c /explicit/path/to/config/file/echoed/out/supervisord.conf do you get the same error? If so, can you include the contents of that file in a separate comment? |
Yup, that fixed it. I didn't realize I had to pass the configuration file to the supervisorctl call as well, but of course it make sense.. Sorry for the wrong alarm. (Although a more descriptive error message instead of the failed socket connection would be more helpful. I don't even have a |
A specific "not found" error should be emitted if supervisord can't find a config file. In later versions, there's also a different "not readable" error if supervisord finds one but can't read it. When supervisorctl will also search for a config file. Before Supervisor 3.0b2, a config file was always required and it would give an error as described above. In 3.0b2 and later, supervisorctl can be used without a config file. In that case, the connection info should be given in command line options. I think if it can't find a config file, and you don't give the connection options, it defaults to http://localhost:9001 with no auth. I'm not certain about that. It sounds like supervisorctl is searching for and finding another config file on your system, but that file contains a line that causes the Edit: Clarified supervisorctl behavior. |
Interesting. What was happening with me is that there was a From what I understand from your description, if a config file is found in the current directory, it should be used, and the behavior should be the same as running it explicitly with the |
It appears that a commit in #95 introduced incorrect behavior (in particular, this commit: JensRantil@3385f17). It has been there since the end of 2011, and reverses the search order such that I'll try to fix this in both the 3.1.X branch and master. |
Oops, no, that commit is blameless. It just touched lines that were part of a preexisting bug, or at least a disagreement between the docs and the code. |
Great! But FWIW, I definitely didn't have a |
Not sure if there is a better issue to report this in, but seems related: If I have a supervisord.conf in the current directory, but it has no supervisorctl section, then it's impossible to run supervisorctl with command line parameters:
Running the same command in a different directory works fine. I'd suggest either allowing explicit command line arguments to override the implicitly detected config file, or informing the user that they are ignored. version 3.1.3 |
I've this same problem on centos, in my conf I've added a section
I fixed the issue by concatinating |
I usually name sub config file as |
Hi, I used the supervisor on the Mac to write the configuration file to execute the command
|
I also have the same problem
|
me too. |
|
for me the solve was, the daemon was no running ready |
I came upon this issue with a similar error, when running in a Docker container:
The problem in my case was not a missing
|
docker : error: <class 'socket.error'>, [Errno 99] Cannot assign requested address: file: /usr/lib64/python2.7/socket.py line: 571 |
Docker: |
创建默认配置就好了 |
The key here is #376 (comment). If you're setting up the supervisord config file by hand and don't include the server components, you can't connect to it via supervisorctl. |
I have The error is as follows: |
Does the supervisor require privileged user startup? |
mark~ |
I've tried the suggestions above, and I'm getting |
Facing the But at last, I have tried with my solution. Here is an example for the code :
Ref: https://laravel.com/docs/7.x/queues#supervisor-configuration https://stackoverflow.com/questions/41286526/supervisor-no-such-file-socket-py/65791261#65791261 |
The suggestion from @javabrett unfortunately causes errors like the following to be logged at each startup:
As discussed in ticket #717, this can be avoided by securing the configuration. For example:
|
Same issue here. Did you manage to find a solution for it? |
I just installed with pip but when I try to run it, I'm getting the strange error below. Any ideas what could be going on? Is it a bug?
$ sudo supervisorctl
error: <class 'socket.error'>, [Errno 97] Address family not supported by protocol: file: /usr/lib64/python2.6/socket.py line: 567
The text was updated successfully, but these errors were encountered: