3

I have installed lighttpd on my RPI 3 :

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 :

sudo apt-get install avahi-daemon libavahi-client-dev

I have modified my hostname :

Sudo raspi-config

and then select Network option then select Hostname then I have called it raspberrypik

I have updated my reboot system :

sudo update-rc.d avahi-daemon defaults

Now I try to access my web server from my browser, from either Windows 10 where Itunes is installed and my smartphone (I shared the Hotspot of my cellphone with the RPI) by typing raspberrypik.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 raspberrypik.local, but nothing...

I have tried what is indicated in this post : How to debug avahi-daemon? Hostname not coming through

But when I do

$ ls -l /etc/avahi/services/
total 4
-rw-r--r-- 1 root root 243 Aug  2 05:53 ssh.service

The folder multiple.service and udisks.service are not present, is it normal ?

When I do :

$ avahi-browse -a
-bash: avahi-browse: command not found

When I ping I get :

~ $ ping -c 4 raspberrypik
PING raspberrypik (127.0.1.1) 56(84) bytes of data.
64 bytes from raspberrypik (127.0.1.1): icmp_seq=1 ttl=64 time=0.108 ms
64 bytes from raspberrypik (127.0.1.1): icmp_seq=2 ttl=64 time=0.076 ms
64 bytes from raspberrypik (127.0.1.1): icmp_seq=3 ttl=64 time=0.098 ms
64 bytes from raspberrypik (127.0.1.1): icmp_seq=4 ttl=64 time=0.104 ms

--- raspberrypik ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 3098ms
rtt min/avg/max/mdev = 0.076/0.096/0.108/0.015 ms

Now if I follow the post I get :

~ $ avahi-resolve
-bash: avahi-resolve: command not found

And finally :

~ $ tcpdump -i wlan0 port 5353 or igmp -w /tmp/mdns.pcap
-bash: tcpdump: command not found

Ok I do things wrong, but where ??

Thank you for your help

FrancNovation
  • 131
  • 1
  • 4

1 Answers1

1

Some suggestions:

I have updated my reboot system sudo update-rc.d...

This is an obsolete or at least deprecated methodology on current versions of Raspbian and GNU/Linux generally. Instead:

systemctl list-unit-files "*avahi*"

Should give you the service name, then:

sudo systemctl enable [avahi.service]

Or whatever the correct name is there.

-bash: avahi-browse: command not found

To search packages for a specific executable command:

sudo apt install apt-file
apt-file search "bin/avahi-browse"

I think you will find this is in the avahi-utils package, which is probably not a dependency for any of the other avahi packages you installed.

tcpdump: command not found

Same thing:

apt-file search "bin/tcpdump"
goldilocks
  • 60,325
  • 17
  • 117
  • 234