New Amazon Drive error: "connection refused"

rclone is excellent and has helped me so much, thank you.

I have been using rclone quite successfully for a few months, on 3 machines, all Macs, running various periodic backups. Total data here is about 3TB. A typical command looks something like this:

rclone --checksum sync /Users/admin acd:admin

In the last few days on all machines I’m seeing error messages that I’ve never seen before, that look like this:

2016/12/05 22:41:32 Attempt 1/3 failed with 0 errors and: error listing: amazon drive root ‘admin’: Get dial tcp: lookup on read udp> read: connection refused

I see that many files are being copied successfully, but I’m still getting these errors, which prevent a complete backup, with deletions.

Any suggestions for how I could troubleshoot this?

That is rclone doing a nameserver lookup to your router at Your router is refusing the connection for some reason.

So try troubleshooting the router - reboot it maybe and see if that helps.

1 Like

Hi Nick, thank you for your reply. I’ve done more testing and I’m still puzzled. I think the problem is not rclone, but I’d still like to tell the story because I hope you might have an idea for me. Also, if this is happening here I suppose eventually this will also happen to someone else.

When I first saw those local IP addresses in the error message, I thought maybe it was a router problem, like you said, so I did a simple reboot, but that didn’t help. Then I wrote to you. After I saw your response, I decided I should look harder at the router (TP-Link Archer C7). So I did a firmware upgrade, and a complete factory reset. I was sure this would fix it, but it didn’t! Then I tried connecting to the router via Ethernet instead of wifi. At least so far, I have not been able to reproduce the problem when using Ethernet, although I can reproduce it pretty easily when using wifi (both 2.4ghz as well as 5ghz).

What’s strange is that I have been using rclone heavily for several months, moving (in aggregate) many millions of files, many scores of TB, and it has been very solid. And I never saw this error before, until just a few days ago, and now it happens frequently. I cannot think of any changes in my environment which coincide with the onset of the error.

Also, wifi seems to still work just fine for all the other devices and services I have running here. Just this sudden and mysterious problem with rclone.

I’m hoping you might suggest some other things I could do to try to finally nail this down somehow? Thanks!

Update: now I see the error also happens when connected via Ethernet.

Update, again: reviewing the logs again, I see now that on the Ethernet-connected machine, the error appeared prior to the router reset, but apparently not since then. I think yesterday I made a careless mistake in reading the logs. Good news!

My other key mistake yesterday was failing to immediately restart all the client machines, subsequent to the router reset. On the wifi-connected machines where the error seemed to persist, even after the router reset, I think what I see now is that the error is finally gone, after I have now restarted those machines.

So it looks like this puzzle is now solved, and of course you were right, that the problem was the router. So rclone is back to its normal rock-solid operation.

Thanks again for your help, and sorry to bother you with this.

Glad you’ve sorted it and that I could be of help :slight_smile:

1 Like

I should probably post again, since there’s some new information that might help if someone else runs into this problem. Last time I posted I thought the problem was gone, but I was wrong. Anyway, I’m sure it’s gone now. I’ll explain what happened. It’s somewhat complicated.

I started using rclone a few months ago, on three Macs, running big jobs every night. (One job is backing up a 2tb drive with almost 2 million files. The first time, rclone ran continuously for about 3 weeks.)

rclone worked great. Then one day about two weeks ago, the above error suddenly started appearing on all machines. It had never appeared before (and I’m always reviewing the logs carefully). It would appear frequently and prevent jobs from finishing. With your guidance, I looked closely at the router, and ended up doing a factory reset. This fixed the problem on two of the three machines. However, the problem persisted on the third machine. This is weird, because that third machine is running the same OS, the latest Sierra, as one of the other machines.

After many failed attempts at troubleshooting the problem, I finally surrendered and did a complete erase and reinstall on the boot drive. Not that hard to do, and something I like to do every few years, anyway. And now the error is gone.

It seems so strange that the router reset solved the problem on two machines but not the third. I really wanted to identify the specific cause of the problem (on the third machine), but in the end I could not, even though I tried a bunch of different techniques. For example, the problem persisted after I created a new user account, and it also persisted after I reinstalled Sierra (without erasing the prior installation). Although the problem didn’t happen when I booted the same machine from an external drive containing a fresh, new Sierra.

The error was hard to nail down because usually it would appear within 5-10 minutes after launching rclone, but sometimes it would not appear for 30-40 minutes. I noticed that if the error appeared once, it would keep appearing, pretty frequently. I also eventually noticed that if I got through the first hour, then rclone could run for many hours/days and the error would never appear. This is why troubleshooting was a slow process, and why I got fooled earlier when I declared victory prematurely, and why I finally surrendered to a relatively extreme solution.

Anyway, in case this ever happens to someone else I hope they read this and it helps them somehow.

Thanks for writing that up.

1 Like

I am experiencing this as well. I am on Ubuntu Desktop 17.04 and I just installed rclone. I tried installing with snapd and from the .zip file release, they both have the same error:

`2017/04/30 17:52:48 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> amazon cloud drive
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/04/30 17:53:01 Failed to configure token: failed to get token: Post dial tcp: lookup on read udp> read: connection refused`

I’m not sure what else to do, I’d rather not reinstall… I’ve restarted my router, and I can ping fine.

Even though you and I both saw an error that said “connection refused,” it sounds like our situations are quite different. In my situation, I could start a job, but an error would appear intermittently while the job was running. Then the job would continue, but it would never completely finish.

On the other hand, you’re finding it impossible to even start a job, and you have never been able to even start a job. So it seems likely that the cause of your problem is something quite different from whatever was causing my problem.

I suspect that these are the important words in your error: “failed to configure token.” Maybe you should start a new thread, and put those words in the title. I’m clueless about the real cause of your problem, but if you make that new thread, I think someone else who knows more will speak up.

@ajthemacboy - That looks like your local DNS on your machine is not configured or running.

I have created a new post: Failed to configure token: failed to get token: lookup no such host

Thank you!