Discussion:
NetBSD as a TimeCapsule?
Fredrik Pettai
2014-03-18 10:01:03 UTC
Permalink
Hi,

I'm testing to see if it's possible to run NetBSD as a TimeCapsule server.
My NAS box supports this, so it should be possible.

I've enabled mdnsd(8).

I installed net/netatalk and configured afpd.conf as:
- -tcp -noddp -uamlist uams_guest.so,uams_dhx2.so -nosavepassword

…and the AppleVolumes.default:
/home/TimeCapsule "TimeCapsule" cnidscheme:dbd options:usedots,upriv,tm allow:timecapsule

The server shows up in mdns after a while, but the MacOSX clients get "Connection Failed".

In the message file i only see some errors (but not at the time then the client try to connect)

Mar 18 09:00:21 xsrv1 afpd[29071]: AFP/TCP started, advertising 109.105.10x.xxx:548 (2.2.5)
Mar 18 09:00:21 xsrv1 afpd[29071]: volume "TimeCapsule" does not support Extended Attributes, using ea:ad instead
Mar 18 09:00:21 xsrv1 mdnsd: 13: WARNING: setsockopt - SO_NOSIGPIPE 22 (Invalid argument)
Mar 18 09:00:21 xsrv1 mdnsd: 14: WARNING: setsockopt - SO_NOSIGPIPE 22 (Invalid argument)

Is someone using mdnsd+afpd on NetBSD successfully?
Is so, care to share how you got it working?


Just a reflection on NetBSD's mdnsd(8):

NetBSD's mdnsd(8) (version 212.1) was imported into NetBSD in September 2009.
My old Snow Leopard (which is probably one of few left) is running version 258.21, so the version imported into NetBSD originates from Leopard. So mdnsd in NetBSD seems more than obsolete. If no one plan to upgrade it, maybe it should be removed from the next major release of NetBSD ?

Re,
/P
Fredrik Pettai
2014-03-18 15:50:52 UTC
Permalink
> Just a reflection on NetBSD's mdnsd(8):
>
> NetBSD's mdnsd(8) (version 212.1) was imported into NetBSD in September 2009.
> My old Snow Leopard (which is probably one of few left) is running version 258.21, so the version imported into NetBSD originates from Leopard. So mdnsd in NetBSD seems more than obsolete. If no one plan to upgrade it, maybe it should be removed from the next major release of NetBSD ?

I was informed that a newer version of mdnsd(8) is available in pkgsrc/net/mDNSresponder, so I installed that to see if that would help, but it fails to start with the message:

Mar 18 14:56:53 xsrv1 mDNSResponder: mDNSResponder (Engineering Build) (Mar 18 2014 14:43:05) starting
Mar 18 14:56:53 xsrv1 mDNSResponder: ERROR: bind(listenfd, (struct sockaddr *) &laddr, sizeof(laddr)); failed: 48 (Address already in use)
Mar 18 14:56:53 xsrv1 mDNSResponder: ERROR: udsserver_init: 48 (Address already in use)
Mar 18 14:56:53 xsrv1 mDNSResponder: mDNS_AddDNSServer: Lock not held! mDNS_busy (0) mDNS_reentrancy (0)
Mar 18 14:56:53 xsrv1 mDNSResponder: mDNS_AddDNSServer: Lock not held! mDNS_busy (0) mDNS_reentrancy (0)
Mar 18 14:56:53 xsrv1 mDNSResponder: mDNSResponder (Engineering Build) (Mar 18 2014 14:43:05) stopping

and the bundled dns-sd doesn't seem to work well either:

xsrv1# /usr/pkg/bin/dns-sd -V
DNSServiceGetProperty failed -65563

(still testing on the NetBSD 6.1.3/amd64 host...)

So to iterate over this again, is anybody using mDNSresponder successfully on NetBSD? (either the bundled in NetBSD, or the pkgsrc version…)

/P
David Lord
2014-03-18 16:58:12 UTC
Permalink
On 18 Mar 2014 at 16:50, Fredrik Pettai wrote:

