On 02/21/16 01:05, li...@wrant.com wrote:
Sat, 20 Feb 2016 20:06:57 +0100 Federico Giannici <giann...@neomedia.it>
In a server (OpenBSD amd64 5.7) with many concurrent perl programs that
have to open a lot of SSH connections, I get many errors like this:
Have you tried connection sharing with ssh(1) yet? Does the Net:SSH
give you this?
connect() on closed socket GEN136 at
/usr/local/libdata/perl5/site_perl/Net/SSH/Perl.pm line 216.
Maybe at some point no more sockets can be opened because of some limit
is reached?
I already tried to set these in sysctl.conf:
kern.maxfiles=20000
kern.somaxconn=1024
And set this in login.conf:
openfiles-cur=1024
But it didn't solved.
Any suggestion of what a can look at?
You could start simple and then advance to the complete programmatic
solution. Possibly, but not necessarily limited to these:
ssh(1) connection sharing
Connections are to (a lot of) different devices, so cannot do connection
sharing.
ksh(1) ulimit
login.conf(5)
I already increased "openfiles-cur".
Are there other limits that can give problems to socket opening
("connect() on closed socket" or "Bad file descriptor")?
The program works, the problems arise when there are too many concurrent
connections.
Thanks.
Maybe just then work on the eventual Perl related issues after you
confirm you can achieve the desired results with plain shell commands,
one liner (scripts) and direct ssh client connect using connection
sharing.
--
___________________________________________________
__
|- giann...@neomedia.it
|ederico Giannici http://www.neomedia.it
Presidente del CDA - Neomedia S.r.l.
___________________________________________________