Installation and configuration procedure described in tutorial for Ubuntu 18.04 is suitable for Ubuntu 20.04 as well. However, keep in mind that Mosquitto has evolved since the tutorial was published. There are some improvements/changes in its configuration. For example, since ver. 1.5 you can differentiate some settings per listener. I recommend taking a look at a manual of the version you are using by typing in your command line:
To troubleshoot the problem check Mosquitto’s log which (by default) is located due to configuration in /etc/mosquitto/mosquitto.conf
log_dest file /var/log/mosquitto/mosquitto.log
Due to above settings, display last 100 lines of the log file:
sudo tail -100 /var/log/mosquitto/mosquitto.log
…and check what is going there.
As the error may be related to some mistake made in config file, I am giving a portion of my config for reference:
listener 1883 localhost
Let me know how it works, pls.