<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=""><div class="">Changing:</div><blockquote type="cite" class=""><div class="" style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><div class="" style="margin: 0in 0in 0.0001pt;"><div class="" style="margin: 0in 0in 0.0001pt;"><div class="" style="margin: 0in 0in 0.0001pt;"><font color="#000000" class="">‘</font></div></div></div></div></blockquote><br class=""><blockquote type="cite" class=""><div class="" style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><div class="" style="margin: 0in 0in 0.0001pt;"><div class="" style="margin: 0in 0in 0.0001pt;"><div class="" style="margin: 0in 0in 0.0001pt;"><span class="" style="font-family: Calibri, sans-serif; font-size: 11pt;">if (!g->chosen_name || (g->replace_wildcards && strstr(g->name, "%h"))) {</span></div></div></div></div></blockquote><div class=""><br class=""></div>to<div class=""><br class=""></div><div class=""><blockquote type="cite" class=""><div class="" style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><div class="" style="margin: 0in 0in 0.0001pt;"><div class="" style="margin: 0in 0in 0.0001pt;"><div class="" style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;"><span class="">if (!g->chosen_name <b class="">&&</b> (g->replace_wildcards && strstr(g->name, "%h"))) {</span></div></div></div></div></blockquote><div class=""><br class=""></div>seems to fix the issue.</div><div class=""><br class=""></div><div class=""><br class=""><div><blockquote type="cite" class=""><div class="">On Jan 31, 2018, at 9:10 AM, Timothy Potter <<a href="mailto:tpotter01@me.com" class="">tpotter01@me.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><meta http-equiv="Content-Type" content="text/html charset=utf-8" class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">I think I have found the issue.<div class=""><br class=""></div><div class="">My service file is setup like this:</div><div class=""><br class=""></div><div class=""><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><!-- See avahi.service(5) for more information about this configuration file --><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=""><service-group><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=""> <name replace-wildcards="yes">%h</name><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=""> <service protocol="ipv6"><o:p class=""></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""> <type>_http._tcp</type><o:p class=""></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""> <port>80</port><o:p class=""></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""> </service><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=""></service-group></div></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><br class=""></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><br class=""></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">In the file </div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><br class=""></div><div style="margin: 0in 0in 0.0001pt;" class=""><div style="font-family: Calibri, sans-serif; font-size: 11pt; margin: 0in 0in 0.0001pt;" class="">avahi-daemon/static-services.c<o:p class=""></o:p></div><div style="font-family: Calibri, sans-serif; font-size: 11pt; margin: 0in 0in 0.0001pt;" class=""><o:p class=""> </o:p></div><div style="font-family: Calibri, sans-serif; font-size: 11pt; margin: 0in 0in 0.0001pt;" class="">function: entry_group_callback, if a conflict is detected a new name is created and stored in g->chosen_name and an attempt is made to add the service again with this new name.<o:p class=""></o:p></div><div style="font-family: Calibri, sans-serif; font-size: 11pt; margin: 0in 0in 0.0001pt;" class=""><o:p class=""> </o:p></div><div style="font-family: Calibri, sans-serif; font-size: 11pt; margin: 0in 0in 0.0001pt;" class="">case AVAHI_ENTRY_GROUP_COLLISION: {<o:p class=""></o:p></div><div style="font-family: Calibri, sans-serif; font-size: 11pt; margin: 0in 0in 0.0001pt;" class=""> char *n;<o:p class=""></o:p></div><div style="font-family: Calibri, sans-serif; font-size: 11pt; margin: 0in 0in 0.0001pt;" class=""><o:p class=""> </o:p></div><div style="font-family: Calibri, sans-serif; font-size: 11pt; margin: 0in 0in 0.0001pt;" class=""> remove_static_service_group_from_server(g);<o:p class=""></o:p></div><div style="font-family: Calibri, sans-serif; font-size: 11pt; margin: 0in 0in 0.0001pt;" class=""><o:p class=""> </o:p></div><div style="font-family: Calibri, sans-serif; font-size: 11pt; margin: 0in 0in 0.0001pt;" class=""> n = avahi_alternative_service_name(g->chosen_name);<o:p class=""></o:p></div><div style="font-family: Calibri, sans-serif; font-size: 11pt; margin: 0in 0in 0.0001pt;" class=""> avahi_free(g->chosen_name);<o:p class=""></o:p></div><div style="font-family: Calibri, sans-serif; font-size: 11pt; margin: 0in 0in 0.0001pt;" class=""> g->chosen_name = n;<o:p class=""></o:p></div><div style="font-family: Calibri, sans-serif; font-size: 11pt; margin: 0in 0in 0.0001pt;" class=""><o:p class=""> </o:p></div><div style="font-family: Calibri, sans-serif; font-size: 11pt; margin: 0in 0in 0.0001pt;" class=""> avahi_log_notice("Service name conflict for \"%s\" (%s), retrying with \"%s\".", g->name, g->filename, g->chosen_name);<o:p class=""></o:p></div><div style="font-family: Calibri, sans-serif; font-size: 11pt; margin: 0in 0in 0.0001pt;" class=""><o:p class=""> </o:p></div><div style="font-family: Calibri, sans-serif; font-size: 11pt; margin: 0in 0in 0.0001pt;" class=""> add_static_service_group_to_server(g);<o:p class=""></o:p></div><div style="font-family: Calibri, sans-serif; font-size: 11pt; margin: 0in 0in 0.0001pt;" class=""> break;<o:p class=""></o:p></div><div style="font-family: Calibri, sans-serif; font-size: 11pt; margin: 0in 0in 0.0001pt;" class=""> }<o:p class=""></o:p></div><div style="font-family: Calibri, sans-serif; font-size: 11pt; margin: 0in 0in 0.0001pt;" class=""><o:p class=""> </o:p></div><div style="font-family: Calibri, sans-serif; font-size: 11pt; margin: 0in 0in 0.0001pt;" class=""><o:p class=""><br class=""></o:p></div><div style="margin: 0in 0in 0.0001pt;" class=""><o:p style="font-family: Calibri, sans-serif; font-size: 11pt;" class="">The problem is in </o:p><font face="Calibri, sans-serif" class=""><span style="font-size: 11pt;" class="">add_static_service_group_to_server. There is an if to see if g->chosen_name = NULL or if the replace-wildcards is set to yes. If either of </span><span style="font-size: 14.666666984558105px;" class="">those are true ( in my chase it is ) it then frees the g->chosen_name and rebuilds it with the same name that was in conflict to begin with. It never tries to add the service with the new service name so I continually receive the “Service name conflict”.</span></font></div><div style="margin: 0in 0in 0.0001pt;" class=""><font face="Calibri, sans-serif" class=""><span style="font-size: 14.666666984558105px;" class=""><br class=""></span></font></div><div style="margin: 0in 0in 0.0001pt;" class=""><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">static void add_static_service_group_to_server(StaticServiceGroup *g) {<o:p class=""></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""> StaticService *s;<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=""> assert(g);<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=""> if (g->entry_group && !avahi_s_entry_group_is_empty(g->entry_group))<o:p class=""></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""> /* This service group is already registered in the server */<o:p class=""></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""> return;<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=""> <b class="">if (!g->chosen_name || (g->replace_wildcards && strstr(g->name, "%h"))) {</b><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=""> <b class=""> avahi_free(g->chosen_name);</b><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=""> if (g->replace_wildcards) {<o:p class=""></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""> char label[AVAHI_LABEL_MAX];<o:p class=""></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""> const char *p;<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=""> p = avahi_server_get_host_name(avahi_server);<o:p class=""></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""> avahi_unescape_label(&p, label, sizeof(label));<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=""> g->chosen_name = replacestr(g->name, "%h", label);<o:p class=""></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""> } else<o:p class=""></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""> g->chosen_name = avahi_strdup(g->name);<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=""> }</div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><br class=""></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><br class=""></div></div></div><div class=""><br class=""><div class=""><blockquote type="cite" class=""><div class="">On Jan 26, 2018, at 9:50 AM, Timothy Potter <<a href="mailto:tpotter01@me.com" class="">tpotter01@me.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><meta http-equiv="Content-Type" content="text/html charset=us-ascii" class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><p class="" style="color: rgb(36, 39, 41); font-family: inherit; font-size: inherit; font-style: inherit; font-variant-caps: inherit; orphans: 2; widows: 2; background-color: rgb(255, 255, 255); margin: 0px 0px 1em; padding: 0px; border: 0px; font-variant-ligatures: inherit; font-variant-position: inherit; font-variant-numeric: inherit; font-variant-alternates: inherit; font-variant-east-asian: inherit; font-stretch: inherit; line-height: inherit; vertical-align: baseline; clear: both;">I have several Linux machines all running kernel version 3.12 and avahi-daemon 0.6.31. Each machine has a unique host name and they are all advertising an ssh, sftp, and http. When I start all the machines up everything runs just fine. If one of the machines gets re-booted, when the avahi-daemon on that machine starts up again, it reports service conflicts every couple of seconds:</p><p class="" style="color: rgb(36, 39, 41); font-family: inherit; font-size: inherit; font-style: inherit; font-variant-caps: inherit; orphans: 2; widows: 2; background-color: rgb(255, 255, 255); margin: 0px 0px 1em; padding: 0px; border: 0px; font-variant-ligatures: inherit; font-variant-position: inherit; font-variant-numeric: inherit; font-variant-alternates: inherit; font-variant-east-asian: inherit; font-stretch: inherit; line-height: inherit; vertical-align: baseline; clear: both;"><code class="" style="margin: 0px; padding: 1px 5px; border: 0px; font-style: inherit; font-variant-ligatures: inherit; font-variant-position: inherit; font-variant-caps: inherit; font-variant-numeric: inherit; font-variant-alternates: inherit; font-variant-east-asian: inherit; font-stretch: inherit; font-size: 13px; line-height: inherit; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, sans-serif; vertical-align: baseline; background-color: rgb(239, 240, 241); white-space: pre-wrap;">Jun 1 16:20:12 Node00b01973d6c8 daemon.notice avahi-daemon[1624]: Service name conflict for "%h" (/services/ssh.service), retrying with "Node00b01973d6c8 #2".
Jun 1 16:20:12 Node00b01973d6c8 daemon.notice avahi-daemon[1624]: Service name conflict for "%h" (/services/http.service), retrying with "Node00b01973d6c8 #2".
Jun 1 16:20:32 Node00b01973d6c8 daemon.notice avahi-daemon[1624]: Service name conflict for "%h" (/services/sftp-ssh.service), retrying with "Node00b01973d6c8 #2".
</code></p><p class="" style="color: rgb(36, 39, 41); font-family: inherit; font-size: inherit; font-style: inherit; font-variant-caps: inherit; orphans: 2; widows: 2; background-color: rgb(255, 255, 255); margin: 0px 0px 1em; padding: 0px; border: 0px; font-variant-ligatures: inherit; font-variant-position: inherit; font-variant-numeric: inherit; font-variant-alternates: inherit; font-variant-east-asian: inherit; font-stretch: inherit; line-height: inherit; vertical-align: baseline; clear: both;">These message print every few seconds. The only way I have been able to make them go away is to reboot all the machines running the avahi-daemon. Any suggestions on how to fix this?</p></div></div></blockquote></div><br class=""></div></div></div></blockquote></div><br class=""></div></body></html>