Without more information, this sounds like normal naming conflict resolution as 
described in:

https://tools.ietf.org/html/rfc6762#page-31 
<https://tools.ietf.org/html/rfc6762#page-31>

Another host on the link local network is using the same name and so your name 
is made unique by appending “-2”.

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.

This is harmless as long as your host is correctly resolving this name with the 
“-2” appended.

If you have mdns name resolution configured, you can ping (or ping6 if 
appropriate) "<name>-2.local” to see if it is resolving ok.

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”.

If this is not accurate, please send more detailed info (logs, packet traces, 
etc.).

Thanks,
Tom

> On Jun 19, 2017, at 9:51 AM, Denis Kharlamov <dkharla...@aversan.com> wrote:
> 
> Hello,
>  
> I’m experiencing a peculiar issue with my avahi where the address of the 
> published service gets a “-2” appended to it.
>  
> My use of Avahi is essentially this: 
> http://www.avahi.org/doxygen/html/client-publish-service_8c-example.html 
> <http://www.avahi.org/doxygen/html/client-publish-service_8c-example.html>
> 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.
> I am not sure why, because in code I am passing a null pointer for the host, 
> as per documentation:
> “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”
>  
> 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?
>  
> Thank you,
> Denis Kharlamov
>  
> _______________________________________________
> avahi mailing list
> avahi@lists.freedesktop.org <mailto:avahi@lists.freedesktop.org>
> https://lists.freedesktop.org/mailman/listinfo/avahi 
> <https://lists.freedesktop.org/mailman/listinfo/avahi>
_______________________________________________
avahi mailing list
avahi@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/avahi

Reply via email to