MQTT fail to connect

I am about to pull my hair out. I am trying to simply setup a sonoff basic and I think I have done everything correctly but obviously not.
My sonoff switch has this in the console.

03:29:38 MQT: Attempting connection...
03:29:38 MQT: Connect failed to 192.168.1.50:1883, rc 5. Retry in 10 sec
03:29:49 MQT: Attempting connection...
03:29:49 MQT: Connect failed to 192.168.1.50:1883, rc 5. Retry in 10 sec
03:30:00 MQT: Attempting connection...
03:30:00 MQT: Connect failed to 192.168.1.50:1883, rc 5. Retry in 10 sec
03:30:11 MQT: Attempting connection...
03:30:11 MQT: Connect failed to 192.168.1.50:1883, rc 5. Retry in 10 sec
03:30:22 MQT: Attempting connection...
03:30:22 MQT: Connect failed to 192.168.1.50:1883, rc 5. Retry in 10 sec
03:30:33 MQT: Attempting connection...
03:30:33 MQT: Connect failed to 192.168.1.50:1883, rc 5. Retry in 10 se

The console of my MQTT server in HomeAssistant is this.

1574735604: New connection from 192.168.1.53 on port 1883.
1574735604: Socket error on client <unknown>, disconnecting.
1574735608: New connection from 192.168.1.51 on port 1883.
1574735608: Socket error on client <unknown>, disconnecting.
1574735615: New connection from 192.168.1.53 on port 1883.
1574735615: Socket error on client <unknown>, disconnecting.
1574735619: New connection from 192.168.1.51 on port 1883.
1574735619: Socket error on client <unknown>, disconnecting.
1574735626: New connection from 192.168.1.53 on port 1883.
1574735626: Socket error on client <unknown>, disconnecting.

I cannot figure out what I have done wrong.
Thanks in advance for the help.

Neither can we with what you have posted.
Broker config
Hass.io addon or?
mqtt config…
etc etc

show us you code our AI is still been written

Im thinking its Password and Problem

DONT use homeassistant as a user name

Thanks guys.
configuration.yaml

# Configure a default setup of Home Assistant (frontend, api, etc)
default_config:

# Uncomment this if you are using SSL/TLS, running in Docker container, etc.
# http:
#   base_url: example.duckdns.org:8123

# Text to speech
tts:
  - platform: google_translate

group: !include groups.yaml
automation: !include automations.yaml
script: !include scripts.yaml
scene: !include scenes.yaml

MQTT config

{
  "logins": [
    {
      "username": "mqtt",
      "password": "mqtt"
    }
  ],
  "anonymous": false,
  "customize": {
    "active": false,
    "folder": "mosquitto"
  },
  "certfile": "fullchain.pem",
  "keyfile": "privkey.pem",
  "require_certificate": false
}

sonoff1 config

I should also add the MQTT log.

1574771150: New connection from 192.168.1.53 on port 1883.
1574771150: Socket error on client <unknown>, disconnecting.
1574771160: New connection from 192.168.1.51 on port 1883.
[ERROR] Auth error with mqtt
1574771161: Socket error on client <unknown>, disconnecting.
1574771161: New connection from 192.168.1.53 on port 1883.
1574771161: Socket error on client <unknown>, disconnecting.
1574771172: New connection from 192.168.1.51 on port 1883.
1574771172: Socket error on client <unknown>, disconnecting.
1574771172: New connection from 192.168.1.53 on port 1883.
1574771172: Socket error on client <unknown>, disconnecting.
1574771183: New connection from 192.168.1.53 on port 1883.
1574771183: Socket error on client <unknown>, disconnecting.
1574771183: New connection from 192.168.1.51 on port 1883.
1574771183: Socket error on client <unknown>, disconnecting.

Sonoff1 config output.

1574771150: New connection from 192.168.1.53 on port 1883.
1574771150: Socket error on client <unknown>, disconnecting.
1574771160: New connection from 192.168.1.51 on port 1883.
[ERROR] Auth error with mqtt
1574771161: Socket error on client <unknown>, disconnecting.
1574771161: New connection from 192.168.1.53 on port 1883.
1574771161: Socket error on client <unknown>, disconnecting.
1574771172: New connection from 192.168.1.51 on port 1883.
1574771172: Socket error on client <unknown>, disconnecting.
1574771172: New connection from 192.168.1.53 on port 1883.
1574771172: Socket error on client <unknown>, disconnecting.
1574771183: New connection from 192.168.1.53 on port 1883.
1574771183: Socket error on client <unknown>, disconnecting.
1574771183: New connection from 192.168.1.51 on port 1883.
1574771183: Socket error on client <unknown>, disconnecting.

have you got username and password setup on both ends

and DONT use homeassistant as user name

I actually don’t know what I did, but it works. I kept starting from scratch, i.e. new SD card, and finally it worked.