>
> > Just a reflection on NetBSD's mdnsd(8):
> >
> > NetBSD's mdnsd(8) (version 212.1) was imported into NetBSD in September 2009.
> > My old Snow Leopard (which is probably one of few left) is running version 258.21, so the version imported into NetBSD originates from Leopard. So mdnsd in NetBSD seems more than obsolete. If no one plan to upgrade it, maybe it should be removed from the next major release of NetBSD ?
>
> I was informed that a newer version of mdnsd(8) is available in pkgsrc/net/mDNSresponder, so I installed that to see if that would help, but it fails to start with the message:
>
> Mar 18 14:56:53 xsrv1 mDNSResponder: mDNSResponder (Engineering Build) (Mar 18 2014 14:43:05) starting
> Mar 18 14:56:53 xsrv1 mDNSResponder: ERROR: bind(listenfd, (struct sockaddr *) &laddr, sizeof(laddr)); failed: 48 (Address already in use)
> Mar 18 14:56:53 xsrv1 mDNSResponder: ERROR: udsserver_init: 48 (Address already in use)
> Mar 18 14:56:53 xsrv1 mDNSResponder: mDNS_AddDNSServer: Lock not held! mDNS_busy (0) mDNS_reentrancy (0)
> Mar 18 14:56:53 xsrv1 mDNSResponder: mDNS_AddDNSServer: Lock not held! mDNS_busy (0) mDNS_reentrancy (0)
> Mar 18 14:56:53 xsrv1 mDNSResponder: mDNSResponder (Engineering Build) (Mar 18 2014 14:43:05) stopping
>
> and the bundled dns-sd doesn't seem to work well either:
>
> xsrv1# /usr/pkg/bin/dns-sd -V
> DNSServiceGetProperty failed -65563
>
> (still testing on the NetBSD 6.1.3/amd64 host...)
>
> So to iterate over this again, is anybody using mDNSresponder successfully on NetBSD? (either the bundled in NetBSD, or the pkgsrc version...)
>
> /P
>

Hi

My amd systems aren't usable just now and have been running
i386 anyway. On an i386 system mdnsd fails to start but after
adding user _mdnsd and group _mdnsd:

$ /etc/rc.d/mdnsd onestart
$ ps ax | grep mdnsd
6020 ? Ss 0:00.01 /usr/sbin/mdnsd


I've no idea how to test if it does anything useful


David
Fredrik Pettai
2014-03-18 20:03:21 UTC
Permalink
> My amd systems aren't usable just now and have been running
> i386 anyway. On an i386 system mdnsd fails to start but after
> adding user _mdnsd and group _mdnsd:

Those come in NetBSD 6.x (something) by default, so I had them installed from start.
(postinstall should have (at least in theory :)) reminded you to add those if they where missing after an upgrade)

/P
matthew sporleder
2014-03-19 00:34:31 UTC
Permalink
On Tue, Mar 18, 2014 at 11:50 AM, Fredrik Pettai <***@nordu.net> wrote:
>
>> Just a reflection on NetBSD's mdnsd(8):
>>
>> NetBSD's mdnsd(8) (version 212.1) was imported into NetBSD in September 2009.
>> My old Snow Leopard (which is probably one of few left) is running version 258.21, so the version imported into NetBSD originates from Leopard. So mdnsd in NetBSD seems more than obsolete. If no one plan to upgrade it, maybe it should be removed from the next major release of NetBSD ?
>
> I was informed that a newer version of mdnsd(8) is available in pkgsrc/net/mDNSresponder, so I installed that to see if that would help, but it fails to start with the message:
>
> Mar 18 14:56:53 xsrv1 mDNSResponder: mDNSResponder (Engineering Build) (Mar 18 2014 14:43:05) starting
> Mar 18 14:56:53 xsrv1 mDNSResponder: ERROR: bind(listenfd, (struct sockaddr *) &laddr, sizeof(laddr)); failed: 48 (Address already in use)
> Mar 18 14:56:53 xsrv1 mDNSResponder: ERROR: udsserver_init: 48 (Address already in use)



Address already in use. Did you shutdown mdnsd? Check netstat/lsof, etc









> Mar 18 14:56:53 xsrv1 mDNSResponder: mDNS_AddDNSServer: Lock not held! mDNS_busy (0) mDNS_reentrancy (0)
> Mar 18 14:56:53 xsrv1 mDNSResponder: mDNS_AddDNSServer: Lock not held! mDNS_busy (0) mDNS_reentrancy (0)
> Mar 18 14:56:53 xsrv1 mDNSResponder: mDNSResponder (Engineering Build) (Mar 18 2014 14:43:05) stopping
>
> and the bundled dns-sd doesn't seem to work well either:
>
> xsrv1# /usr/pkg/bin/dns-sd -V
> DNSServiceGetProperty failed -65563
>
> (still testing on the NetBSD 6.1.3/amd64 host...)
>
> So to iterate over this again, is anybody using mDNSresponder successfully on NetBSD? (either the bundled in NetBSD, or the pkgsrc version...)
>
> /P
Fredrik Pettai
2014-03-19 09:30:35 UTC
Permalink
On Mar 19, 2014, at 01:34 , matthew sporleder <***@gmail.com> wrote:

