Avahi vs MDNSResponderPosix

Questions about using NAS on Mac OS.

Re: Avahi vs MDNSResponderPosix

Postby robzr » Sat Jul 16, 2011 1:05 am

Hi Cristian, I "hijacked" the init files so it would maintain the configuration generated by the web interface. The init script changes 1) prevent mDNSResponderPosix from running, 2) since mDNSResponderPosix does not clean up after itself, Avahi will temporarily broadcast identical services, then remove them to clean them up and 3) parses the QNap built mDNSResponderPosix config files and converts them into Avahi config files, so if you enable/disable services via the web interface, only those services will be broadcast, without having to manually go in via the shell and modify the config files.

Also, the Avahi init files run a second instance of afpd and a separate Avahi service-group, which broadcasts the Time Machine service. The reason I did this is because QNap uses a separate UID/user for the Time Machine share. Due to the nature of AFP/mDNS, you can only mount one service under one user at a time. So if you were mounting a non-Time Machine share, your Time Machine backups would fail as it could not mount the same service with two different users simultaneously. To get around that, I run a second instance of afpd on a different port, just for the Time Machine share. This is also why it shows up in finder separately.

regards

Rob

Edit - the extra Time Machine process is afpd, not avahi, it's been a while ;) Fixed in the paragraphs above.
robzr
Starting out
 
Posts: 30
Joined: Sat Jul 17, 2010 7:50 am
NAS Model: TS-401T

Re: Avahi vs MDNSResponderPosix

Postby bmorgen » Sat Feb 25, 2012 11:39 pm

Does this install have any affect on USB Printer sharing and allowing the printer to be seen by Bonjour? I'm assuming yes but not knowing the intricacies of the QNAP implementation yet I can't see how it is being affected.
bmorgen
Starting out
 
Posts: 12
Joined: Thu Feb 09, 2012 4:49 am
NAS Model: TS-559 Pro II

Re: Avahi vs MDNSResponderPosix

Postby robzr » Sun Feb 26, 2012 4:22 am

bmorgen wrote:Does this install have any affect on USB Printer sharing and allowing the printer to be seen by Bonjour? I'm assuming yes but not knowing the intricacies of the QNAP implementation yet I can't see how it is being affected.


I haven't tried that, but it should work just fine with that. It parses the mDNSResponderPosix config file and converts it to Avahi format, so anything that is in there for mDNSResponderPosix should work for Avahi.

Rob
robzr
Starting out
 
Posts: 30
Joined: Sat Jul 17, 2010 7:50 am
NAS Model: TS-401T

Re: Avahi vs MDNSResponderPosix

Postby bmorgen » Tue Feb 28, 2012 10:30 pm

robzr wrote:I haven't tried that, but it should work just fine with that. It parses the mDNSResponderPosix config file and converts it to Avahi format, so anything that is in there for mDNSResponderPosix should work for Avahi.
Rob


