liarcn / parallel-ssh

Automatically exported from code.google.com/p/parallel-ssh
Other
0 stars 0 forks source link

ValueError: filedescriptor out of range in select() #72

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

# pssh -i -p 1024 -h hosts "uptime"
Traceback (most recent call last):
  File "/usr/bin/pssh", line 118, in <module>
    do_pssh(hosts, cmdline, opts)
  File "/usr/bin/pssh", line 89, in do_pssh
    statuses = manager.run()
  File "/usr/lib/python2.6/site-packages/psshlib/manager.py", line 74, in run
    self.iomap.poll(wait)
  File "/usr/lib/python2.6/site-packages/psshlib/manager.py", line 242, in poll
    rlist, wlist, _ = select.select(rlist, wlist, [], timeout)
ValueError: filedescriptor out of range in select()

What is the expected output? What do you see instead?

What version of the product are you using? On what operating system?

CentOS release 6.2 (Final) Python 2.6.6

Please provide any additional information below.

Original issue reported on code.google.com by inyong.h...@gmail.com on 15 Jun 2012 at 2:13

GoogleCodeExporter commented 9 years ago
Could you clarify what options make it crash? Does it crash all the time, or 
only when "-p" is as high as 1024, or is there any other factor that seems to 
be responsible? Thanks.

Original comment by amcna...@gmail.com on 15 Jun 2012 at 5:36

GoogleCodeExporter commented 9 years ago
-p option made this result.  What is max value of parallel connection?
If i try without -i option , parallel connection value is less...

More than +3000 hosts. I want finish jobs asap... .
Requires many connections.

Is there any system tuning point? TIA 

Original comment by inyong.h...@gmail.com on 16 Jun 2012 at 12:12

GoogleCodeExporter commented 9 years ago
Many systems define a maximum number of file descriptors. On my Fedora system, 
if I specify `uname -n`, it reports that the maximum number of file descriptors 
is 1024. This is configurable, of course, but it's not something that pssh can 
change.

Original comment by amcna...@gmail.com on 16 Jun 2012 at 12:51

GoogleCodeExporter commented 9 years ago
my sys configuration is 

ulimit -n  : 16000
net.core.somaxconn = 65535

What is  max value of -p option?

Original comment by inyong.h...@gmail.com on 19 Jun 2012 at 1:40

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Interesting. It appears that select can only handle 1024 file descriptors. 
We've been using select instead of poll because it's more portable, but it 
looks like I'll have to change this and support both.

Original comment by amcna...@gmail.com on 19 Jun 2012 at 5:32

GoogleCodeExporter commented 9 years ago
Support for select.poll is now included in commit 3158e60. Please try it out, 
and let me know whether it works for you. This feature will be included in the 
next release of pssh. Thanks for your help.

Original comment by amcna...@gmail.com on 19 Jun 2012 at 7:42

GoogleCodeExporter commented 9 years ago
i tried with -p 1024 and more -p 4096 :-)
it worked well. Thank you very much.

Original comment by inyong.h...@gmail.com on 21 Jun 2012 at 12:50