> On Tue, Mar 18, 2014 at 11:50 AM, Fredrik Pettai <***@nordu.net> wrote:
>>
>>> Just a reflection on NetBSD's mdnsd(8):
>>>
>>> NetBSD's mdnsd(8) (version 212.1) was imported into NetBSD in September 2009.
>>> My old Snow Leopard (which is probably one of few left) is running version 258.21, so the version imported into NetBSD originates from Leopard. So mdnsd in NetBSD seems more than obsolete. If no one plan to upgrade it, maybe it should be removed from the next major release of NetBSD ?
>>
>> I was informed that a newer version of mdnsd(8) is available in pkgsrc/net/mDNSresponder, so I installed that to see if that would help, but it fails to start with the message:
>>
>> Mar 18 14:56:53 xsrv1 mDNSResponder: mDNSResponder (Engineering Build) (Mar 18 2014 14:43:05) starting
>> Mar 18 14:56:53 xsrv1 mDNSResponder: ERROR: bind(listenfd, (struct sockaddr *) &laddr, sizeof(laddr)); failed: 48 (Address already in use)
>> Mar 18 14:56:53 xsrv1 mDNSResponder: ERROR: udsserver_init: 48 (Address already in use)
>
> Address already in use. Did you shutdown mdnsd? Check netstat/lsof, etc

yes, old mdnsd was not running prior to this. So that message was a red herring...

>> Mar 18 14:56:53 xsrv1 mDNSResponder: mDNS_AddDNSServer: Lock not held! mDNS_busy (0) mDNS_reentrancy (0)
>> Mar 18 14:56:53 xsrv1 mDNSResponder: mDNS_AddDNSServer: Lock not held! mDNS_busy (0) mDNS_reentrancy (0)

The problem it seems, was that /var/run/mdnsd was a directory owned by NetBSD bundled mdnsd (_mdnsd:_mdnsd)
Removing that, made /usr/pkg/sbin/mdnsd write some other files:

$ ls -l /var/run/m*
...
srwxrwxrwx 1 root wheel 0 Mar 19 09:20 mdnsd
-rw-r--r-- 1 root wheel 5 Mar 19 09:20 mdnsd.pid

And stay up.

Now, lets see if netatalk can do some working shares too…

/P
Fredrik Pettai
2014-03-19 11:06:07 UTC
Permalink
On Mar 19, 2014, at 10:30 , Fredrik Pettai <***@nordu.net> wrote:
> On Mar 19, 2014, at 01:34 , matthew sporleder <***@gmail.com> wrote:
>> On Tue, Mar 18, 2014 at 11:50 AM, Fredrik Pettai <***@nordu.net> wrote:
>
> Now, lets see if netatalk can do some working shares too…

Ok, afpd (net/netatalk) isn't able to register itself with mdnsd (net/mDNSresponder).

Mar 19 09:57:49 xsrv1 afpd[18236]: AFP/TCP started, advertising 109.105.104.215:548 (2.2.5)
Mar 19 09:57:49 xsrv1 afpd[18236]: volume "TimeCapsule" does not support Extended Attributes, using ea:ad instead
Mar 19 09:57:52 xsrv1 afpd[18236]: Failed to add service: _afpovertcp._tcp, error=-65563

and from ktrace -t A :

[…]

18236 1 afpd getpid() = 18236, 8346
18236 1 afpd __lstat50("org.netatalk.supports-eas.18236a", 0x7f7fffffb3f0) Err#2 ENOENT
18236 1 afpd geteuid() = 0
18236 1 afpd setxattr(0x7f7ff7b022e0, 0x6878a0, 0x4612e7, 0x4, 0) Err#86 ENOTSUP
18236 1 afpd __gettimeofday50(0x7f7fffff9d90, 0) = 0
18236 1 afpd getpid() = 18236, 8346
18236 1 afpd fcntl(0x7, 0x3, 0) = 2
18236 1 afpd sendto(0x7, 0x7f7fffff9db0, 0x94, 0, 0, 0) = 148
"<28>1 2014-03-19T09:57:49.667675+00:00 xsrv1.nordu.net afpd 18236 - - volume "TimeCapsule" does not support Extended Attributes, using ea:ad instead"
18236 1 afpd open("/usr/pkg/etc/netatalk/afp_voluuid.conf", 0, 0x1b6) = 9
18236 1 afpd __fstat50(0x9, 0x7f7fffffb360) = 0
18236 1 afpd read(0x9, 0x7f7ff7b4c000, 0x4000) = 163
"# DON'T TOUCH NOR COPY THOUGHTLESSLY!\n# This file is auto-generated by afpd\n# and stores UUIDs for TM volumes.\n\n"TimeCapsule"\t5BB076DF-95E0-ADE5-497C-0A6820E01E4C\n"
18236 1 afpd close(0x9) = 0
18236 1 afpd read(0x3, 0x7f7ff7b0c000, 0x4000) = 0
""
18236 1 afpd close(0x3) = 0
18236 1 afpd __socket30(0x1, 0x1, 0) = 3
18236 1 afpd setsockopt(0x3, 0xffff, 0x800, 0x7f7fffffd1cc, 0x4) = 0
18236 1 afpd connect(0x3, 0x7f7fffffd160, 0x6a) Err#20 ENOTDIR
18236 1 afpd __nanosleep50(0x7f7fffffd130, 0x7f7fffffd120) = 0
18236 1 afpd connect(0x3, 0x7f7fffffd160, 0x6a) Err#20 ENOTDIR
18236 1 afpd __nanosleep50(0x7f7fffffd130, 0x7f7fffffd120) = 0
18236 1 afpd connect(0x3, 0x7f7fffffd160, 0x6a) Err#20 ENOTDIR
18236 1 afpd __nanosleep50(0x7f7fffffd130, 0x7f7fffffd120) = 0
18236 1 afpd connect(0x3, 0x7f7fffffd160, 0x6a) Err#20 ENOTDIR
18236 1 afpd close(0x3) = 0
18236 1 afpd __gettimeofday50(0x7f7fffffbb40, 0) = 0
18236 1 afpd getpid() = 18236, 8346
18236 1 afpd fcntl(0x7, 0x3, 0) = 2
18236 1 afpd sendto(0x7, 0x7f7fffffbb60, 0x7b, 0, 0, 0) = 123
"<27>1 2014-03-19T09:57:52.694445+00:00 xsrv1.nordu.net afpd 18236 - - Failed to add service: _afpovertcp._tcp, error=-65563"
18236 1 afpd __sigprocmask14(0x2, 0x7f7fffffdbe0, 0) = 0
18236 1 afpd getrlimit(0x8, 0x7f7fffffdbd0) = 0
18236 1 afpd setrlimit(0x8, 0x7f7fffffdbd0) = 0
18236 1 afpd __sigprocmask14(0x2, 0x7f7fffffdbe0, 0) = 0
18236 1 afpd poll(0x7f7ff7b4c170, 0x1, 0xffffffff) Err#4 EINTR
18236 1 afpd SIGINT SIG_DFL

