#149 mDNSResponder not starting

9.2.0.1
closed
zoon01
zeroconf (1)
1
2014-10-22
2014-01-16
Duckula
No

Since Upgrading to 9.2.0.1 the Bonjour/Zeroconf Service is not working on my NAS.

When I try to start the deamon by hand I get the following output:

/usr/local/bin/mDNSResponderPosix -f /var/etc/mdnsresponder.conf                                                                                                                                                                
mDNSResponderPosix: Port number specified by -p must be in range 1..65535
mDNSResponderPosix: Error reading service file /var/etc/mdnsresponder.conf

I tracked it down to commit 905 of mdnsresponder.in

If I revert this change so "local." is appended to the previous line like it was before the deamon starts without problem.

Discussion

  • Duckula

    Duckula - 2014-01-17

    I just verified this with a freshly downloaded .iso in a VirtualBox. Same behaviour.

    Code also shows that Service type and domain are read from one single line.

            if (!ReadALine(type, sizeof(type), fp, mDNSfalse))
                break;
    
            // see if a domain name is specified
            p = type;
            while (*p && *p != ' ' && *p != '\t') p++;
            if (*p) {
                *p = 0; // NULL terminate the <type>.<protocol> string
                // skip any leading whitespace before domain name
                p++;
                while (*p && (*p == ' ' || *p == '\t')) p++;
                if (*p)
                    dom = p;
            }
            if (gMDNSPlatformPosixVerboseLevel > 1) {
                fprintf(stderr, "Service type: \"%s\"\n", type);
                fprintf(stderr, "Service domain: \"%s\"\n", dom);
            }
    
     
  • Zoce

    Zoce - 2014-01-18

    Same here. After updating from 8.x.x.x to 9.2.0.1 disk share/NAS can't be identified on the network by iOS. The AFP and Zeroconf/Bonjour are enabled.

    Any command line work around suggestions?
    Regards,
    Zoran

     
  • Duckula

    Duckula - 2014-01-18

    Command Line Workaround is

    Edit /var/etc/mdnsresponder.conf

    nano /var/etc/mdnsresponder.conf
    

    Remove every line that contains "local." or move the "local." part behind the line above (keep one space between)
    for example change:

    nas4free
    _device-info._tcp
    local.
    1
    model=Xserve
    

    to

    ~~~~~~~~
    nas4free
    _device-info._tcp local.
    1
    model=Xserve
    ~~~~~~~~~

    Start mdnsresponder manually

    /usr/local/bin/mDNSResponderPosix -b -f /var/etc/mdnsresponder.conf
    

    To test you could also execute it without the -b switch so you will see if there is still a problem.

    this will only persist until you change any service or reboot as this file is then re-generated.
    You could also alter /etc/rc.d/mdnsresponder to make this more persistent, but on an embedded install this would also only last til you reboot.

     
  • Zoce

    Zoce - 2014-01-18

    Thanks!

    Unfortunately it not going to help me long run.
    My NAS is monitorless and it is actually off when not in use...

    Any tip how to get a remote console with the NAS?

    PS. Maybe next update will fix this.

     
  • Duckula

    Duckula - 2014-01-18

    You can enable SSH Access in the Services. User is root, Password is your admin Password.

    A way to persist this would be to make a copy of the working file to your persistent file storage and execute the binary with this config file on startup.

    Startup Commands can be placed under System>Advanced>Command scripts as "PostInit"

    /usr/local/bin/mDNSResponderPosix -b -f /mnt/etc/mdnsresponder.conf
    
     
  • Zoce

    Zoce - 2014-01-18

    Thanks Duckula!

    Definitely works, but can you please describe bit more the persistent solution?

    Thanks in advance

     
  • Zoce

    Zoce - 2014-01-18

    I've followed your instructions and after reboot, it worked like a charm :)

    Thanks again Duckula, you made my day!

     
  • zoon01

    zoon01 - 2014-01-19

    Will be fixed for next release!
    We went back to it's older version.

     
  • zoon01

    zoon01 - 2014-01-19
    • status: open --> closed
    • assigned_to: zoon01
     

Log in to post a comment.