Zigbee2MQTT strange behaviour

I use a Rapberry pi3 and my version is
Core2024.3.0 Supervisor2024.02.1 Operating System12.0 Interface utilisateur20240306.0
Z2M configuration
If I use server: mqtt;//core-mosquitto (with or without port number)
Z2M cannot find the broker (…ENOFOUND… message)
If I use
server: mqtt;//localhost The broker rejects the connexion
base_topic: zigbee2mqtt
server: mqtt://my_IPV4 Works
user: mqtt
password: mqtt
Is there something I should know ?

is the semi-colon in your text a typo or is it in the config?

Sorry I wrote it too fast it, these are colons

Alright, so the issue is that it works when you point at the mqtt brokers ip, but not if you use mqtt://localhost?

It’s very difficult to help you when you do not provide more details, logs, configuration and so on.

could that help ?

[17:20:19] INFO: Preparing to start...
[17:20:20] INFO: Socat not enabled
[17:20:28] INFO: Starting Zigbee2MQTT...
Zigbee2MQTT:info  2024-03-08 17:20:48: Logging to console and directory: '/config/zigbee2mqtt/log/2024-03-08.17-20-47' filename: log.txt
Zigbee2MQTT:info  2024-03-08 17:20:48: Starting Zigbee2MQTT version 1.36.0 (commit #unknown)
Zigbee2MQTT:info  2024-03-08 17:20:48: Starting zigbee-herdsman (0.35.1)
Zigbee2MQTT:info  2024-03-08 17:20:55: zigbee-herdsman started (resumed)
Zigbee2MQTT:info  2024-03-08 17:20:55: Coordinator firmware version: '{"meta":{"maintrel":"3 ","majorrel":"6","minorrel":"10","product":8,"revision":" build 297"},"type":"EZSP v8"}'
Zigbee2MQTT:info  2024-03-08 17:20:55: Currently 1 devices are joined:
Zigbee2MQTT:info  2024-03-08 17:20:55: Capteur2i_1 (0xa4c138f7253406ad): PJ-1203A - TuYa Bidirectional energy meter with 80A current clamp (Router)
Zigbee2MQTT:info  2024-03-08 17:20:55: Zigbee: disabling joining new devices.
Zigbee2MQTT:info  2024-03-08 17:20:55: Connecting to MQTT server at mqtt://localhost
Zigbee2MQTT:error 2024-03-08 17:20:55: MQTT error: connect ECONNREFUSED
Zigbee2MQTT:error 2024-03-08 17:20:55: MQTT failed to connect, exiting...
Zigbee2MQTT:info  2024-03-08 17:20:55: Stopping zigbee-herdsman...
Zigbee2MQTT:info  2024-03-08 17:20:56: Stopped zigbee-herdsman

Did you use the correct user and password ? looks like a Node Red ip.
Have you tried mqtt://homeassistant.local:1883 ?

The configuration:

Did you create a user ‘mqtt’ with password ‘mqtt’ in HA ?

I understand it has to be the address seen from the network outside the machine even though the broker and Z2M are into the same machine.