nextdns / diag

Network diagnostic tool
MIT License
94 stars 17 forks source link

Post unsuccessful: status 400 #12

Closed owine closed 3 years ago

owine commented 3 years ago

Tried to run this script and while it appeared to complete successfully, it would not send the results giving the following error. Post unsuccessful: status 400 {"error":"0: instance requires property \"Primary\"\n"}%

Ran on macOS 11.1

Full output (sanitized some info):


Welcome to NextDNS network diagnostic tool.

This tool will download a small binary to capture latency and routing information
regarding the connectivity of your network with NextDNS. In order to perform a
traceroute, root permission is required. You may therefore be asked to provide
your password for sudo.

The source code of this tool is available at https://github.com/nextdns/diag

Do you want to continue? (press enter to accept)
Testing IPv6 connectivity
  available: false
Fetching https://test.nextdns.io
  status: unconfigured
  client: <zzzzzzz>
  resolver: 108.162.217.48
Traceroute for primary IPv4 (45.90.28.0)
    1     10.17.89.1    4ms   1ms   2ms
    2    10.16.160.1    3ms   1ms   1ms
    3   204.14.39.94    4ms   2ms   1ms
    4 142.147.56.170    3ms   2ms   1ms
    5  142.147.56.32    3ms   1ms   1ms
    6 142.147.56.144    3ms   1ms   1ms
    7   38.88.202.57    3ms   2ms   3ms
    8   154.24.45.85    3ms   2ms   2ms
    9  154.54.81.109    3ms   2ms   2ms
   10   154.54.7.130   10ms   9ms   9ms
   11  154.54.82.246   25ms  21ms  21ms
   12   154.54.3.126   24ms  22ms  22ms
   13   154.54.5.178   23ms  21ms  22ms
   14    154.24.2.18   24ms  22ms  22ms
   15 149.14.125.130   24ms  23ms  21ms
   16   85.95.26.222  103ms  92ms  93ms
   17   85.95.25.113  312ms 232ms 231ms
   18                   *     *     *
   19 115.255.252.58    *   243ms 240ms
   20 115.254.43.229  216ms 214ms 213ms
Traceroute for secondary IPv4 (45.90.30.0)
    1     10.17.89.1    5ms   1ms   1ms
    2    10.16.160.1    3ms   1ms   2ms
    3   204.14.39.94    2ms   2ms   1ms
    4 142.147.56.170    3ms   1ms   1ms
    5  142.147.56.32    3ms   2ms   2ms
    6 142.147.56.144    3ms   2ms   2ms
    7   38.88.202.57    4ms   3ms   2ms
    8   154.24.45.85    3ms   3ms   2ms
    9  154.54.81.109    4ms   3ms   2ms
   10  154.54.46.178    4ms   3ms   4ms
   11   154.54.12.38    4ms   3ms   3ms
   12  62.115.113.18   23ms  17ms  17ms
   13 62.115.165.226   20ms  20ms  19ms
   14 188.172.247.32   20ms  19ms  18ms
   15     45.90.30.0   18ms  19ms  18ms
Fetching PoP name for primary IPv4 (45.90.28.0)
Fetch error: Get "https://dns.nextdns.io/info": dial tcp 45.90.28.0:443: connect: operation timed out
Fetching PoP name for secondary IPv4 (45.90.30.0)
  anexia-atl: 18.6ms
Pinging PoPs
  heficed-chi: 3.884ms
  vultr-chi: 4.291ms
  router-pit: 15.256ms
  zepto-mci: 15.255ms
  smarthost-mci: 15.23ms
  zepto-iad: 20.326ms
  zepto-xrs: 22.214ms
  hydron-clt: 25.205ms
  tier-clt: 24.913ms
  anexia-mnz: 26.626ms
Do you want to send this report? [Y/n]: 
Optional email in case we need additional info: <zzzzzz>
Post unsuccessful: status 400
{"error":"0: instance requires property \"Primary\"\n"}% 
rs commented 3 years ago

If you try again, do you get the same error?

owine commented 3 years ago

Yes, same error on multiple attempts both with and without entering an email address. I tried running on my UDM Pro and RPi as well, but the primary traceroute never completes so the script does not advance.

Note I am having connectivity issues to the primary resolver, but I would think this is exactly when we want to use this :)

rs commented 3 years ago

The issue is Fetch error: Get "https://dns.nextdns.io/info": dial tcp 45.90.28.0:443: connect: operation timed out. What do you get with curl -svL https://dns.nextdns.io/info.

owine commented 3 years ago
*   Trying 45.90.30.0...
* TCP_NODELAY set
* Connected to dns.nextdns.io (45.90.30.0) port 443 (#0)
* ALPN, offering h2
* ALPN, offering http/1.1
* successfully set certificate verify locations:
*   CAfile: /etc/ssl/cert.pem
  CApath: none
* TLSv1.2 (OUT), TLS handshake, Client hello (1):
* TLSv1.2 (IN), TLS handshake, Server hello (2):
* TLSv1.2 (IN), TLS handshake, Certificate (11):
* TLSv1.2 (IN), TLS handshake, Server key exchange (12):
* TLSv1.2 (IN), TLS handshake, Server finished (14):
* TLSv1.2 (OUT), TLS handshake, Client key exchange (16):
* TLSv1.2 (OUT), TLS change cipher, Change cipher spec (1):
* TLSv1.2 (OUT), TLS handshake, Finished (20):
* TLSv1.2 (IN), TLS change cipher, Change cipher spec (1):
* TLSv1.2 (IN), TLS handshake, Finished (20):
* SSL connection using TLSv1.2 / ECDHE-ECDSA-AES128-GCM-SHA256
* ALPN, server accepted to use h2
* Server certificate:
*  subject: CN=nextdns.io
*  start date: Dec 20 15:08:19 2020 GMT
*  expire date: Mar 20 15:08:19 2021 GMT
*  subjectAltName: host "dns.nextdns.io" matched cert's "dns.nextdns.io"
*  issuer: C=US; O=Let's Encrypt; CN=R3
*  SSL certificate verify ok.
* Using HTTP2, server supports multi-use
* Connection state changed (HTTP/2 confirmed)
* Copying HTTP/2 data in stream buffer to connection buffer after upgrade: len=0
* Using Stream ID: 1 (easy handle 0x7feeda00d600)
> GET /info HTTP/2
> Host: dns.nextdns.io
> User-Agent: curl/7.64.1
> Accept: */*
> 
* Connection state changed (MAX_CONCURRENT_STREAMS == 50)!
< HTTP/2 200 
< access-control-allow-origin: *
< content-type: application/json
< strict-transport-security: max-age=63072000; includeSubDomains; preload
< timing-allow-origin: *
< content-length: 86
< date: Sat, 02 Jan 2021 19:39:23 GMT
< 
* Connection #0 to host dns.nextdns.io left intact
{"locationName": "🇺🇸 Atlanta, United States", "pop": "anexia-atl", "rtt": 22454}* Closing connection 0
rs commented 3 years ago

Please try again in about 15 minutes, a new version of the diag should fix that. Make sure you use the sh/curl command to launch the diag, so you get that latest version.

owine commented 3 years ago

Now receiving a new error:

Post unsuccessful: status 500
Internal Server Error% 
rs commented 3 years ago

please try again

owine commented 3 years ago

Works now, thanks