Unfortunately it doesn't properly parse it out. Here are the lines from avahi_install.sh when I had a usb printer configured.
Code: Select all
Removing stale service Test...
/tmp/config/autorun.sh: line 25: [: too many arguments
Removing stale service note=Brother HL-2170W series...


Need to play around more with this but I don't have time at the moment. When I do though I'll report back.
bmorgen
Starting out
 
Posts: 12
Joined: Thu Feb 09, 2012 4:49 am
NAS Model: TS-559 Pro II

Re: Avahi vs MDNSResponderPosix

Postby scrfix » Sun Jul 01, 2012 10:18 am

Rob,

How do I undo the following command?

echo root:x:0:admin >> /etc/group
ipkg configure

I was working on something similar to this and decided to try your command and now I cannot use ipkg my locate functionality. I have tried to uninstall and reinstall the optware packaging and nothing is helping. I need help. I am almost sure that it is the above command that did this. Please help.

robzr wrote:
MathieuMa wrote:BTW, did you changed the uninstall script as well ? (from what I remember that's the 2 places where MD0 was hardcoded)


Hey Mathieu - I did change the uninstall script, and I tried to get all fancy with sed and screwed up the build script then neglected to test it :)

usmcguy - OK it was a problem with my build script, and it was not embedding the tar file properly; it is fixed now. Reboot your NAS, and try the install again. There should be no conflict with MySQL; although judging by the error, the mysql package isn't installing properly (should not affect avahi at all). But to fix MySQL, looking at this:

Support MySQL by buying support/licenses at http://shop.mysql.com
chown: unknown group name: root
Starting MySQL. ERROR! Manager of pid-file quit without updating file.
postinst script returned status 1
ERROR: mysql5.postinst returned 1
Nothing to be done

It looks like it is changing the group of a file to "root", and failing because QNap has replaced root in /etc/passwd and /etc/group with administrator. I think it would be safe to run:

echo root:x:0:admin >> /etc/group
ipkg configure

Which is kind of a hack since there will be two groups with the same GID, I don't think it will hurt anything (and it's easy to fix). The more proper way to fix it would be to modify the mysql install script, which you might be able to do if you can track down the local copy of it (it's probably embedded in the package file and will be a pain to fix). Anyways, try the above commands and see if that takes care of the MySQL installation error. Then try re-running the avahi install script.

regards

Rob
Wayne Leiser
http://www.resourcesgoldtechnology.com/
TS-809U-RP
16TB (8 2TB RAID QUALITY WD Hard Drives)
Raid 6
4GB Memory
Gigabit Internal Network running on CAT6 Shielded Cable with End to End protection
scrfix
Starting out
 
Posts: 45
Joined: Mon May 03, 2010 11:00 pm
NAS Model: TS-809 Pro

Re: Avahi vs MDNSResponderPosix

Postby schumaku » Sun Jul 01, 2012 8:41 pm

scrfix wrote:How do I undo the following command?

echo root:x:0:admin >> /etc/group


This has just added a new group, gid:0, and has added admin as a uaser. Edit the /etc/groups (resp. /etc/config/group ) file, and remove the line added.
User avatar
schumaku
Guru
 
Posts: 22317
Joined: Mon Jan 21, 2008 4:41 pm
Location: Kloten (Zurich), Switzerland -- Skype: schumaku
NAS Model: TS-x79 Pro

Re: Avahi vs MDNSResponderPosix

Postby redmercury2006 » Thu Jul 05, 2012 5:38 pm

hey there, is the install script down?

anyway just wanted to say thanks, it's a really improvement to my nas... please get the script back online ;D THANKS!

omg... my 1st post... hello world ;)
redmercury2006
New here
 
Posts: 3
Joined: Wed May 11, 2011 10:14 pm
NAS Model: TS-459U

Re: Avahi vs MDNSResponderPosix

Postby schumaku » Thu Jul 05, 2012 5:55 pm

Hello and welcome to the QNAP NAS Community Forum!

redmercury2006 wrote:hey there, is the install script down? ...anyway just wanted to say thanks, it's a really improvement to my nas... please get the script back online ;D THANKS!


I'ts obsolete - well, almost - as QNAP v3.7.x firmware comes with Avahi by deault already.
User avatar
schumaku
Guru
 
Posts: 22317
Joined: Mon Jan 21, 2008 4:41 pm
Location: Kloten (Zurich), Switzerland -- Skype: schumaku
NAS Model: TS-x79 Pro

Re: Avahi vs MDNSResponderPosix

Postby redmercury2006 » Mon Jul 23, 2012 5:23 pm

thanks for the reply... will check for an upgrade and have a look at avahi in the new firmware-release
redmercury2006
New here
 
Posts: 3
Joined: Wed May 11, 2011 10:14 pm
NAS Model: TS-459U

Previous

Return to Mac OS

Who is online

Users browsing this forum: No registered users and 0 guests