The connect() fails after setsockopt()

/P
Fredrik Pettai
2014-03-19 11:26:03 UTC
Permalink
On Mar 19, 2014, at 12:06 , Fredrik Pettai <***@nordu.net> wrote:
> On Mar 19, 2014, at 10:30 , Fredrik Pettai <***@nordu.net> wrote:
>> On Mar 19, 2014, at 01:34 , matthew sporleder <***@gmail.com> wrote:
>>> On Tue, Mar 18, 2014 at 11:50 AM, Fredrik Pettai <***@nordu.net> wrote:
>>
>> Now, lets see if netatalk can do some working shares too…
>
> Ok, afpd (net/netatalk) isn't able to register itself with mdnsd (net/mDNSresponder).
>
> Mar 19 09:57:49 xsrv1 afpd[18236]: AFP/TCP started, advertising 109.105.104.215:548 (2.2.5)
> Mar 19 09:57:49 xsrv1 afpd[18236]: volume "TimeCapsule" does not support Extended Attributes, using ea:ad instead
> Mar 19 09:57:52 xsrv1 afpd[18236]: Failed to add service: _afpovertcp._tcp, error=-65563
>
> and from ktrace -t A :
>
> […]
>
> 18236 1 afpd getpid() = 18236, 8346
> 18236 1 afpd __lstat50("org.netatalk.supports-eas.18236a", 0x7f7fffffb3f0) Err#2 ENOENT
> 18236 1 afpd geteuid() = 0
> 18236 1 afpd setxattr(0x7f7ff7b022e0, 0x6878a0, 0x4612e7, 0x4, 0) Err#86 ENOTSUP
> 18236 1 afpd __gettimeofday50(0x7f7fffff9d90, 0) = 0
> 18236 1 afpd getpid() = 18236, 8346
> 18236 1 afpd fcntl(0x7, 0x3, 0) = 2
> 18236 1 afpd sendto(0x7, 0x7f7fffff9db0, 0x94, 0, 0, 0) = 148
> "<28>1 2014-03-19T09:57:49.667675+00:00 xsrv1.nordu.net afpd 18236 - - volume "TimeCapsule" does not support Extended Attributes, using ea:ad instead"
> 18236 1 afpd open("/usr/pkg/etc/netatalk/afp_voluuid.conf", 0, 0x1b6) = 9
> 18236 1 afpd __fstat50(0x9, 0x7f7fffffb360) = 0
> 18236 1 afpd read(0x9, 0x7f7ff7b4c000, 0x4000) = 163
> "# DON'T TOUCH NOR COPY THOUGHTLESSLY!\n# This file is auto-generated by afpd\n# and stores UUIDs for TM volumes.\n\n"TimeCapsule"\t5BB076DF-95E0-ADE5-497C-0A6820E01E4C\n"
> 18236 1 afpd close(0x9) = 0
> 18236 1 afpd read(0x3, 0x7f7ff7b0c000, 0x4000) = 0
> ""
> 18236 1 afpd close(0x3) = 0
> 18236 1 afpd __socket30(0x1, 0x1, 0) = 3
> 18236 1 afpd setsockopt(0x3, 0xffff, 0x800, 0x7f7fffffd1cc, 0x4) = 0
> 18236 1 afpd connect(0x3, 0x7f7fffffd160, 0x6a) Err#20 ENOTDIR
> 18236 1 afpd __nanosleep50(0x7f7fffffd130, 0x7f7fffffd120) = 0
> 18236 1 afpd connect(0x3, 0x7f7fffffd160, 0x6a) Err#20 ENOTDIR
> 18236 1 afpd __nanosleep50(0x7f7fffffd130, 0x7f7fffffd120) = 0
> 18236 1 afpd connect(0x3, 0x7f7fffffd160, 0x6a) Err#20 ENOTDIR
> 18236 1 afpd __nanosleep50(0x7f7fffffd130, 0x7f7fffffd120) = 0
> 18236 1 afpd connect(0x3, 0x7f7fffffd160, 0x6a) Err#20 ENOTDIR
> 18236 1 afpd close(0x3) = 0
> 18236 1 afpd __gettimeofday50(0x7f7fffffbb40, 0) = 0
> 18236 1 afpd getpid() = 18236, 8346
> 18236 1 afpd fcntl(0x7, 0x3, 0) = 2
> 18236 1 afpd sendto(0x7, 0x7f7fffffbb60, 0x7b, 0, 0, 0) = 123
> "<27>1 2014-03-19T09:57:52.694445+00:00 xsrv1.nordu.net afpd 18236 - - Failed to add service: _afpovertcp._tcp, error=-65563"
> 18236 1 afpd __sigprocmask14(0x2, 0x7f7fffffdbe0, 0) = 0
> 18236 1 afpd getrlimit(0x8, 0x7f7fffffdbd0) = 0
> 18236 1 afpd setrlimit(0x8, 0x7f7fffffdbd0) = 0
> 18236 1 afpd __sigprocmask14(0x2, 0x7f7fffffdbe0, 0) = 0
> 18236 1 afpd poll(0x7f7ff7b4c170, 0x1, 0xffffffff) Err#4 EINTR
> 18236 1 afpd SIGINT SIG_DFL
>
> The connect() fails after setsockopt()

