Not able to connect to Mosquitto to the local network

Just a newbie with HA looking for some help to connect to MQTT
I have my server running on a Virtual Machine in my QNAP NAS.
I just tried to discover a Tasmota device… but nothing showup in the TASMOTA integration.
As the communication goes througth MQTT, I decide to test it a bit…
Following the instructions here:

I am able to to publish an listen the messages… so the server is up an runing…
In Settings-People, I created a
User name:1
and its password:2
Just to avoid typing mistakes and only with local access
I re-started the VM to make sure new user is considered

If I try to connect to the broker qith MQTT explorer, I receive the meesage “Disconected from the server”
Using CMD and Mosquitto for windows, for example:

C:\Program Files\mosquitto>mosquitto_pub.exe  -h -t SONOF_POW -m On -p 1883 -P 2 -u 1

receive the following message:

Error: No connection could be made because the target machine actively refused it.)

I don´t think that is a firewall problem of the WM ) I couldn´t find any) as seem that the client is interacting with the broker…
Looking at the logs, I cannot see estrange things:

[s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] executing... 
[21:50:45] INFO: SSL is not enabled
[cont-init.d] exited 0.
[cont-init.d] executing... 
[cont-init.d] exited 0.
[cont-init.d] done.
[services.d] starting services
[services.d] done.
[21:50:48] INFO: Starting NGINX for authentication handling...
[21:50:48] INFO: Starting mosquitto MQTT broker...
1661197849: Warning: Mosquitto should not be run as root/administrator.
[21:50:53] INFO: Successfully send discovery information to Home Assistant.
[21:50:55] INFO: Successfully send service information to the Supervisor.

Try to connect to the mosquitto server using e.g. “MQTT Explorer” and see if the device shows up in MQTT…that is the first step

Thanks Vingerha,
As mentioned in the post, I tried also with MQTT Explorer, and I receive the meesage “Disconected from the server”

Then I guess there is the issue, not? If you cannot connect to MQTT then how can your device?

EDIT: recommendation is to start an MQTT server without user/pwd and make that work end-2-end, afterwrds you can add more security to it…at least you then know that it works.

Thanks for the feedback
Yes, this is the issue that I am trying to fix
How can I configure the mosquitto integration in HA to remove the credentials? I don’t remember to have such option in the config tab

I will check tonight at home.

You can remove it and re-add … but then you will loose any devices…but from I read you have no MQTT devices in HA anyhow

Nope, nothing about that (there is no way to connect anonymously to MQTT in Homeassistant)… it was more dumb problem… I mismatch the IP of the Homeassistant Virtual Machine… :rofl:
Thanks for the time.

The topic is soved

Not true…I have my setup which allows that (container version)
But good that you found it :slight_smile: