What’s wrong with my docker IPv6 network?

I have an issue with my docker containers that I can’t figure out.
The containers are connected by a network which allows both IPv4 and IPv6 to be used:

[email protected]:# docker network inspect f9313031ab32
[
    {
        "Name": "my_net",
        "Id": "f9313031ab329c809d16879ef4276c00181e83c0521a3b5220043ecbede4db7f",
        "Created": "2019-07-03T17:05:26.774007984+02:00",
        "Scope": "local",
        "Driver": "bridge",
        "EnableIPv6": true,
        "IPAM": {
            "Driver": "default",
            "Options": {},
            "Config": [
                {
                    "Subnet": "172.16.238.0/24",
                    "Gateway": "172.16.238.1"
                },
                {
                    "Subnet": "2001:3984:3989::/64",
                    "Gateway": "2001:3984:3989::1"
                }
            ]
        },
        "Internal": false,
        "Attachable": true,
        "Ingress": false,
        "Containers": {
            "ad46a51c5c21f807fd6aef4bc4aa2c44107ac5a1740af8187063352ae8eabd20": {
                "Name": "docker_MyContainer_1_1",
                "EndpointID": "cb61aab8cf60ab19527600fd198be56a0b20b7b00e391c5601b3de9bae535bf9",
                "MacAddress": "02:42:ac:10:ee:66",
                "IPv4Address": "172.16.238.102/24",
                "IPv6Address": "2001:3984:3989::102/64"
            },
            "fb1ab6c8bef37a05ef3de840baaa033ef8281011ba65c9341165381f08646642": {
                "Name": "docker_MyContainer_2_1",
                "EndpointID": "7f91c31799ecc052e86aef77dacbe8f6010f30cc78dfabe22b8bde4962913945",
                "MacAddress": "02:42:ac:10:ee:8e",
                "IPv4Address": "172.16.238.142/24",
                "IPv6Address": "2001:3984:3989::142/64"
            }
        },
        "Options": {},
        "Labels": {}
    }
]

A server is running in the container, which is listening for connections:

[email protected]:# netstat -tulpn
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name    
tcp        0      0 127.0.0.11:42047        0.0.0.0:*               LISTEN      -                   
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      11/sshd             
tcp6       0      0 :::11880                :::*                    LISTEN      26/pserver        
tcp6       0      0 :::22                   :::*                    LISTEN      11/sshd             
udp        0      0 127.0.0.11:51591        0.0.0.0:*

I interpret the output above as the IPv4 traffic is routed through the IPv6 sockets, since there is no IPv4 socket listening on port 11880.

The server can be accessed locally on port 11880 using both IPv4 and IPv6:

[email protected]:# pclient 172.16.238.102   
userid:"MyUser"
[email protected]:# pclient 2001:3984:3989::102   
userid:"MyUser"

But from a remote container on the same host, the server can only be reached using IPv4:

[email protected]:# pclient 172.16.238.102
userid:"MyUser"
[email protected]:# pclient 2001:3984:3989::102
<nil> rpc error: code = Unavailable desc = all SubConns are in TransientFailure

The remote container can ping the server container using both IPv4 and IPv6:

[email protected]:# ping -c 2 172.16.238.102
PING 172.16.238.102 (172.16.238.102) 56(84) bytes of data.
64 bytes from 172.16.238.102: icmp_seq=1 ttl=64 time=0.268 ms
64 bytes from 172.16.238.102: icmp_seq=2 ttl=64 time=0.137 ms

--- 172.16.238.102 ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 1000ms
rtt min/avg/max/mdev = 0.137/0.202/0.268/0.067 ms

[email protected]:# ping -c 2 2001:3984:3989::102
PING 2001:3984:3989::102(2001:3984:3989::102) 56 data bytes
64 bytes from 2001:3984:3989::102: icmp_seq=1 ttl=64 time=0.219 ms
64 bytes from 2001:3984:3989::102: icmp_seq=2 ttl=64 time=0.218 ms

--- 2001:3984:3989::102 ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 999ms
rtt min/avg/max/mdev = 0.218/0.218/0.219/0.014 ms

Any idea why my server can’t be reached using IPv6 from the remote container?

Source: StackOverflow