websocket-client icon indicating copy to clipboard operation
websocket-client copied to clipboard

Amp\Dns\TimeoutException

Open jclee100 opened this issue 3 years ago • 3 comments

This may be the issue with my set up and not a bug, but I am not sure where I can ask for help.

I am following the basic example here: https://amphp.org/websocket-client/

Running on my Windows 10 Dev PC.

I am getting Uncaught Amp\MultiReasonException: Multiple errors encountered; use Amp\MultiReasonException::getReasons() to retrieve the array of exceptions thrown in \vendor\amphp\amp\lib\functions.php:540

Looking into the error, I found some issue with my DNS. Amp\Dns\TimeoutException No response for 'ftx.com' (A) from any nameserver within 3000 ms after 2 attempts, tried udp://192.168.1.1:53, udp://192.168.1.1:53

Not sure what I can do to resolve this. I have no problems running a websocket client on Javascript.

jclee100 avatar Mar 29 '21 09:03 jclee100

@jclee100 You can open issues here or on StackOverflow, either is fine.

Is 192.168.1.1 the expected DNS server for your setup? You can check the system config following this article.

kelunik avatar Mar 29 '21 14:03 kelunik

ipconfig /all returns DNS Servers . . . . . . . . . . . : 8.8.8.8

jclee100 avatar Apr 09 '21 05:04 jclee100

So it's indeed querying the wrong server. Could you have a look at the registry and see where 8.8.8.8 and 192.168.1.1 are listed? You can find the keys Amp looks for here: https://github.com/amphp/dns/blob/920eb4786ba90c4241ca2dc09d855c6f7b5aed3a/lib/WindowsConfigLoader.php#L23

kelunik avatar Apr 09 '21 06:04 kelunik