It looks like something in your codebase has activated the eventlet library and is probably running its "patch the world" method? Notice how the traceback enters the eventlet lib after calling select(), which in regular Fabric is just the stdlib select.select function.
We unfortunately don't support eventlet so there's not a lot of help we can provide, sorry! Best, Jeff On Thu, Dec 17, 2015 at 7:22 AM, Владимир Янченко <xooyan...@gmail.com> wrote: > Hi! > > I run fabric tasks throw other python tool, that works via gunicorn. > > Usually my tasks work fine, but sometimes I get the strange error "Operation > not permitted". > This error appears when fabric run the first "run" function. > > What could this error mean? Gunicorn restart helps me for a while, but then > the error returns. > > I found only one mention of such problem in internet: > https://github.com/StackStorm/st2/issues/1792 > > Full stack: > File "/home/administrator/webhandler/naupp_integration/utilities.py", line > 329, in create > network = network) > File "/home/administrator/webhandler/others/fabfile.py", line 600, in > create_stand > run('rm -f /tmp/stands_ports_list.txt; echo $?',shell=True,pty=False) > File "/usr/local/lib/python2.7/dist-packages/fabric/network.py", line 639, > in host_prompting_wrapper > return func(*args, **kwargs) > File "/usr/local/lib/python2.7/dist-packages/fabric/operations.py", line > 1042, in run > shell_escape=shell_escape) > File "/usr/local/lib/python2.7/dist-packages/fabric/operations.py", line > 911, in _run_command > stderr=stderr, timeout=timeout) > File "/usr/local/lib/python2.7/dist-packages/fabric/operations.py", line > 795, in _execute > worker.raise_if_needed() > File "/usr/local/lib/python2.7/dist-packages/fabric/thread_handling.py", > line 12, in wrapper > callable(*args, **kwargs) > File "/usr/local/lib/python2.7/dist-packages/fabric/io.py", line 231, in > input_loop > r, w, x = select([sys.stdin], [], [], 0.0) > File "/usr/local/lib/python2.7/dist-packages/eventlet/green/select.py", > line 79, in select > listeners.append(hub.add(hub.READ, k, on_read, on_error, lambda x: > None)) > File "/usr/local/lib/python2.7/dist-packages/eventlet/hubs/epolls.py", > line 53, in add > self.register(fileno, new=True) > File "/usr/local/lib/python2.7/dist-packages/eventlet/hubs/poll.py", line > 45, in register > self.poll.register(fileno, mask) > IOError: [Errno 1] Operation not permitted > > My code: > > utilities.py: > > foo = load_source('fabfile', '../others/fabfile.py') > ... > result = foo.create_stand( > ... > ) > > fabfile.py: > > from fabric.operations import run > from fabric.api import * > > env.parallel=False > @serial > def create_stand(.... stand_host = '', stand_user = '', ....) > > > with settings( > hide('warnings'), > host_string=stand_host, > user=stand_user, > warn_only=True > ): > disconnect_all() > run('rm -f /tmp/stands_ports_list.txt; echo > $?',shell=True,pty=False) > ... > > -- > > Vladimir Yanchenko > Support engineer > Naumen > > _______________________________________________ > Fab-user mailing list > Fab-user@nongnu.org > https://lists.nongnu.org/mailman/listinfo/fab-user > -- Jeff Forcier Unix sysadmin; Python/Ruby engineer http://bitprophet.org _______________________________________________ Fab-user mailing list Fab-user@nongnu.org https://lists.nongnu.org/mailman/listinfo/fab-user