<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Without more information, this sounds like normal naming conflict resolution as described in:<div class=""><br class=""></div><div class=""><a href="https://tools.ietf.org/html/rfc6762#page-31" class="">https://tools.ietf.org/html/rfc6762#page-31</a></div><div class=""><br class=""></div><div class="">Another host on the link local network is using the same name and so your name is made unique by appending “-2”.</div><div class=""><br class=""></div><div class="">Sometimes, this occurs when a single host has multiple interfaces on the same link local network (like wired and wireless ethernet) or when there are bugs in the conflict resolution implementations.</div><div class=""><br class=""></div><div class="">This is harmless as long as your host is correctly resolving this name with the “-2” appended.</div><div class=""><br class=""></div><div class="">If you have mdns name resolution configured, you can ping (or ping6 if appropriate) "<name>-2.local” to see if it is resolving ok.</div><div class=""><br class=""></div><div class="">By killing the avahi-daemon, it is probably starting to use <name> again until conflict resolution kicked in and causes the name change to append the “-2”.</div><div class=""><br class=""></div><div class="">If this is not accurate, please send more detailed info (logs, packet traces, etc.).</div><div class=""><br class=""></div><div class="">Thanks,</div><div class="">Tom</div><div class=""><br class=""><div><blockquote type="cite" class=""><div class="">On Jun 19, 2017, at 9:51 AM, Denis Kharlamov <<a href="mailto:dkharlamov@aversan.com" class="">dkharlamov@aversan.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div class="WordSection1" style="page: WordSection1; font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">Hello,<o:p class=""></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><o:p class=""> </o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">I’m experiencing a peculiar issue with my avahi where the address of the published service gets a “-2” appended to it.<o:p class=""></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><o:p class=""> </o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">My use of Avahi is essentially this:<span class="Apple-converted-space"> </span><a href="http://www.avahi.org/doxygen/html/client-publish-service_8c-example.html" style="color: rgb(149, 79, 114); text-decoration: underline;" class="">http://www.avahi.org/doxygen/html/client-publish-service_8c-example.html</a><o:p class=""></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">The service always gets published without fail, with the correct service name, and TXT records. However, the address that avahi-discover shows, has a -2 appended to it.<o:p class=""></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">I am not sure why, because in code I am passing a null pointer for the host, as per documentation:<o:p class=""></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; line-height: 16.5pt;" class="">“<span style="font-size: 10.5pt; font-family: Arial, sans-serif;" class="">The host this services is residing on. We recommend to pass NULL here, the daemon will than automatically insert the local host name in that case”<o:p class=""></o:p></span></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><o:p class=""> </o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">The only way I’ve been able to resolve this is by killing the avahi-daemon and restarting it. Does anyone have any idea as to what could be causing this behavior?<o:p class=""></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><o:p class=""> </o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">Thank you,<o:p class=""></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; line-height: 12pt;" class=""><b class=""><span lang="EN-CA" style="font-size: 10pt; font-family: 'Trebuchet MS', sans-serif; color: navy;" class="">Denis Kharlamov</span></b><span lang="EN-CA" style="font-size: 12pt; font-family: Arial, sans-serif;" class=""><o:p class=""></o:p></span></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><o:p class=""> </o:p></div></div><span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">_______________________________________________</span><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">avahi mailing list</span><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><a href="mailto:avahi@lists.freedesktop.org" style="color: rgb(149, 79, 114); text-decoration: underline; font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;" class="">avahi@lists.freedesktop.org</a><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><a href="https://lists.freedesktop.org/mailman/listinfo/avahi" style="color: rgb(149, 79, 114); text-decoration: underline; font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;" class="">https://lists.freedesktop.org/mailman/listinfo/avahi</a></div></blockquote></div><br class=""></div></body></html>