Netatalk 2.2: afpd dumps core

tty23

Member


Messages: 51

Hi,

I just installed the most recent netatalk release. Unfortunately apfd, the most important
deamon of the package keeps crashing:

Code:
Assertion failed: (client), function avahi_client_errno, file client.c, line 791.
zsh: abort (core dumped)  afpd -d -T

I disabled the avahi option in the ports config file, but that did not change anything.
Does anyone run netatalk 2.2 with afpd successfully?

Johannes
 
A

Anonymous

Guest


I had exactly the same problem, including that disabling avahi in the config didn't help.

So, I deinstalled netatalk and avahi, and started over with netatalk again, after disabling ZeroConf in the config menu. This did the trick.

Best regards

Rolf
 

giannidoe

Member

Reaction score: 1
Messages: 30

I'm getting exactly the same error; I've done as the previous poster suggested and deinstalled+reinstalled and unselected Zeroconf in the config menu, but it doesn't help.

Code:
# afpd -d           
Assertion failed: (client), function avahi_client_errno, file client.c, line 791.
zsh: abort (core dumped)  afpd -d
 

gkontos

Daemon

Reaction score: 488
Messages: 2,160

I had the same problem which was solved by starting dbus avahi-daemon and avahi-dnsconfd. However, I couldn't get Time Machine to connect so I gave up :\
 
OP
T

tty23

Member


Messages: 51

rolfheinrich said:
So, I deinstalled netatalk and avahi, and started over with netatalk again, after disabling ZeroConf in the config menu. This did the trick.

I did that, too, and now it works :)
 
A

Anonymous

Guest


gkontos said:
I had the same problem which was solved by starting dbus avahi-daemon and avahi-dnsconfd. However, I couldn't get Time Machine to connect so I gave up :\

Time Machine is working for me with Netatalk 2.2 and without ZeroConf (Bonjour) - the TM server got a fixed IP anyway, and I configured the TM clients with that. As said in another post, I needed to deinstall avahi in order to get netatalk 2.2 to work.

Best regards

Rolf
 

hays

New Member


Messages: 2

rolfheinrich said:
Time Machine is working for me with Netatalk 2.2 and without ZeroConf (Bonjour) - the TM server got a fixed IP anyway, and I configured the TM clients with that. As said in another post, I needed to deinstall avahi in order to get netatalk 2.2 to work.

I was also able to get afpd to stop crashing after rebuilding it without bonjour support. I have not deinstalled anything yet. However, despite the fact the server is running, I cannot get my time machine, or an Apple machine to connect to any netatalk shares. I've tried various iterations on options for including a time machine share, and all I can get is a very cryptic message from OS X that there may not be any shares available.

Can you post your configuration options for the various relevant files? I want to see if there is anything that might have popped up in the most recent version that I am not donig correctly.
 
A

Anonymous

Guest


hays said:
Can you post your configuration options for the various relevant files? I want to see if there is anything that might have popped up in the most recent version that I am not donig correctly.

I changed only one configuration file, namely /usr/local/etc/AppleVolumes.default:

Code:
/home/$u options:upriv,usedots
/usr/files Files allow:@users options:upriv,usedots
/usr/filmes Filmes allow:rolf,andreia options:upriv,usedots
/usr/local/www/apache22/data WebServer allow:rolf options:upriv,usedots
/tm Backup allow:@familia options:tm,usedots

See [CMD=""]man AppleVolumes.default[/CMD]

The users and groups have been setup using the pw utility. The access rights to the various real paths have also been adjusted.

Besides that, I figured that the netatalk default configurations pretty much fit to my needs.

Hopefully this helps.

Best regards

Rolf

PS: Of course, /etc/rc.conf got also some entries for netatalk:
Code:
netatalk_enable="YES"
cnid_metad_enable="YES"
afpd_enable="YES"
 

gkontos

Daemon

Reaction score: 488
Messages: 2,160

@rolfheinrich,

Have you left afpd.conf with default values ?

Thanks
 
A

Anonymous

Guest


gkontos said:
@rolfheinrich,

Have you left afpd.conf with default values ?

Thanks

Yes! I left afpd.conf as it was shipped, i.e. it is exactly the same as afpd.conf.dist.

No changes to AppleVolumes.system, atalkd.conf, netatalk.conf, and papd.conf either.

The following two files are auto generated by afpd:

/usr/local/etc/afp_signature.conf
/usr/local/etc/afp_voluuid.conf

I have forgotten to tell, that I ran the following command on all paths that should be served by afpd (except the tm volume):

[CMD=""]/usr/local/bin/dbd -r /path/to/volume[/CMD]

Best regards

Rolf
 

hays

New Member


Messages: 2

I vastly simplified my netatalk configuration per rolf's post and removed avahi and the result was a working system. I had previously had a configuration more similar to directions found on these sites:

http://blogs.freebsdish.org/rpaulo/2008/10/04/apple-time-machine-freebsd-in-14-steps/
http://www.moeding.net/archives/23-Using-FreeBSD-as-Time-Machine-server.html

Specifically, a line like this in apfd.conf:
Code:
  "Elan" -tcp -noddp -uamlist uams_dhx2.so -ipaddr 192.168.1.2

And a line somewhat like this in the AppleVolumes.default file:
Code:
  /nas/tmbackup "TimeMachine" options:tm,usedots volsizelimit:100000 allow:tmbackup

In the end, I think it was avahi that was the culprit.
 

vinkler

Member

Reaction score: 3
Messages: 20

