2

I have two servers in my home network: The first one is an Arm based linux computer running on a custom Debian 3.4.43 kernel The second one is an Arduino with an ethernet shield.

I installed avahi and apache2 on the linux server, installed apache mod-dnssd and configure the following services:

afpd.service:

<?xml version="1.0" standalone='no'?><!--*-nxml-*-->
<!DOCTYPE service-group SYSTEM "avahi-service.dtd">
<service-group>
    <name replace-wildcards="yes">%h</name>
    <service>
        <type>_afpovertcp._tcp</type>
        <port>548</port>
    </service>
    <service>
        <type>_device-info._tcp</type>
        <port>0</port>
        <txt-record>model=MacPro</txt-record>
    </service>
</service-group>

ssh.service:

<service-group>    
  <name replace-wildcards="yes">%h</name>    
  <service>
    <type>_ssh._tcp</type>
    <port>22</port>
  </service>    
</service-group>

and, after the apache mod_dnssd did not what I want, also the http.service:

<?xml version="1.0" standalone='no'?>
<!DOCTYPE service-group SYSTEM "avahi-service.dtd">
<service-group>
  <name>Cubie Remote</name> ## Name of the service
  <service>
    <type>_http._tcp</type>
    <port>80</port>
  </service>
</service-group>

On the Arduino, I used a library to do the zeroconf. I will not provide the details, but it should in principle advertise a service similar to the http.service with the same type and port but a different name on a different server.

So far so good, the following things work (with or without the http service advertised):

  • I find the afp service on my iMac Finder (OS X 10.9.1) and even the correct MacPro icon and I can connect to it
  • I can also ssh with server1.local to the linux server
  • I can open the websites server1.local and server2.local with Firefox and Chrome
  • I can also open those websites under the URLs on my iphone and iPad (Safari)

BUT: on my iMac, in Safari 7.0.1

  • I find the web services advertised in the Bonjour favorites
  • When I click on one of them, the respective URL appears in the address bar (with trailing "dot", but I hear that is correct)
  • The page gets stuck and after some time a message "Safari cannot connect to the server" appears
  • The same happens when I manually type server1.local into the address bar
  • I also find my router in the Bonjour favorites bar, but Safari can only connect to it, when I remove the trailing dot (my guess is, it then uses the 'dns' information of the router rather than the unicast/multicast zeroconf messages)
  • All web sites work, when I type the IP address into the address bar, or when I add the servers manually to the /etc/hosts file on my iMac

It almost looks as if Safari expects a special kind of clean http or some authorization, in order to be able to connect to the advertised service. Any ideas what this may cause? Or am I just blind and there is an obvious checkbox in the Safari and/or security preferences that needs to be ticked?

It seems to be very unique to Safari, though, as names are correctly resolved in Chrome and Firefox (und in the terminal with ping, ssh etc., I can even telnet to the servers on port 80)

0

ok, so here I go answering my own question. I have Sophos anti virus installed because I am paranoid ;) I saw some log entries not really related to the web service on the iMac. To make a long story short, disabling Web Protection in Sophos Anti Virus made the above phenomenon disappear, straight away...

  • I have noticed the same symptoms (running Avahi 0.6.31), but it had nothing to do with virus software. While I haven't got to the bottom of it yet, disabling ipv6 on the adapter fixed it in my case. – David Thornley Jul 4 '16 at 1:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.