in reply to Net::OpenSSH connection failing with 'muxserver_listen bind(): Not owner'

I guess that ssh is not able to create the unix socket under ~/.libnet-openssh-perl/ because of incorrect file system permissions.

Anyway, in those cases, truss is the tool that would let you see what's really going wrong. Just ensure you run it with the -f flag to also trace child processes.

Replies are listed 'Best First'.
Re^2: Net::OpenSSH connection failing with 'muxserver_listen bind(): Not owner'
by Only1KW (Sexton) on Sep 01, 2011 at 17:33 UTC

    Truss appears to be a very useful tool I was unaware of. I'm seeing multiple instances of the following line from the output, that I'm guessing is the culprit:

    statx("$HOMEDIR/.libnet-openssh-perl/$USERNAME-$REMOTEHOST-78612-88421", 0x000000011000B178, 176, 0) Err#2  ENOENT

    I see no attempt from any system call to actually create the file being referenced. The $HOMEDIR/.libnet-openssh-perl directory is empty. Any idea what may be causing OpenSSH to be looking for this file, and/or what I should be doing to correct it?

      That statx calls are done by the script process, checking for the UNIX domain socket to appear, but in some place there should be another call from the forked ssh process doing a bind call that fails.

      Anyway, what permissions has $HOMEDIR/.libnet-openssh-perl/?

        Yea, I missed the forked call to the bind. It's here:
        113710: _poll(0x2FF1C1D0, 1, 2000) = 1 113710: nrecvfrom(4, 0x2FF1E0F0, 1024, 0, 0x2FF1C970, 0x2FF1C1C0) = + 133 113710: close(4) = 0 113710: socket(2, 2, 0) = 4 113710: getsockopt(4, 65535, 4104, 0x2FF1DE14, 0x2FF1DE10) = 0 113710: connext(4, 0xF027F2E0, 16) = 0 113710: send(4, 0x2FF1EC00, 41, 0) = 41 113710: _poll(0x2FF1DE90, 1, 2000) = 1 113710: nrecvfrom(4, 0x2FF1F4C4, 1024, 0, 0x2FF1E630, 0x2FF1DE80) = + 154 113710: close(4) = 0 113710: access("/etc/krb5.conf", 04) = 0 113710: statx("/opt/krb5/etc/krb5.conf", 0x2FF1FB58, 76, 0) Err#2 +ENOENT 113710: open(0xD0ADB328, O_RDONLY) = 4 113710: fstatx(4, 0x2FF20CF0, 76, 0) = 0 113710: kread(4, " Ù _9F <80 T } ¿ Ú ± Q ½".., 20) = 20 113710: close(4) = 0 113710: _getpid() = 113710 113710: open("/opt/dcelocal/var/security/creds/dcecred_6e245c24", O +_RDONLY) = 4 113710: kfcntl(4, F_SETLKW, 0x2FF208A0) = 0 113710: kread(4, "0501", 2) = 2 113710: lseek(4, 2, 0) = 2 113710: kread(4, "\0\0\002\0\0\00F r c h l".., 1024) = 1024 113710: lseek(4, 2, 0) = 2 113710: kread(4, "\0\0\002\0\0\00F r c h l".., 1024) = 1024 113710: lseek(4, -989, 1) = 37 113710: lseek(4, 37, 0) = 37 113710: kread(4, "\0\0\002\0\0\00F r c h l".., 1024) = 1024 113710: lseek(4, -574, 1) = 487 113710: kfcntl(4, F_SETLKW, 0x2FF20C80) = 0 113710: close(4) = 0 113710: access("/etc/krb5.conf", 04) = 0 113710: statx("/opt/krb5/etc/krb5.conf", 0x2FF1FC68, 76, 0) Err#2 +ENOENT 113710: open(0xD0ADB328, O_RDONLY) = 4 113710: fstatx(4, 0x2FF20E00, 76, 0) = 0 113710: kread(4, "94 ? 7 È k i È : à § ¼ Ç".., 20) = 20 113710: close(4) = 0 113710: _getpid() = 113710 113710: access("/etc/krb5.conf", 04) = 0 113710: statx("/opt/krb5/etc/krb5.conf", 0x2FF1FD28, 76, 0) Err#2 +ENOENT 113710: open(0xD0ADB328, O_RDONLY) = 4 113710: fstatx(4, 0x2FF20EC0, 76, 0) = 0 113710: kread(4, " Å8A e a ±9F ¤8319 u È !".., 20) = 20 113710: close(4) = 0 113710: _getpid() = 113710 113710: kwrite(3, "1D Ø8C Ï a ( > · k [12 <".., 80) = 80 113710: _select(4, 0x20043210, 0x00000000, 0x00000000, 0x00000000) += 1 113710: kread(3, "7F82 à ? $ v s Ý ® · l %".., 8192) = 32 113710: socket(1, 1, 0) = 4 113710: umask(127) = 18 113710: bind(4, 0x2FF21030, 87) Err#1 EPERM ssh_control_listener bind(): Not owner 113710: kwrite(2, " s s h _ c o n t r o l _".., 40) = 40 113710: _exit(255)

        Nothing stands out to me as a possible previous error that might be causing the bind error. I did see the following repeating error in another process that may also be related:

        477272: kioctl(3, 22528, 0x0000000000000000, 0x0000000000000000)113710 +: ENOTTY
        Seems like that'd be expected though since ssh is being run through a Perl module.

        Permissions on .libnet-openssh-perl are set to 700.