# Start node-red failed

**URL:** <https://discourse.nodered.org/t/start-node-red-failed/85725>\
**Category:** General\
**Created:** [21 February 2024 10:31 UTC](https://discourse.nodered.org/t/start-node-red-failed/85725 "2024-02-21T10:31:46Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![tomas.garcia](https://avatars.discourse-cdn.com/v4/letter/t/73ab20/32.png) [@tomas.garcia](https://discourse.nodered.org/u/tomas.garcia)\
**Post date:** [21 February 2024 10:31 UTC](https://discourse.nodered.org/t/start-node-red-failed/85725/1 "2024-02-21T10:31:46Z")

</div>

When I start node-red, it gives me the following error. What could be the reason? Thank you

```auto
`Publisher: Inside error function, msg: Error: Connection refused: Bad username or password`
    at MqttClient._handleConnack (C:\Users\super\.node-red\node_modules\mqtt\lib\client.js:735:9)
    at MqttClient._handlePacket (C:\Users\super\.node-red\node_modules\mqtt\lib\client.js:296:12)
    at process (C:\Users\super\.node-red\node_modules\mqtt\lib\client.js:238:12)
    at writable._write (C:\Users\super\.node-red\node_modules\mqtt\lib\client.js:248:5)
    at doWrite (C:\Users\super\.node-red\node_modules\readable-stream\lib\_stream_writable.js:237:10)
    at writeOrBuffer (C:\Users\super\.node-red\node_modules\readable-stream\lib\_stream_writable.js:227:5)
    at Writable.write (C:\Users\super\.node-red\node_modules\readable-stream\lib\_stream_writable.js:194:11)
    at TLSSocket.ondata (node:internal/streams/readable:766:22)
    at TLSSocket.emit (node:events:513:28)
   at addChunk (node:internal/streams/readable:324:12)
```

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [21 February 2024 10:50 UTC](https://discourse.nodered.org/t/start-node-red-failed/85725/2 "2024-02-21T10:50:02Z")

</div>

> [@tomas.garcia](#):
>
> `Publisher: Inside error function`

Are you using the built in MQTT nodes or are you doing MQTT via a function node?

> [@tomas.garcia](#):
>
> What could be the reason

I'd start here ↓

> [@tomas.garcia](#):
>
> `Error: Connection refused: Bad username or password`

* * *

Could you also provide node and node-red versions?

```auto
node -v

```

You will see the node-red version when starting Node-RED (or you can run `node-red --help`)

* * *

Lastly, you may be able to start Node-RED and fix up any changes using `node-red --safe`

---

<div class="post-metadata">

**Author:** ![tomas.garcia](https://avatars.discourse-cdn.com/v4/letter/t/73ab20/32.png) [@tomas.garcia](https://discourse.nodered.org/u/tomas.garcia)\
**Post date:** [21 February 2024 12:19 UTC](https://discourse.nodered.org/t/start-node-red-failed/85725/3 "2024-02-21T12:19:40Z")

</div>

version v18.16.0

---

<div class="post-metadata">

**Author:** ![tomas.garcia](https://avatars.discourse-cdn.com/v4/letter/t/73ab20/32.png) [@tomas.garcia](https://discourse.nodered.org/u/tomas.garcia)\
**Post date:** [21 February 2024 12:20 UTC](https://discourse.nodered.org/t/start-node-red-failed/85725/4 "2024-02-21T12:20:28Z")

</div>

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/6/1/618bd1436cfef9d7f75a44e9f88ebe86b4b0e664.png)

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [21 February 2024 13:49 UTC](https://discourse.nodered.org/t/start-node-red-failed/85725/5 "2024-02-21T13:49:08Z")

</div>

Hi, an image of the error you already posted tells me nothing I'm afraid.

It is always advised to post text not images (since they cannot easily be searched and found by other users)

  

> [@Steve-Mcl](#):
>
> You will see the node-red version when starting Node-RED (or you can run `node-red --help`)

Can you try this ↑

  

> [@Steve-Mcl](#):
>
> > [@tomas.garcia](#):
> >
> > `Publisher: Inside error function`
> 
> Are you using the built in MQTT nodes or are you doing MQTT via a function node?

Can you answer this ↑

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [21 May 2024 13:49 UTC](https://discourse.nodered.org/t/start-node-red-failed/85725/6 "2024-05-21T13:49:30Z")

</div>

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.
