Thursday, February 28, 2013

Fix for perpetual dropbox 'Connecting'

I recently had an issue with my Dropbox installation on my Mac. It had been working fine for many months, but at some point it began to get locked into a mode where it never connected to the service. I could hit the site without problem. I followed all the procedures I could find on the web to reinstall, deleting the app fully, deleting settings, deleting the entire dropbox folder... Nothing worked. After reinstallation, it got even worse, as the setup wizard couldn't complete. Telling the app to close would hang the app, and I'd have to kill it manually from the command line.

Well, to make a long story short, and preserve this so hopefully folks having this same issue in the future can find my solution:

First, go to 'Terminal'. Make sure that Dropbox is not running by typing the following:
sudo killall -9 Dropbox

After that, you'll want to flush the DNS cache:
sudo killall -HUP mDNSResponder

Then start dropbox and wait a little while (let's say 30 seconds). Now we want to get a summary of all the servers your machine has tried to connect to. This first command logs that info to the system log:
sudo killall -INFO mDNSResponder

The second command searches that log for entries matching dropbox:
cat /var/log/system.log|grep dropbox

The resulting information for me showed an entry for 'client71.dropbox.com'. When I did an nslookup for that domain on my box, I got a strange error. When I did a lookup using an online DNS tool, it worked fine... I never bothered to determine the problem, the solution was to add the following line to /etc/hosts:
127.0.0.1   client71.dropbox.com

I killed Dropbox again using the killall command, restarted it, and it immediately went to the wizard step where it asked for my credentials, and it's been fine ever since. Huzzah!

No comments:

Post a Comment

Related Posts Plugin for WordPress, Blogger...