NO ROUTE TO HOST network request from container to host-ip:port published from other container

I have same problem.

I have three hosts.

192.168.50.40 - docker swarm manager
192.168.50.41 - docker swarm worker, PostgreSQL installed.
192.168.50.42 - docker swarm worker

In host 192.168.50.41, I’ve installed PostgreSQL(native, not docker).

Webapp containers that are running on other two hosts, that is, on 192.168.50.40 and 42 are able to connect to PG using 192.168.50.41:5432.

But containers on the host 192.168.50.41 are not.

# ping goes well
root@a7c1a37c3d54:/# ping -c 2 192.168.50.41
PING 192.168.50.41 (192.168.50.41) 56(84) bytes of data.
64 bytes from 192.168.50.41: icmp_seq=1 ttl=64 time=0.272 ms
64 bytes from 192.168.50.41: icmp_seq=2 ttl=64 time=0.096 ms

--- 192.168.50.41 ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 1002ms
rtt min/avg/max/mdev = 0.096/0.184/0.272/0.088 ms

# but psql fails
root@a7c1a37c3d54:/# psql -h 192.168.50.41 -p 5432 -U postgres
psql: could not connect to server: No route to host
        Is the server running on host "192.168.50.41" and accepting
        TCP/IP connections on port 5432?

If this is a bug and I have to set up the firewall in host 50.41, how do I have to set up? (Especially in CentOS7 and Ubuntu 16.04)