Hostname Error

Discussion in 'Hardware' started by JBJ, Jan 21, 2022.

  1. JBJ

    JBJ New Member

    The SD card on my Raspberry Pi just died, so I downloaded the image and started again. All is working fine.
    With my previous installation I was able to change the host name from adsbexchange to ADSB-Pi using sudo rasps-config. However when I try this with the new setup I get.

    Unable to resolve host ADSB-Pi: Name or server not known

    Obviously no problem as I can leave it as adsbexchange but just wondering why? Network both wired and wireless are working ok.
     
  2. wiedehopf

    wiedehopf Administrator Staff Member

    Do a reboot of the pi and your PC, it's likely your network hasn't registered the change yet.
     
  3. JBJ

    JBJ New Member

    Thanks for your quick reply. That was the first thing I did. After a bit of further digging I found a mismatch between the hostname file and the hosts file. There were several entries on the first line of the hosts file - I removed them all and added localhost. The last line of the hosts file still had raspberrypi so I removed this and added ADSB-Pi and rebooted.

    All is now well and the error has gone.
     
    Last edited: Jan 21, 2022