What do you run in main_worker and where do the world_size=4 and rank=0 arguments to init_process_group come from? Are they hard coded, or do you list a single example?
The error itself means that multiple processes try to bind to the address and port, so I assume you are trying to run multiple processes with rank=0.