0

Cant get NextDNS setup on UDM Pro 1.9.2.3432

Hello, 

I've been trying to setup NextDNS CLI on UDM Pro but with no success. I went through every installation step listed under the setup guide and got it installed. However, when I try "Nextdns activate", I get "Error: setup resolv.conf: rename /etc/resolv.conf /etc/resolv.conf.nextdns-bak: device or resource busy

Error: non zero exit code: 1: OCI runtime error "

I already disable auto-activate but still no luck. Restarted/Rebooted the whole Unifi stack a gazillion times without success. 

I would appreciate any and all guidance. 

41 replies

null
    • olivier
    • 3 yrs ago
    • Reported - view

    You can ignore the error, activation does not work on UDM. The only consequence is that DNS queries performed by the router itself are not going thru NextDNS, but all your LAN's queries will.

      • Christopher_Andrews
      • 3 yrs ago
      • Reported - view

      Olivier Poitrey I also have this issue, however the queries aren't coming to NDNS. I have three networks set up, each defined in nextdns settings on the UDM, I have verified the network ID in the dashboard is correct in the nextdns config, but no queries are hitting NextDNS.

      • Christopher_Andrews
      • 3 yrs ago
      • Reported - view

      Christopher Andrews 

      This is the config I am using. The three networks are set up in the NDNS dashboard. I have verified the network IDs.  None of the traffic on any of those three networks show in the Logs.

      # sudo nextdns config
      listen localhost:53
      config 11.11.30.0/24=******
      config 11.11.20.0/24=******
      config 11.11.10.0/24=******
      config b31d7b
      log-queries false
      use-hosts true
      setup-router false
      control /var/run/nextdns.sock
      cache-size 10MB
      cache-max-age 0s
      max-ttl 5s
      bogus-priv true
      detect-captive-portals false
      auto-activate false
      report-client-info true
      discovery-dns
      hardened-privacy false
      timeout 5s
      # sudo nextdns restart
      Error: systemctl restart nextdns.service: exit status 1: Job for nextdns.service failed because the control process exited with error code.
      See "systemctl status nextdns.service" and "journalctl -xe" for details.

      Error: non zero exit code: 1: OCI runtime error

      • Christopher_Andrews
      • 3 yrs ago
      • Reported - view

      Olivier Poitrey howdy sir. Are you actually with NextDNS? If so, can you let me know the best method a paid user can obtain support for services not working?

      • olivier
      • 3 yrs ago
      • Reported - view

      Christopher Andrews why did you disable "setup-router"?

      • Christopher_Andrews
      • 3 yrs ago
      • Reported - view

      Olivier Poitrey I found a posting on the forum that said to try that if the install was failing. I tried with and without that. ANother posting suggested uninstall and reinstall. After uninstall, it now wont reinstall. I emailed the logs to the team@ email address for the failed install.

      • olivier
      • 3 yrs ago
      • Reported - view

      Christopher Andrews CLI on UDP Pro can't work without setup-router true. What happen if you turn it on?

      • Christopher_Andrews
      • 3 yrs ago
      • Reported - view

      Olivier Poitrey Nothing now. I uninstalled and reinstalled, and now it wont even install:

      # sh -c 'sh -c "$(curl -sL https://nextdns.io/install)"'
      INFO: OS: ubios
      INFO: GOARCH: arm64
      INFO: GOOS: linux
      INFO: NEXTDNS_BIN: /data/nextdns
      INFO: LATEST_RELEASE: 1.11.0
      i) Install NextDNS
      e) Exit
      Choice (default=i): i
      INFO: Installing NextDNS...
      Reading package lists...
      Building dependency tree...
      Reading state information...
      gnupg1 is already the newest version (1.4.21-4+deb9u1).
      0 upgraded, 0 newly installed, 0 to remove and 21 not upgraded.
      Ign:1 https://dl.bintray.com/nextdns/deb stable InRelease
      Get:2 https://dl.bintray.com/nextdns/deb stable Release [9511 B]
      Hit:2 https://dl.bintray.com/nextdns/deb stable Release
      Reading package lists...
      Reading package lists...
      Building dependency tree...
      Reading state information...
      nextdns is already the newest version (1.11.0).
      0 upgraded, 0 newly installed, 0 to remove and 21 not upgraded.
      ERROR: Installation failed: binary not installed in /data/nextdns
      ERROR: install: exit 0
      i) Install NextDNS
      e) Exit
      Choice (default=i):
       

      • olivier
      • 3 yrs ago
      • Reported - view

      Christopher Andrews try "nextdns config set -setup-router=true" then "nextdns restart"

      • Christopher_Andrews
      • 3 yrs ago
      • Reported - view

      Olivier Poitrey Cant, NextDns isn't installed now. See above, the log from the install. Failing because "binary not installed in /data/nextdns". This was after I uninstalled it hoping a reinstall would resolve the issue.

      • olivier
      • 3 yrs ago
      • Reported - view

      Christopher Andrews try entering the unifi container first using "unifi-os shell".

      • Christopher_Andrews
      • 3 yrs ago
      • Reported - view

      Olivier Poitrey That got me where I could run the script, I did a uninstall and reinstall. Definitely went further, except during install, this was noted (below). Not sure if it should be of concern?

      NextDNS installed and started using ubios init
      Error: systemctl start nextdns.service: exit status 1: Job for nextdns.service failed because the control process exited with error code.
      See "systemctl status nextdns.service" and "journalctl -xe" for details.

      ongratulations! NextDNS is now installed.
       

      • olivier
      • 3 yrs ago
      • Reported - view

      Christopher Andrews don't try the install script from inside the container, it won't work well. Your setup seems a bit screwed up right now. You may try to manually uninstall the package using "apt-get remove nextdns" from inside the container, then re-run the install from the outside. Once installed, edit the config instead of running the install script again and again. UDM Pro is a very complex setup, it's easy to get it into an odd state.

      • Christopher_Andrews
      • 3 yrs ago
      • Reported - view

      Olivier Poitrey Ok. I went back to the shell. Manually ran apt-get to uninstall. Went well. Left the shell, re-ran the setup. Looked like it installed. Now, I may be back to the ORIGINAL issue that the DNS queries aren't showing in the logs.  This is my config now since clean install. I have verified the endpoint IDs on each network on the NDNS dashboard. They are starred below, but I verified they match exactly on the dashboard. The DHCP service assigns the UDM IP as the DNS server, so I am confident DNS queries are hitting the UDM.

      # nextdns config
      cache-max-age 0s
      max-ttl 5s
      control /var/run/nextdns.sock
      config 11.11.30.0/24=******
      config 11.11.20.0/24=******
      config 11.11.10.0/24=******
      config ******
      log-queries false
      report-client-info true
      detect-captive-portals false
      listen localhost:53
      setup-router true
      bogus-priv true
      use-hosts true
      hardened-privacy false
      timeout 5s
      auto-activate true
      cache-size 10MB
      discovery-dns
       

      • Christopher_Andrews
      • 3 yrs ago
      • Reported - view

       Olivier Poitrey  not sure if it matters, but nextdns log is showing this error:

      Apr 09 18:42:06 ubnt systemd[1]: Started NextDNS DNS53 to DoH proxy..
      Apr 09 18:42:11 ubnt nextdns[24273]: Setting up router
      Apr 09 18:42:12 ubnt nextdns[24273]: Activating
      Apr 09 18:42:12 ubnt nextdns[24273]: Activate: setup resolv.conf: rename /etc/resolv.conf /etc/resolv.conf.nextdns-bak: device or resource busy
       

      • olivier
      • 3 yrs ago
      • Reported - view

      Christopher Andrews activation error does not matter. Do you see something in any of those config ID logs?

      • Christopher_Andrews
      • 3 yrs ago
      • Reported - view

      Olivier Poitrey Nothing in the logs for those three config IDs, except on the main ID, general DNS requests from the router (source is showing my router's wan IP from when it was set to use Linked IP).  

      • Christopher_Andrews
      • 3 yrs ago
      • Reported - view

      Olivier Poitrey examples attached.

      • olivier
      • 3 yrs ago
      • Reported - view

      Christopher Andrews do you have IPv6 on your network?

      • Christopher_Andrews
      • 3 yrs ago
      • Reported - view

      Olivier Poitrey no sir.

      • Christopher_Andrews
      • 3 yrs ago
      • Reported - view

      Olivier Poitrey I changed my UDM WAN DNS to 9.9.9.9, and that moved all DNS traffic away from NDNS, which tells me the NextDns client on the UDM isn't running, or sending the requests properly.

      • olivier
      • 3 yrs ago
      • Reported - view

      Christopher Andrews oh so you changed the dns of the router manually before installing the cli? Can please reset it to it’s default value please.

      On UDM Pro we capture DNS queries destined to the router using iptables and reroute them to the cli. If you change the destination DNS IP, those rules won’t match.

      • Christopher_Andrews
      • 3 yrs ago
      • Reported - view

      Olivier Poitrey The DNS provided via DHCP to clients is set to the IP of the UDM. I only changed the WAN DNS for testing the linked IP.

      • olivier
      • 3 yrs ago
      • Reported - view

      Christopher Andrews what is the DNS IP set on the LAN clients?

      • Christopher_Andrews
      • 3 yrs ago
      • Reported - view

      Olivier Poitrey It's set to Auto on all three networks, which is giving the UDM IP of 11.11.10.1.

Content aside

  • 3 yrs agoLast active
  • 41Replies
  • 1951Views
  • 4 Following