Khov
Posts: 23
Joined: Wed Jun 14, 2017 11:16 am
Location: France

AVAHI Daemon doesn't work

Thu Aug 02, 2018 8:38 am

Hi,

I have installed lighttpd on my RPI 3 :

Code: Select all

sudo apt-get install lighttpd
I have managed to access the web server from /home/pi/www
And it works, I can find my Hello World when I entered 192.168.2.31 in my URL browser.

Now I try to access my raspberry pi through mDns. In this way I have installed AVAHI :

Code: Select all

sudo apt-get install avahi-daemon libavahi-client-dev
I have modified my hostname :

Code: Select all

Sudo raspi-config
and then select Network option then select Hostname then I have called it myraspberrypi

I have updated my reboot system :
sudo update-rc.d avahi-daemon defaults

Now I try to access my web server from my browser by typing myraspberrypi.local but nothing happen.

Some tutorials use AVAHI to get acces on the RPI through SSH. I tried to access my RPI via SSH with myraspberrypi.local, but nothing...

Ok I do things wrong, but where ??

Thank you for your help

mattmiller
Posts: 1943
Joined: Thu Feb 05, 2015 11:25 pm

Re: AVAHI Daemon doesn't work

Thu Aug 02, 2018 8:43 am

1. avahi is already pre-installed so need to to install it

2. If your trying to access from a Windows 10 machine, a recent update to Win 10 a few months ago broke mDNS so that is why it doesn't work

Khov
Posts: 23
Joined: Wed Jun 14, 2017 11:16 am
Location: France

Re: AVAHI Daemon doesn't work

Thu Aug 02, 2018 5:21 pm

Thank you for your answer.

I have activated the hotspot of my smartphone (OS Android) to connect both my RPI and my cellphone on the same wlan0. When I enter the IP of my RPI in the browser of my cellphone, I can see the Hello World message.

But when I use myraspberrypi.local in the url of the browser, it doesn't show anything.... I'm not sure the problem comes only from Windows 10

Khov
Posts: 23
Joined: Wed Jun 14, 2017 11:16 am
Location: France

Re: AVAHI Daemon doesn't work

Thu Aug 02, 2018 5:35 pm

Same form my RPI itself, when I type myraspberrypi.local in the browser nothing...

mattmiller
Posts: 1943
Joined: Thu Feb 05, 2015 11:25 pm

Re: AVAHI Daemon doesn't work

Thu Aug 02, 2018 8:10 pm

But when I use myraspberrypi.local in the url of the browser, it doesn't show anything.... I'm not sure the problem comes only from Windows 10
Did you type in http://myraspberrypi.local

(and try it without the .local e.g http://myraspberrypi )

mattmiller
Posts: 1943
Joined: Thu Feb 05, 2015 11:25 pm

Re: AVAHI Daemon doesn't work

Thu Aug 02, 2018 8:19 pm

I'm wondering if MS have fixed mDNS recently as I just setup a web server on my Pi and I could access it using http://27Jun18 (The hostname is the release date of the version of Stretch I'm using)

And I can access my Pi over SMB as well using \\s27Jun18\pi

Glad you posted - you've helped me out :)

Khov
Posts: 23
Joined: Wed Jun 14, 2017 11:16 am
Location: France

Re: AVAHI Daemon doesn't work

Tue Aug 07, 2018 9:46 am

But it doesn't help me :(

mattmiller
Posts: 1943
Joined: Thu Feb 05, 2015 11:25 pm

Re: AVAHI Daemon doesn't work

Tue Aug 07, 2018 9:28 pm

Hasn't helped me either - using hostnames has stopped working again :(

Khov
Posts: 23
Joined: Wed Jun 14, 2017 11:16 am
Location: France

Re: AVAHI Daemon doesn't work

Wed Aug 08, 2018 8:02 am

And nobody seems to get a solution for us !

mattmiller
Posts: 1943
Joined: Thu Feb 05, 2015 11:25 pm

Re: AVAHI Daemon doesn't work

Thu Aug 16, 2018 7:52 pm

I had a Windows update yesterday

At the moment, I can talk to my Pi using hostnames

I'll report back if its still working in a few days time

mattmiller
Posts: 1943
Joined: Thu Feb 05, 2015 11:25 pm

Re: AVAHI Daemon doesn't work

Thu Aug 16, 2018 7:55 pm

Its working with SMB, web pages and VNC

mattmiller
Posts: 1943
Joined: Thu Feb 05, 2015 11:25 pm

Re: AVAHI Daemon doesn't work

Fri Aug 17, 2018 8:38 pm

Just tried to use file manger to look at files on another pi using hostname today - worked fine

So either I am being very lucky over past couple of days or MS have fixed their mDNS issues

mattmiller
Posts: 1943
Joined: Thu Feb 05, 2015 11:25 pm

Re: AVAHI Daemon doesn't work

Thu Aug 23, 2018 9:05 am

Turns out I was being lucky - still not reliable :(

Return to “Networking and servers”

Who is online

Users browsing this forum: No registered users and 6 guests