hays said:
I In the end, I think it was avahi that was the culprit.
If our system is not avahi, Mac OS X Lion 10.7 installer does not find a backup TimeMachine. :(
FreeBSD+Netatalk:



Ubuntu+Netatalk+Avahi:



How to solve the problem?

P.S.
I tried /usr/ports/net/howl but without a positive outcome.
 
A

Anonymous

Guest


I don't have Lion yet, so I cannot check whether the following resolves the problem:

0. uninstall howl
1. install Apple's mDNSResponder /usr/ports/net/mDNSResponder
2. create the file /usr/local/etc/rc.d/mdnsadv with the following content:

Code:
#!/bin/sh

# PROVIDE: mdnsadv
# REQUIRE: LOGIN mdnsd
#
# Add the following lines to /etc/rc.conf to enable the mDNSResponder service advertising:
#
#    mdnsadv_enable="YES"

. /etc/rc.subr

name="mdnsadv"
rcvar=${name}_enable

command="/usr/local/bin/mDNSResponderPosix"

load_rc_config $name

: ${mdnsadv_enable="NO"}

command_args="-f /usr/local/etc/mdnsadv.conf >/dev/null 2>&1 &"

run_rc_command "$1"

don't forget to make the file executable by issuing:
[CMD=""]chmod ugo+x /usr/local/etc/rc.d/mdnsadv[/CMD]

3. create the advertising configuration file /usr/local/etc/mdnsadv.conf with the following contents:

Code:
AFP Server
_afpovertcp._tcp
548

4. add to /etc/rc.conf the following lines:

Code:
mdnsd_enable="YES"
mdnsadv_enable="YES"

For checking the configuration enter the following 2 commands:

[CMD=""]service mdnsd start[/CMD]
[CMD=""]service mdnsadv start[/CMD]

If there are Macs in the network, they should now see the AFP Server via Bonjour. Again, I cannot say, whether this is sufficient for Lion to seeing the Time Machine Backup.

If everything is working, then restart the FreeBSD box.

Best regards

Rolf
 

vinkler

Member

Reaction score: 3
Messages: 20

Thank you for your comprehensive answer. :)
Unfortunately does not work.
In Finder:

finder.png


AFP Server is visible, but the Lion installer will not detect it.
Someone has tested this solution yet?
 
A

Anonymous

Guest


After some googling, I found the answer. The TM volume has to be advertised too. For doing this, append to the file /usr/local/etc/mdnsadv.conf the TM machine and volume info. My file looks like this now:

Code:
AFP Server
_afpovertcp._tcp
548
title='File Server'

TM Volume
_adisk._tcp
9
sys=waMA=XX:XX:XX:XX:XX:XX,adVF=0x100
dk0=adVF=0x83,adVN=Backup

You need to replace XX:XX:XX:XX:XX:XX by the Mac address of the NIC on which the service is advertised. You can find it out by issuing the command [CMD=""]ifconfig[/CMD] on your FreeBSD machine.

In addition my TM Volume is simply named Backup, so perhaps you need to change adVN=Backup to adVN=YourTMVolName.

Best regards

Rolf
 
A

Anonymous

Guest


Only one more thing,

It turned out that for Time Machine being fully functional with netatalk, we need mDNS for service advertising, however we do not need the mDNS resolver. In message #15 of this thread I recommended to have both enabled in rc.conf. As a matter of fact, mdnsd_enable can be safely set to "NO".

I am quite satisfied to have a working setup with Apple's original mDNSResponder port, instead of Avahi. The latter one dragged in a hell a lot of dependencies (GNU style), while the original is very slim.

In addition it turned out again that software that doesn't crash the machine is more useful than a buggy one :).

One final question to those having netatalk working. Please, can you verify at your machines the following issue?

netatalk and ntpd

I am still having the problem, and perhaps we can continue discussing it in the other thread.

Many thanks, and best regards

Rolf
 

dakh7

New Member

Reaction score: 1
Messages: 1

rolfheinrich said:
After some googling, I found the answer. The TM volume has to be advertised too. For doing this, append to the file /usr/local/etc/mdnsadv.conf the TM machine and volume info. My file looks like this now:

Code:
AFP Server
_afpovertcp._tcp
548
title='File Server'

TM Volume
_adisk._tcp
9
sys=waMA=XX:XX:XX:XX:XX:XX,adVF=0x100
dk0=adVF=0x83,adVN=Backup

You need to replace XX:XX:XX:XX:XX:XX by the Mac address of the NIC on which the service is advertised. You can find it out by issuing the command [CMD=""]ifconfig[/CMD] on your FreeBSD machine.

In addition my TM Volume is simply named Backup, so perhaps you need to change adVN=Backup to adVN=YourTMVolName.

Best regards

Rolf

Sorry to revive an old thread, this was really useful. I was able to setup mDNSResponder similar to my avahi config, and mDNSResponder was way quicker to resolve names for me. I just wanted to add some more information.

In the code above you can change "AFP Server" and "TM Volume" to the same name, I use my server's hostname. This will make it so that you don't have duplicate entrees in Finder.

also if you want to change the icon shown in finder you can add this:

Code:
AFP Server
_device-info._tcp
548
model=Xserve

where "AFP Server" is the name as described above about duplicate entrees. "Xserve" is the icon shown. there is a info.plist in osx that lists most of the models you can use at /System/Library/CoreServices/CoreTypes.bundle/Contents/Info.plist

Here's a few of them:
Xserve
PowerMac
Macmini
iMac
MacBook
MacPro
AirPort

Finally, regarding "YourTMVolName", It may contain spaces.
 
A

Anonymous

Guest


dakh7 said:
...
In the code above you can change "AFP Server" and "TM Volume" to the same name, I use my server's hostname. This will make it so that you don't have duplicate entrees in Finder.
...

Yeah, having both, "AFP Server" and "TM Volume", displayed by the Finder, bugged me also a little bit, therefore, your findings are highly welcome.

Many thanks

Rolf
 
Top