Bonjour (mDNS) stopped working after updating OmniOS

Discussion in 'Solaris, Nexenta, OpenIndiana, and napp-it' started by nle, Oct 11, 2014.

  1. nle

    nle Member

    Joined:
    Oct 24, 2012
    Messages:
    179
    Likes Received:
    6
    Hi guys,

    I updated Omnios to omnios-8c08411 and all packages to the newest available, that made Bonjour/mDNS stop working. So the server will no longer broadcast the AFP share.

    The AFP share still works if you connect manually.

    I can not see anything special in the log files. I have tried restarting afp, restarting server and finally reinstalling Napp-IT.

    I can get it working by manually adding a line to the mDNS settings of Napp-IT, but the RackMac model does not work. And previously it worked without needing to add anything.

    If you need any more info, please ask! Thank you!
     
    #1
  2. nle

    nle Member

    Joined:
    Oct 24, 2012
    Messages:
    179
    Likes Received:
    6
    Ok, I figured out how to fix this manually. @gea: Maybe you could update the description in Napp-IT?

    The thing is that the existing line in the documentation in napp-it states that you can set the model in the line that advertises the service (_afpovertcp._tcp), but you can not. You need to add a second line with "_device-info._tcp.".

    So the final command in the napp-it interface looks like this. The second line is the one that sets the model-icon.
    Code:
    dns-sd -R "hostname" _afpovertcp._tcp local. 548 & 
    dns-sd -R "hostname" _device-info._tcp. local 548 model=Xserve &
     
    #2
  3. gea

    gea Well-Known Member

    Joined:
    Dec 31, 2010
    Messages:
    2,205
    Likes Received:
    717
    Thanks
    I added this infos to menu Services - Bonjour
     
    #3
    nle likes this.
  4. nle

    nle Member

    Joined:
    Oct 24, 2012
    Messages:
    179
    Likes Received:
    6
    @gea I'm looking into to this again trying to get TimeMachine to work over SMB, and I think the deviceinfo part is wrong (even though it sort of work).

    I think this is the correct way (ref. this mailing list post):
    Code:
    dns-sd -R "hostname" _device-info._tcp. TXT model=Xserve &
    So the whole thing for the SMB service will be:
    Code:
    dns-sd -R "hostname" _smb._tcp local. 445 &
    dns-sd -R "hostname" _device-info._tcp. TXT model=Xserve &
    EDIT: I edited the order of the two lines. Service first, then model.
     
    #4
    Last edited: Aug 29, 2017
    gea likes this.
  5. gea

    gea Well-Known Member

    Joined:
    Dec 31, 2010
    Messages:
    2,205
    Likes Received:
    717
    Thanks
    I will try this
     
    #5
  6. natkin

    natkin New Member

    Joined:
    Jul 14, 2016
    Messages:
    13
    Likes Received:
    1
    dns-sd(1M) disagrees with your proposal. The documented syntax for registration is:

    dns-sd [-R name type domain port [key=value ...]]
    ...
    Additional attributes of the service may optionally be described by
    key/value pairs, which are stored in the advertised service's DNS TXT
    record​

    in accordance with napp-it's current usage. One deviation is that "local." is not documented as a valid domain ("local" and "." are correct) but it does seem to work on my systems.
     
    #6
  7. nle

    nle Member

    Joined:
    Oct 24, 2012
    Messages:
    179
    Likes Received:
    6
    The mailing list post I linked in the last post seems legit. It works and seems reasonable that you don't really need any port information to set a device model other than the "name" linking them together.

    But I must admit I don't really have a clue about this issue, other than what worked for me or not.

    I dug up this, from one of the sources in this post:

     
    #7
    Last edited: Aug 29, 2017
  8. natkin

    natkin New Member

    Joined:
    Jul 14, 2016
    Messages:
    13
    Likes Received:
    1
    I'm sorry, but dns-sd is quite strict about what command-line arguments it needs. Please see the source, Cross Reference: /illumos-gate/usr/src/cmd/cmd-inet/usr.bin/dns-sd/dns-sd.c.

    The following is an example using normal arguments:

    Code:
    # dns-sd -R "hostname" _device-info._tcp. local 445 model=Xserve
    Registering Service hostname._device-info._tcp..local port 445 TXT model=Xserve
    See how the command infers a TXT record from key=value (i.e., it outputs "TXT" and then regurgitates the fifth and higher arguments after -R).

    Here is the output from your proposed command:

    Code:
    # dns-sd -R "hostname" _device-info._tcp. TXT model=Xserve
    Registering Service hostname._device-info._tcp..TXT port model=Xserve
    See how dns-sd is using "TXT" as the "domain" (the third argument after -R) and trying to interpret "model=Xserve" (the fourth argument after -R) as the port -- and no TXT content is inferred because there are no fifth and higher arguments. dns-sd.c will literally execute atoi("model=Xserve") at Cross Reference: /illumos-gate/usr/src/cmd/cmd-inet/usr.bin/dns-sd/dns-sd.c.
     
    #8
    nle likes this.
  9. nle

    nle Member

    Joined:
    Oct 24, 2012
    Messages:
    179
    Likes Received:
    6
    #9

Share This Page