I am using PubNub (GO SDK) publish/subscribe service to receive messages but I am not receiving any messages even when I am able to ping google.com
from inside the container.
In the Pubnub logs, every time my program tries to connect to the origin (Pubnub server), I am getting "dial tcp: i/o timeout" error. I guess this is due to the slow internet connection either on the host or in the container.
What should I do to get around this error?
I was to solve this error by including Google DNS (8.8.8.8) in my machine's nameservers. I think this error was due to the slow domain resolution process as my machine was getting DNS from DHCP.
I followed these steps:
Set static DNS in /etc/resolvconf/resolv.conf.d/base
file:
nameserver 8.8.8.8
nameserver 8.8.4.4
Configure your PC so that it uses user-provided DNS, instead of obtaining it from DHCP. For that, open this file /etc/dhcp/dhclient.conf
and add this line:
supersede domain-name-servers 8.8.8.8, 8.8.4.4;
Restart network manager using:
sudo service network-manager restart
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With