As a side note, I attempted to debug the issue using strace by tracing the connect system call with the command:
$ strace -e connect python ./t1.py
connect(3, {sa_family=AF_INET, sin_port=htons(8008), sin_addr=inet_addr("XXX.XXX.XXX.XXX")}, 16) = -1 EINPROGRESS (Operation now in progress)
connect(3, {sa_family=AF_INET, sin_port=htons(8015), sin_addr=inet_addr("XXX.XXX.XXX.XXX")}, 16) = -1 EINPROGRESS (Operation now in progress)
The output showed that the program first tried to connect to port 8008, which is open on the server and also defined in the clearml.conf file. However, the connect call to port 8008 occurred only once, while all other connect calls were made to port 8015 for unknown reasons.
I am unsure why the program suddenly attempted to connect to port 8015. When I tested it on a different computer from a different network, this issue did not occur, and all connect calls were made to the same 8008 port, which is open and defined.
Do you have any idea why the program attempted to connect to the 8015 port?