Error "Address already in use" when training in DDP mode

Description and answer to this problem are in the link below, just under a different title to help the search engine find it easier. It is a common question.

Answer here: How to run Trainer.fit() and Trainer.test() in DDP distributed mode