And wip/netatalk (version 3.1.0) also suffers the same problem with net/mDNSresponder…

[…]

6768 1 afpd __socket30(0x1, 0x1, 0) = 8
6768 1 afpd setsockopt(0x8, 0xffff, 0x800, 0x7f7fffffd85c, 0x4) = 0
6768 1 afpd connect(0x8, 0x7f7fffffd7f0, 0x6a) Err#20 ENOTDIR
6768 1 afpd __nanosleep50(0x7f7fffffd7c0, 0x7f7fffffd7b0) = 0
6768 1 afpd connect(0x8, 0x7f7fffffd7f0, 0x6a) Err#20 ENOTDIR
6768 1 afpd __nanosleep50(0x7f7fffffd7c0, 0x7f7fffffd7b0) = 0
6768 1 afpd connect(0x8, 0x7f7fffffd7f0, 0x6a) Err#20 ENOTDIR
6768 1 afpd __nanosleep50(0x7f7fffffd7c0, 0x7f7fffffd7b0) = 0
6768 1 afpd connect(0x8, 0x7f7fffffd7f0, 0x6a) Err#20 ENOTDIR
6768 1 afpd close(0x8) = 0
6768 1 afpd __gettimeofday50(0x7f7fffffc1f0, 0) = 0
6768 1 afpd getpid() = 6768, 15161
6768 1 afpd fcntl(0x7, 0x3, 0) = 2
6768 1 afpd sendto(0x7, 0x7f7fffffc210, 0x7a, 0, 0, 0) = 122
"<27>1 2014-03-19T11:18:34.377201+00:00 xsrv1.nordu.net afpd 6768 - - Failed to add service: _afpovertcp._tcp, error=-65563"
6768 1 afpd __sigprocmask14(0x2, 0x7f7fffffdbd0, 0) = 0
6768 1 afpd getrlimit(0x8, 0x7f7fffffdbc0) = 0
6768 1 afpd setrlimit(0x8, 0x7f7fffffdbc0) = 0
6768 1 afpd __sigprocmask14(0x2, 0x7f7fffffdbd0, 0) = 0

