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

Jim Knoble jmknoble at pobox.com
Fri Oct 17 10:49:27 EST 2008


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
<http://developer.apple.com/macosx/launchd.html>:

    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
<http://developer.apple.com/documentation/Darwin/Reference/ManPages/man8/launchd.8.html>:

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

That may prove helpful.

-- 
jim knoble  |  jmknoble at 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|
+----------------------------------------------------------------------+


More information about the openssh-unix-dev mailing list