errors on getaddrinfo(): nodename nor servname provided, or not known - openssh

This is a discussion on errors on getaddrinfo(): nodename nor servname provided, or not known - openssh ; Hello openssh developers, I had built openssh-4.7p1 on arm-apple-darwin9 platform, but I get this error when I load sshd using launchd: root# launchctl load /Library/LaunchDaemons/com.openssh.sshd.plist errors on getaddrinfo(): nodename nor servname provided, or not known When I execute sshd directly, ...

+ Reply to Thread
Results 1 to 8 of 8

Thread: errors on getaddrinfo(): nodename nor servname provided, or not known

  1. errors on getaddrinfo(): nodename nor servname provided, or not known

    Hello openssh developers,

    I had built openssh-4.7p1 on arm-apple-darwin9 platform, but
    I get this error when I load sshd using launchd:

    root# launchctl load /Library/LaunchDaemons/com.openssh.sshd.plist
    errors on getaddrinfo(): nodename nor servname provided, or not known

    When I execute sshd directly, I don't get any warnings or error
    messages, but the sshd is not listening on the intended port, and it's
    not running.

    I didn't change anything significant on the code, except disabling the
    use of utmp.h and util.h.

    Can anyone pinpoint me on what's wrong ?

    Jesse Armand
    ----------------------------------------
    (http://jessearm.blogspot.com)
    _______________________________________________
    openssh-unix-dev mailing list
    openssh-unix-dev@mindrot.org
    https://lists.mindrot.org/mailman/li...enssh-unix-dev


  2. Re: errors on getaddrinfo(): nodename nor servname provided, or notknown

    On Mon, 13 Oct 2008, Jesse Armand wrote:

    > Hello openssh developers,
    >
    > I had built openssh-4.7p1 on arm-apple-darwin9 platform, but
    > I get this error when I load sshd using launchd:
    >
    > root# launchctl load /Library/LaunchDaemons/com.openssh.sshd.plist
    > errors on getaddrinfo(): nodename nor servname provided, or not known
    >
    > When I execute sshd directly, I don't get any warnings or error
    > messages, but the sshd is not listening on the intended port, and it's
    > not running.
    >
    > I didn't change anything significant on the code, except disabling the
    > use of utmp.h and util.h.
    >
    > Can anyone pinpoint me on what's wrong ?


    Can you post a normal debug output? ("sshd -ddd") I have no idea how much
    munging is done between launchctl and sshd, but "errors on getaddrinfo()"
    is not a sshd error message AFAIK.

    -d
    _______________________________________________
    openssh-unix-dev mailing list
    openssh-unix-dev@mindrot.org
    https://lists.mindrot.org/mailman/li...enssh-unix-dev


  3. Re: errors on getaddrinfo(): nodename nor servname provided,or not known

    Jesse Armand wrote:
    > I may need to find out the proper way of integration of sshd into
    > launchd.


    Is ktrace/kdump available? Try comparing manual startup with launchd
    startup.


    //Peter
    _______________________________________________
    openssh-unix-dev mailing list
    openssh-unix-dev@mindrot.org
    https://lists.mindrot.org/mailman/li...enssh-unix-dev


  4. Re: errors on getaddrinfo(): nodename nor servname provided,or not known

    Manual startup works fine.

    I did add -i and -ddd and -e arguments into com.openssh.sshd.plist.

    But there's no further debugging output on launchctl start com.openssh.sshd

    My original purpose is just to target openssh-4.7p1 with my own path
    on arm-apple-darwin9 platform, which listens on specific port (besides
    22), and it's only using SSH protocol version 2.

    And no, there's no ktrace / kdump.

    It seems the only way to debug is by not detaching sshd into a daemon
    (-D) option.

    On Wed, Oct 15, 2008 at 4:35 PM, Peter Stuge wrote:
    > Jesse Armand wrote:
    >> I may need to find out the proper way of integration of sshd into
    >> launchd.

    >
    > Is ktrace/kdump available? Try comparing manual startup with launchd
    > startup.
    >
    >
    > //Peter
    > _______________________________________________
    > openssh-unix-dev mailing list
    > openssh-unix-dev@mindrot.org
    > https://lists.mindrot.org/mailman/li...enssh-unix-dev
    >

    _______________________________________________
    openssh-unix-dev mailing list
    openssh-unix-dev@mindrot.org
    https://lists.mindrot.org/mailman/li...enssh-unix-dev


  5. Re: errors on getaddrinfo(): nodename nor servname provided, or notknown

    On Thu, 16 Oct 2008, Jesse Armand wrote:

    > Manual startup works fine.
    >
    > I did add -i and -ddd and -e arguments into com.openssh.sshd.plist.
    >
    > But there's no further debugging output on launchctl start com.openssh.sshd
    >
    > My original purpose is just to target openssh-4.7p1 with my own path
    > on arm-apple-darwin9 platform, which listens on specific port (besides
    > 22), and it's only using SSH protocol version 2.
    >
    > And no, there's no ktrace / kdump.
    >
    > It seems the only way to debug is by not detaching sshd into a daemon
    > (-D) option.


    I've seen this problem on Darwin but not on MacOS X. If I remember
    correctly, launchd is listening on the port and handing over the
    connected socket to sshd, much like inetd.

    sshd tries to get the remote address of the socket, but it can't, because
    it's being proxied by launchd, so it generates an infinite stream of error
    messages in the system logs/console and spins at 100% CPU.

    With my limited knowledge of launchd, I was not able to make it run
    sshd as a real daemon which handles port listening and incoming
    connections itself. Perhaps copying a configuration from MacOS X might
    help?

    Cheers, Chris.
    --
    _____ __ _
    \ __/ / ,__(_)_ | Chris Wilson <0000 at qwirx.com> - Cambs UK |
    / (_/ ,\/ _/ /_ \ | Security/C/C++/Java/Ruby/Perl/SQL Developer |
    \ _/_/_/_//_/___/ | We are GNU : free your mind & your software |
    _______________________________________________
    openssh-unix-dev mailing list
    openssh-unix-dev@mindrot.org
    https://lists.mindrot.org/mailman/li...enssh-unix-dev


  6. Re: errors on getaddrinfo(): nodename nor servname provided,or not known

    Circa 2008-10-15 14:31 dixit Jesse Armand:

    [About running sshd via Apple's launchd]

    : Manual startup works fine.
    :
    : I did add -i and -ddd and -e arguments into com.openssh.sshd.plist.
    :
    : But there's no further debugging output on launchctl start com.openssh.sshd
    :
    : My original purpose is just to target openssh-4.7p1 with my own path
    : on arm-apple-darwin9 platform, which listens on specific port (besides
    : 22), and it's only using SSH protocol version 2.
    :
    : And no, there's no ktrace / kdump.
    :
    : It seems the only way to debug is by not detaching sshd into a daemon
    : (-D) option.

    According to Apple, you *must* tell sshd not to detach. From
    :

    Jobs run from launchd should not duplicate launchd functionality;
    for instance, they should not use chroot(2). Furthermore, they
    should not do the things normally required of daemon processes, such
    as detaching from the terminal they are initially attached to. The
    only things that are strictly prohibited, however, are fork()/exit()
    combinations (including indirect methods, such as the daemon(3)
    library call). A server which attempts to run itself as a daemon in
    this way will seem to have finished running, potentially leading to
    launchd respawning it, or disabling the service.

    launchd also seems to have a flag which turns on its own debugging,
    confusingly called '-D'. From
    :

    OPTIONS
    -D Debug. Prints syslog messages to stderr and adjusts
    logging via syslog(3) to LOG_DEBUG.

    That may prove helpful.

    --
    jim knoble | jmknoble@pobox.com | http://www.pobox.com/~jmknoble/
    (GnuPG key ID: C6F31FFA >>>>>> http://www.pobox.com/~jmknoble/keys/ )
    (GnuPG fingerprint: 99D8:1D89:8C66:08B5:5C34::5527:A543:8C33:C6F3:1FFA )
    +----------------------------------------------------------------------+
    |[L]iberty, as we all know, cannot flourish in a country that is perma-|
    | nently on a war footing, or even a near-war footing. --Aldous Huxley|
    +----------------------------------------------------------------------+
    _______________________________________________
    openssh-unix-dev mailing list
    openssh-unix-dev@mindrot.org
    https://lists.mindrot.org/mailman/li...enssh-unix-dev


  7. Re: errors on getaddrinfo(): nodename nor servname provided,or not known

    Jesse Armand wrote:
    > It seems the only way to debug is by not detaching sshd into a
    > daemon (-D) option.


    What does your plist look like?


    Chris Wilson wrote:
    > If I remember correctly, launchd is listening on the port and
    > handing over the connected socket to sshd, much like inetd.


    It can, if it's told to do so. But that will not work for sshd.


    Jim Knoble wrote:
    > According to Apple, you *must* tell sshd not to detach.


    Right, just like with supervise. No big deal, use -D.

    > From :


    Helpful page!


    Jesse, note that there must be no Sockets key in your plist. Maybe
    this is all you need:


    "http://www.apple.com/DTDs/PropertyList-1.0.dtd">


    Label
    com.openssh.sshd
    ProgramArguments

    /usr/local/sbin/sshd
    -D

    RunAtLoad





    //Peter
    _______________________________________________
    openssh-unix-dev mailing list
    openssh-unix-dev@mindrot.org
    https://lists.mindrot.org/mailman/li...enssh-unix-dev


  8. Re: errors on getaddrinfo(): nodename nor servname provided,or not known

    Thanks a lot for the info, and guidance on the right direction.

    On Fri, Oct 17, 2008 at 8:31 AM, Peter Stuge wrote:
    >
    > What does your plist look like?
    >
    >


    This is my plist, this plist is working on iPhone OS 2.1 with openssh
    from telesphoreo.org packages, I have my own usage of ssh, and I can't
    disclose it, but basically I use the similar configuration, building,
    and installing:


    "http://www.apple.com/DTDs/PropertyList-1.0.dtd">



    Label
    com.openssh.sshd

    Program
    /path/to/ssh/libexec/sshd-keygen-wrapper

    ProgramArguments

    /path/to/ssh/sbin/sshd
    -i
    -e
    -ddd


    SessionCreate


    Sockets

    Listeners

    Bonjour

    ssh


    SockServiceName
    ssh



    StandardErrorPath
    /dev/null

    inetdCompatibility

    Wait






    Note: /path/to/ssh is my prefix for ssh installation
    _______________________________________________
    openssh-unix-dev mailing list
    openssh-unix-dev@mindrot.org
    https://lists.mindrot.org/mailman/li...enssh-unix-dev


+ Reply to Thread