On 06/01/2019 11:15 AM, Markus Elfring wrote: >>> connect(3, {sa_family=AF_INET, sin_port=htons(37351), >>> sin_addr=inet_addr("127.0.0.1")}, 16) = -1 ECONNREFUSED (Connection refused) >> >> Without seeing the code, I'd be suspicious of that difference. > > I would expect that the IPv4 address from such a connection attempt > would be automatically converted to a IPv6 loopback address.
How would this conversion take place? Localhost is 127.0.0.1. Localhost6 is ::1. They are different and you cannot route between the two. What I can see is that your server binds to localhost6 and your client is trying to connect to localhost. > Unfortunately, the direct specification “… socket-send_json_data.py > --server_id ::1 …” > does not work at the moment because of the error message “socket.gaierror: > [Errno -9] > Address family for hostname not supported”. No idea on that one. -- https://mail.python.org/mailman/listinfo/python-list