I think the problem is that you are using port 22 for master_port. Port 22 is reserved for SSH and usually ports 0-1023 are system ports for which you need root access (probably that is why you see Permission Denied). I’d suggest using a port number > 1024 and ensure no other service is supposed to use that port number.