:(

/P
Fredrik Pettai
2014-03-19 12:07:11 UTC
Permalink
On Mar 19, 2014, at 12:26 , Fredrik Pettai <***@nordu.net> wrote:
> On Mar 19, 2014, at 12:06 , Fredrik Pettai <***@nordu.net> wrote:
>> On Mar 19, 2014, at 10:30 , Fredrik Pettai <***@nordu.net> wrote:
>>> On Mar 19, 2014, at 01:34 , matthew sporleder <***@gmail.com> wrote:
>>>> On Tue, Mar 18, 2014 at 11:50 AM, Fredrik Pettai <***@nordu.net> wrote:
>>>
>>> Now, lets see if netatalk can do some working shares too…
>>
>> Ok, afpd (net/netatalk) isn't able to register itself with mdnsd (net/mDNSresponder).
>>
>> Mar 19 09:57:49 xsrv1 afpd[18236]: AFP/TCP started, advertising 109.105.104.215:548 (2.2.5)
>> Mar 19 09:57:49 xsrv1 afpd[18236]: volume "TimeCapsule" does not support Extended Attributes, using ea:ad instead
>> Mar 19 09:57:52 xsrv1 afpd[18236]: Failed to add service: _afpovertcp._tcp, error=-65563
>>
>> and from ktrace -t A :
>>
>> […]
>>
>> 18236 1 afpd getpid() = 18236, 8346
>> 18236 1 afpd __lstat50("org.netatalk.supports-eas.18236a", 0x7f7fffffb3f0) Err#2 ENOENT
>> 18236 1 afpd geteuid() = 0
>> 18236 1 afpd setxattr(0x7f7ff7b022e0, 0x6878a0, 0x4612e7, 0x4, 0) Err#86 ENOTSUP
>> 18236 1 afpd __gettimeofday50(0x7f7fffff9d90, 0) = 0
>> 18236 1 afpd getpid() = 18236, 8346
>> 18236 1 afpd fcntl(0x7, 0x3, 0) = 2
>> 18236 1 afpd sendto(0x7, 0x7f7fffff9db0, 0x94, 0, 0, 0) = 148
>> "<28>1 2014-03-19T09:57:49.667675+00:00 xsrv1.nordu.net afpd 18236 - - volume "TimeCapsule" does not support Extended Attributes, using ea:ad instead"
>> 18236 1 afpd open("/usr/pkg/etc/netatalk/afp_voluuid.conf", 0, 0x1b6) = 9
>> 18236 1 afpd __fstat50(0x9, 0x7f7fffffb360) = 0
>> 18236 1 afpd read(0x9, 0x7f7ff7b4c000, 0x4000) = 163
>> "# DON'T TOUCH NOR COPY THOUGHTLESSLY!\n# This file is auto-generated by afpd\n# and stores UUIDs for TM volumes.\n\n"TimeCapsule"\t5BB076DF-95E0-ADE5-497C-0A6820E01E4C\n"
>> 18236 1 afpd close(0x9) = 0
>> 18236 1 afpd read(0x3, 0x7f7ff7b0c000, 0x4000) = 0
>> ""
>> 18236 1 afpd close(0x3) = 0
>> 18236 1 afpd __socket30(0x1, 0x1, 0) = 3
>> 18236 1 afpd setsockopt(0x3, 0xffff, 0x800, 0x7f7fffffd1cc, 0x4) = 0
>> 18236 1 afpd connect(0x3, 0x7f7fffffd160, 0x6a) Err#20 ENOTDIR
>> 18236 1 afpd __nanosleep50(0x7f7fffffd130, 0x7f7fffffd120) = 0
>> 18236 1 afpd connect(0x3, 0x7f7fffffd160, 0x6a) Err#20 ENOTDIR
>> 18236 1 afpd __nanosleep50(0x7f7fffffd130, 0x7f7fffffd120) = 0
>> 18236 1 afpd connect(0x3, 0x7f7fffffd160, 0x6a) Err#20 ENOTDIR
>> 18236 1 afpd __nanosleep50(0x7f7fffffd130, 0x7f7fffffd120) = 0
>> 18236 1 afpd connect(0x3, 0x7f7fffffd160, 0x6a) Err#20 ENOTDIR
>> 18236 1 afpd close(0x3) = 0
>> 18236 1 afpd __gettimeofday50(0x7f7fffffbb40, 0) = 0
>> 18236 1 afpd getpid() = 18236, 8346
>> 18236 1 afpd fcntl(0x7, 0x3, 0) = 2
>> 18236 1 afpd sendto(0x7, 0x7f7fffffbb60, 0x7b, 0, 0, 0) = 123
>> "<27>1 2014-03-19T09:57:52.694445+00:00 xsrv1.nordu.net afpd 18236 - - Failed to add service: _afpovertcp._tcp, error=-65563"
>> 18236 1 afpd __sigprocmask14(0x2, 0x7f7fffffdbe0, 0) = 0
>> 18236 1 afpd getrlimit(0x8, 0x7f7fffffdbd0) = 0
>> 18236 1 afpd setrlimit(0x8, 0x7f7fffffdbd0) = 0
>> 18236 1 afpd __sigprocmask14(0x2, 0x7f7fffffdbe0, 0) = 0
>> 18236 1 afpd poll(0x7f7ff7b4c170, 0x1, 0xffffffff) Err#4 EINTR
>> 18236 1 afpd SIGINT SIG_DFL
>>
>> The connect() fails after setsockopt()
>
> And wip/netatalk (version 3.1.0) also suffers the same problem with net/mDNSresponder…
>
> […]
>
> 6768 1 afpd __socket30(0x1, 0x1, 0) = 8
> 6768 1 afpd setsockopt(0x8, 0xffff, 0x800, 0x7f7fffffd85c, 0x4) = 0
> 6768 1 afpd connect(0x8, 0x7f7fffffd7f0, 0x6a) Err#20 ENOTDIR
> 6768 1 afpd __nanosleep50(0x7f7fffffd7c0, 0x7f7fffffd7b0) = 0
> 6768 1 afpd connect(0x8, 0x7f7fffffd7f0, 0x6a) Err#20 ENOTDIR
> 6768 1 afpd __nanosleep50(0x7f7fffffd7c0, 0x7f7fffffd7b0) = 0
> 6768 1 afpd connect(0x8, 0x7f7fffffd7f0, 0x6a) Err#20 ENOTDIR
> 6768 1 afpd __nanosleep50(0x7f7fffffd7c0, 0x7f7fffffd7b0) = 0
> 6768 1 afpd connect(0x8, 0x7f7fffffd7f0, 0x6a) Err#20 ENOTDIR
> 6768 1 afpd close(0x8) = 0
> 6768 1 afpd __gettimeofday50(0x7f7fffffc1f0, 0) = 0
> 6768 1 afpd getpid() = 6768, 15161
> 6768 1 afpd fcntl(0x7, 0x3, 0) = 2
> 6768 1 afpd sendto(0x7, 0x7f7fffffc210, 0x7a, 0, 0, 0) = 122
> "<27>1 2014-03-19T11:18:34.377201+00:00 xsrv1.nordu.net afpd 6768 - - Failed to add service: _afpovertcp._tcp, error=-65563"
> 6768 1 afpd __sigprocmask14(0x2, 0x7f7fffffdbd0, 0) = 0
> 6768 1 afpd getrlimit(0x8, 0x7f7fffffdbc0) = 0
> 6768 1 afpd setrlimit(0x8, 0x7f7fffffdbc0) = 0
> 6768 1 afpd __sigprocmask14(0x2, 0x7f7fffffdbd0, 0) = 0

With the mdnsd included in NetBSD, it (kinda) works…

[…]
26282 1 afpd __socket30(0x1, 0x1, 0) = 8
26282 1 afpd setsockopt(0x8, 0xffff, 0x800, 0x7f7fffffd85c, 0x4) = 0
26282 1 afpd connect(0x8, 0x7f7fffffd7f0, 0x6a) = 0
26282 1 afpd sendto(0x8, 0x7f7ff7b20160, 0x41, 0, 0, 0) = 65
"\0\0\0\^A\0\0\0%\0\0\0\0\0\0\0\^E\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0xsrv1\0_afpovertcp._tcp\0\0\0\^B$\0\0"
26282 1 afpd recvfrom(0x8, 0x7f7fffffd85c, 0x4, 0, 0, 0) = 4
"\0\0\0\0"
26282 1 afpd mmap(0, 0x400000, 0x3, 0x16001002, 0xffffffff, 0, 0) = 0x7f7ff0000000
26282 1 afpd mprotect(0x7f7ff0001000, 0x1000, 0) = 0
26282 1 afpd _lwp_self() = 1
26282 1 afpd __sigprocmask14(0x1, 0x7f7fffffd850, 0x7f7fffffd880) = 0
26282 1 afpd __sigprocmask14(0x3, 0x7f7fffffd880, 0) = 0
26282 1 afpd getcontext(0x7f7ff0000a88) = 0
26282 1 afpd _lwp_create(0x7f7ff0000a88, 0x40, 0x7f7ff0000180) = 0
26282 1 afpd __sigprocmask14(0x2, 0x7f7fffffdbd0, 0) = 0
26282 1 afpd getrlimit(0x8, 0x7f7fffffdbc0) = 0
26282 1 afpd setrlimit(0x8, 0x7f7fffffdbc0) = 0
26282 1 afpd __sigprocmask14(0x2, 0x7f7fffffdbd0, 0) = 0
26282 2 afpd _lwp_ctl(0x1, 0x7f7ff0000208) = 0
26282 2 afpd mmap(0, 0x1000, 0x3, 0x1002, 0xffffffff, 0, 0) = 0x7f7ff7fcc000
26282 2 afpd mmap(0, 0x1000, 0x3, 0x1002, 0xffffffff, 0, 0) = 0x7f7ff7fcb000
26282 2 afpd mmap(0, 0x1000, 0x3, 0x1002, 0xffffffff, 0, 0) = 0x7f7ff7fca000
26282 2 afpd mmap(0, 0x1000, 0x3, 0x1002, 0xffffffff, 0, 0) = 0x7f7ff7fc9000
26282 2 afpd mmap(0, 0x1000, 0x3, 0x1002, 0xffffffff, 0, 0) = 0x7f7ff7fc8000
26282 2 afpd mmap(0, 0x1000, 0x3, 0x1002, 0xffffffff, 0, 0) = 0x7f7ff7fc7000
26282 2 afpd mmap(0, 0x1000, 0x3, 0x1002, 0xffffffff, 0, 0) = 0x7f7ff7fc6000
26282 2 afpd mmap(0, 0x1000, 0x3, 0x1002, 0xffffffff, 0, 0) = 0x7f7ff7fc5000
26282 2 afpd mmap(0, 0x100000, 0x3, 0x14001002, 0xffffffff, 0, 0) = 0x7f7ff7700000
26282 2 afpd poll(0x7f7ff7701078, 0x1, 0xffffffff) = 1
26282 2 afpd recvfrom(0x8, 0x7f7ff03ffd00, 0x1c, 0, 0, 0) = 28
"\0\0\0\^A\0\0\0+\0\0\0\0\0\0\0A\0\0\0\0\0\0\0\0\0\0\0\0"
26282 2 afpd recvfrom(0x8, 0x7f7ff7702050, 0x2b, 0, 0, 0) = 43
"\0\0\0\^B\0\0\0\0\0\0\0\0xsrv1\0_afpovertcp._tcp.\0local.\0"
26282 2 afpd __select50(0x9, 0x7f7ff03ffd30, 0, 0, 0x7f7ff03ffd50) = 0


But you get warnings in /var/log/messages:

Mar 19 12:00:14 xsrv1 mdnsd: 10: WARNING: setsockopt - SO_NOSIGPIPE 22 (Invalid argument)
Fredrik Pettai
2014-03-23 16:09:47 UTC
Permalink
I updated tsarna@ old import of mDNSResponder into NetBSD back in late 2009
(http://mail-index.netbsd.org/source-changes/2009/09/29/msg001341.html), and I put the src files here:
http://www.netbsd.org/~pettai/netbsd-mDNSResponder-258.14.tgz
You should be able to simply just drop it in src, and do build.sh … distribution; build.sh … install=/
I've tested it with pkgsrc/net/netatalk(-2.2.5), and it works as good as the old mDNSResponder.

Since tsarna@ doesn't seem to be around anymore? is someone willing to take look at it so I could go ahead and import it?

/P
Christos Zoulas
2014-03-23 22:59:08 UTC
Permalink
In article <511E87FA-084A-41C4-80DA-***@nordu.net>,
Fredrik Pettai <***@nordu.net> wrote:
>-=-=-=-=-=-
>
>
>I updated tsarna@ old import of mDNSResponder into NetBSD back in late 2009
>(http://mail-index.netbsd.org/source-changes/2009/09/29/msg001341.html),
>and I put the src files here:
>http://www.netbsd.org/~pettai/netbsd-mDNSResponder-258.14.tgz
>You should be able to simply just drop it in src, and do build.sh …
>distribution; build.sh … install=/
>I've tested it with pkgsrc/net/netatalk(-2.2.5), and it works as good as
>the old mDNSResponder.
>
>Since tsarna@ doesn't seem to be around anymore? is someone willing to
>take look at it so I could go ahead and import it?

The current version is like 541 (according to docs/3RDPARTY)...
Why not import something more recent?

christos
Fredrik Pettai
2014-03-24 00:51:01 UTC
Permalink
On Mar 23, 2014, at 17:09 , Fredrik Pettai <***@nordu.net> wrote:
>
> I updated tsarna@ old import of mDNSResponder into NetBSD back in late 2009
> (http://mail-index.netbsd.org/source-changes/2009/09/29/msg001341.html), and I put the src files here:
> http://www.netbsd.org/~pettai/netbsd-mDNSResponder-258.14.tgz

Okay, I've imported it into -current

/P
Fredrik Pettai
2014-03-19 10:03:15 UTC
Permalink
On Mar 18, 2014, at 20:07 , joel jaeggli <***@bogus.com> wrote:
> On 3/18/14, 11:53 AM, Rob Seastrom wrote:
>>
>> Atticus <***@gmail.com> writes:
>>
>>> Use avahi.

That's the backup plan…

>> Isn't that built into netatalk3?
>
> netatalk does the mdns for my afp shares and seems to work.

It seems to link to either mdns or avahi, depending on how you configure it…

(Also, this thread ended up on nanog, not sure why…)
/P
Atticus
2014-03-19 10:48:26 UTC
Permalink
My fault. Sent my last message from phone and hit nanog instead of
netbsd-users. They'll survive
Loading...