Failed to configure token: failed to get token: lookup no such host

I’m having trouble setting up a remote. It seems my machine can’t resolve even though I can ping it, and access it in my browser.

I have tried changing my DNS to various servers, like Google and OpenDNS. I have restarted my router and computer. I’ve tried reinstalling, installing from the directions on the website and using snaps. I can access in my browser, I get <UnknownOperationException/> so it’s at least resolving.

Here is my log:
`2017/05/01 09:38:49 NOTICE: Config file “/home/aj/.config/rclone/rclone.conf” not found - using defaults
No remotes found - make a new one
n) New remote
r) Rename remote
c) Copy remote
s) Set configuration password
q) Quit config
n/r/c/s/q> n
name> acd
Type of storage to configure.
Choose a number from below, or type in your own value
Storage> 1
Amazon Application Client Id - leave blank normally.
Amazon Application Client Secret - leave blank normally.
Remote config
Use auto config?

  • Say Y if not sure
  • Say N if you are working on a remote or headless machine
    y) Yes
    n) No
    y/n> y
    If your browser doesn’t open automatically go to the following link:
    Log in and authorize rclone for access
    Waiting for code…
    Got code
    2017/05/01 09:39:00 Failed to configure token: failed to get token: Post dial tcp: lookup no such host`

What else can I do?

This seems like it might be a Golang problem: [Docker is written in Golang]

I was able to fix the auth problem by adding to /etc/hosts.

However, now I run into the same problem for this:

rclone ls acd:/ 2017/05/01 10:06:39 Failed to create file system for "acd:/": failed to get endpoints: Get dial tcp: lookup no such host

However, I can't use my /etc/hosts workaround for this, because I can't resolve to an IP:

I think from before you were using Ubuntu.

can you ‘cat /etc/resolv.conf’ and see what’s listed there?

Yes, I am on Ubuntu.

aj@aj-UGnome ~ cat /etc/resolv.conf Generated by NetworkManager nameserver

In /etc/resolvconf/resolv.conf.d/base:
nameserver nameserver

I use to check my DNS and it is definitely Google.

What happens if you run:



; <<>> DiG 9.10.3-P4-Ubuntu <<>>
;; global options: +cmd
;; connection timed out; no servers could be reached

Yeah, looks like your local DNS server isn’t running.

Just to test, you can manually edit your /etc/resolv.conf to match the previous post


retest and run the dig and you should get a result back.

Test with your rclone and I would think that’ll work.

I replaced nameserver with namerserver and nameserver Then I ran sudo service networking restart and sudo service network-manager restart.

I still get this:
rclone ls acd:/ 2017/05/01 12:53:56 Failed to create file system for "acd:/": failed to get endpoints: Get dial tcp: lookup no such host

Don’t run a network restart, that’ll replace the file again and put it back to the old config.

You can just change the file and do the test :slight_smile:

It works! I had to disable network-manager so that it wouldn’t manage my DNS, and set DNS in /etc/network/interfaces. Now rclone works fine.

Thank you!!

1 Like


That was going to my next step but you already got there. Happy it works now.

1 Like

You can also add nameserver to /etc/resolvconf/resolv.conf.d/head (assuming you are using a recent version of Ubuntu) to make it survive reboots, NetworkManager and other services that play with your DNS settings.