It looks like even though avahi daemon was running I was missing
libnss-mdns
so just installing it using
sudo apt install libnss-mdns
solved it.
In my case /etc/nsswitch.conf already had similar content, maybe from my previous attempts to solve this
hosts: files mymachines mdns4_minimal [NOTFOUND=return] dns myhostname
Thanks for all the help