dog icon indicating copy to clipboard operation
dog copied to clipboard

Error [network]: No such host is known. (os error 11001)

Open andrejohansson opened this issue 5 years ago • 12 comments

Can´t seem to get this to work, am I missing something obvious?

Dog

❯ dog google.com
Error [network]: No such host is known. (os error 11001)

Dig

❯ dig google.com

; <<>> DiG 9.14.8 <<>> google.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 46221
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4096
;; QUESTION SECTION:
;google.com.                    IN      A

;; ANSWER SECTION:
google.com.             240     IN      A       172.217.21.174

;; Query time: 0 msec
;; SERVER: 192.168.1.1#53(192.168.1.1)
;; WHEN: Mon Nov 09 16:25:04 W. Europe Standard Time 2020
;; MSG SIZE  rcvd: 55

Version information

❯ dog --version
dog ● command-line DNS client
v0.1.0
https://dns.lookup.dog/
Edition	Windows 10 Pro for Workstations
Version	20H2
Installed on	‎2020-‎06-‎17
OS build	19042.610
Experience	Windows Feature Experience Pack 120.2212.31.0

andrejohansson avatar Nov 09 '20 15:11 andrejohansson

Well, if you're using software that's on version zero point one, it's probably the software, not you :)

Could you re-run your query with the DOG_DEBUG environment variable set to a non-empty string? This is looking similar to issue #2.

ogham avatar Nov 09 '20 22:11 ogham

Seems it has trouble getting a default nameserver. A workaround of dog google.com -n 1.1.1.1 solved the issue for me.

orawalters avatar Nov 10 '20 16:11 orawalters

@ogham This bug occurs because of this LOC. First adapter not always what we need. In my case it was Hyper-V adaper.

SerialSmile avatar Nov 10 '20 20:11 SerialSmile

I can confirm that dog google.com -n 1.1.1.1 helped for me too, and I have a lot of adapters so what @SerialSmile concludes is very likely.

andrejohansson avatar Nov 12 '20 21:11 andrejohansson

Windows 10 Pro. same problem.

Kirill avatar Nov 13 '20 10:11 Kirill

This seems to be resolved by 8238e217c74485e84b204b3819445bc8b44da732 on master. I can verify it is fixed now.

BYK avatar Nov 18 '20 20:11 BYK

When it's come to release?

Kirill avatar Dec 05 '20 11:12 Kirill

In the next release I want to include some way to set the adapter.

Thanks for the reports, all

ogham avatar Mar 28 '21 11:03 ogham

How's v0.2.0 coming along now ?

I just installed it using scoop and I encountered this exact error

LelouBil avatar Feb 20 '22 23:02 LelouBil

Hi, I tried to build from the current master branch and found that the issue does not seem to be solved.

Please see the following logs.

working with -n
./dog google.com -n 1.1.1.1
[INFO dog] Running with options -> Options {
    requests: RequestGenerator {
        inputs: Inputs {
            domains: [
                Labels {
                    segments: [
                        (
                            6,
                            "google",
                        ),
                        (
                            3,
                            "com",
                        ),
                    ],
                },
            ],
            record_types: [
                A,
            ],
            classes: [
                IN,
            ],
            resolver_types: [
                Specific(
                    "1.1.1.1",
                ),
            ],
            transport_types: [
                Automatic,
            ],
        },
        txid_generator: Random,
        edns: SendAndHide,
        protocol_tweaks: ProtocolTweaks {
            set_authoritative_flag: false,
            set_authentic_flag: false,
            set_checking_disabled_flag: false,
            udp_payload_size: None,
        },
    },
    measure_time: false,
    format: Text(
        Automatic,
        TextFormat {
            format_durations: true,
        },
    ),
}
[DEBUG dog::hints] Reading hints from /etc/hosts equivalent
[INFO dns_transport::udp] Opening UDP socket
[DEBUG dns_transport::udp] Opened
[INFO dns_transport::udp] Sending 39 bytes of data to 1.1.1.1 over UDP
[DEBUG dns_transport::udp] Wrote 39 bytes
[INFO dns_transport::udp] Waiting to receive...
[INFO dns_transport::udp] Received 55 bytes of data
[INFO dns::wire] Parsing response
[DEBUG dns::wire] Reading 1x query from response
[DEBUG dns::wire] Reading 1x answer from response
[INFO dns::wire] Parsing A record (type 1, len 4)
[DEBUG dns::wire] Reading 0x authority from response
[DEBUG dns::wire] Reading 1x additional answer from response
A google.com. 4m43s   142.250.179.238
failed with defaults
./dog google.com
[INFO dog] Running with options -> Options {
    requests: RequestGenerator {
        inputs: Inputs {
            domains: [
                Labels {
                    segments: [
                        (
                            6,
                            "google",
                        ),
                        (
                            3,
                            "com",
                        ),
                    ],
                },
            ],
            record_types: [
                A,
            ],
            classes: [
                IN,
            ],
            resolver_types: [
                SystemDefault,
            ],
            transport_types: [
                Automatic,
            ],
        },
        txid_generator: Random,
        edns: SendAndHide,
        protocol_tweaks: ProtocolTweaks {
            set_authoritative_flag: false,
            set_authentic_flag: false,
            set_checking_disabled_flag: false,
            udp_payload_size: None,
        },
    },
    measure_time: false,
    format: Text(
        Automatic,
        TextFormat {
            format_durations: true,
        },
    ),
}
[DEBUG dog::hints] Reading hints from /etc/hosts equivalent
[DEBUG dog::resolve] Found first nameserver 2606:4700:4700::1111
[INFO dns_transport::udp] Opening UDP socket
Error [network]: No such host is known. (os error 11001)
OS Name:                   Microsoft Windows 11 Pro
OS Version:                10.0.22000 N/A Build 22000
System Type:               x64-based PC

Elypha avatar Feb 28 '22 15:02 Elypha

I was hitting this issue after installing Tailscale which creates a new adapter in Windows. I was able to mitigate the issue by setting the InterfaceMetric to a higher value (I changed the metric from 5 to 100).

I used this PowerShell command (interface index 11 is the Tailscale interface)

Set-NetIPInterface -InterfaceIndex 11 -InterfaceMetric 100

ocitrev avatar Nov 07 '22 15:11 ocitrev