# Unable to resolve host \<Raspberry Pi Host name\>: Name or service not known

**URL:** <https://discourse.nodered.org/t/unable-to-resolve-host-raspberry-pi-host-name-name-or-service-not-known/19900>\
**Category:** General\
**Created:** [4 January 2020 10:19 UTC](https://discourse.nodered.org/t/unable-to-resolve-host-raspberry-pi-host-name-name-or-service-not-known/19900 "2020-01-04T10:19:39Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![AungKL](https://avatars.discourse-cdn.com/v4/letter/a/ba9def/32.png) [@AungKL](https://discourse.nodered.org/u/AungKL)\
**Post date:** [4 January 2020 10:19 UTC](https://discourse.nodered.org/t/unable-to-resolve-host-raspberry-pi-host-name-name-or-service-not-known/19900/1 "2020-01-04T10:19:39Z")

</div>

Hello,  
I have Raspberry Pi (model B plus v1.2) and configure as headless system with VNC. When I start the node red, I found this message as follow:

> sudo: unable to resolve host RPiBPlusv12: Name or service not known

> 

Please refer to attached photo for more detail.

 ![2020-01-04 18_11_11-Pi_127 (RPiBPlusv12) - VNC Viewer](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/d/d60eb61d5feeafd8a0fae368105660ec9812a465.jpeg)

I'm not sure about the message is an error or warning. But I can use Node Red as usual.

And the message is coming again if I use "sudo systemctl enable nodered.service" as follow:

 ![2020-01-04 18_24_13-Pi_127 (RPiBPlusv12) - VNC Viewer](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/9/96aa7d068fc60cc08d7077bf5bbe3ae9ceeb579a.jpeg)

Is it problem with that message?

Regards,  
Aung

---

<div class="post-metadata">

**Author:** ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)\
**Post date:** [4 January 2020 10:24 UTC](https://discourse.nodered.org/t/unable-to-resolve-host-raspberry-pi-host-name-name-or-service-not-known/19900/2 "2020-01-04T10:24:12Z")

</div>

If that is your hostname check that it exists in the `/etc/hosts` file. Usually it will have a line

```
127.0.1.1 RPiBPlusv12
```

---

<div class="post-metadata">

**Author:** ![AungKL](https://avatars.discourse-cdn.com/v4/letter/a/ba9def/32.png) [@AungKL](https://discourse.nodered.org/u/AungKL)\
**Post date:** [4 January 2020 10:34 UTC](https://discourse.nodered.org/t/unable-to-resolve-host-raspberry-pi-host-name-name-or-service-not-known/19900/3 "2020-01-04T10:34:23Z")

</div>

> [@dceejay](#):
>
> 127.0.1.1 RPiBPlusv12

Thank for fast response.  
Yes; it has the line

![2020-01-04 18_32_55-Pi_127 (RPiBPlusv12) - VNC Viewer](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/5/5fcde71065e4a04149df0db9dadd2f769d859c4c.jpeg)

---

<div class="post-metadata">

**Author:** ![AungKL](https://avatars.discourse-cdn.com/v4/letter/a/ba9def/32.png) [@AungKL](https://discourse.nodered.org/u/AungKL)\
**Post date:** [4 January 2020 10:38 UTC](https://discourse.nodered.org/t/unable-to-resolve-host-raspberry-pi-host-name-name-or-service-not-known/19900/4 "2020-01-04T10:38:45Z")

</div>

Sorry, my mistake to check the spelling, Now it's OK now.  
I've renamed twice, it's not follow the last host name, I think

thanks,  
Aung

---

<div class="post-metadata">

**Author:** ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)\
**Post date:** [4 January 2020 11:17 UTC](https://discourse.nodered.org/t/unable-to-resolve-host-raspberry-pi-host-name-name-or-service-not-known/19900/5 "2020-01-04T11:17:14Z")

</div>

if in doubt, reboot and check it.

---

<div class="post-metadata">

**Author:** ![cymplecy](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/cymplecy/32/2773_2.png) [@cymplecy](https://discourse.nodered.org/u/cymplecy)\
**Post date:** [4 January 2020 12:38 UTC](https://discourse.nodered.org/t/unable-to-resolve-host-raspberry-pi-host-name-name-or-service-not-known/19900/6 "2020-01-04T12:38:55Z")

</div>

I recommend using `sudo raspi-config` to rename the pi as it needs changing in a few places and it makes sure that this is done consistently

---

<div class="post-metadata">

**Author:** ![ScheepersJohan](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/scheepersjohan/32/39556_2.png) [@ScheepersJohan](https://discourse.nodered.org/u/ScheepersJohan)\
**Post date:** [21 August 2020 21:27 UTC](https://discourse.nodered.org/t/unable-to-resolve-host-raspberry-pi-host-name-name-or-service-not-known/19900/7 "2020-08-21T21:27:41Z")

</div>

> [@cymplecy](#):
>
> sudo raspi-config

Need to also "RFCs mandate that a hostname's labels may contain only the ASCII letters 'a' through 'z' (case-insensitive), the digits '0' through '9', and the hyphen.Hostname labels cannot begin or end with a hyphen."

So \_ (underscores) are not allowed.

---

<div class="post-metadata">

**Author:** ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)\
**Post date:** [22 August 2020 04:20 UTC](https://discourse.nodered.org/t/unable-to-resolve-host-raspberry-pi-host-name-name-or-service-not-known/19900/8 "2020-08-22T04:20:31Z")

</div>

Closed on 22 August 2020 04:20 UTC


