Saturday, April 14, 2012

SOLVED: Eclipse Update - Connection refused (

[Updated 28 January 2013]

Every time I try to update Eclipse, I get a variation of this error message.

Connection refused (

There are several solutions to this issue. Google recommends using the non-secure variant of the repository address,, but I no longer travel this road. I've discovered that once I get the parameters correct for the non-secure site, the secure site will also work. To me, this just means an extra, unnecessary step. Since I prefer using the secure connection, I simply skip down to my short list, provided below, of things that might work. Sometimes, it requires a combination of solutions in order to update correctly. Persistence will pay off!

Make sure your firewall is set to allow Java, Eclipse, and Android SDK to get out and check for updates (preferred) ... OR turn it off (much more risky).

Check the URL you're using against the one published on the Android site. The address changes sometimes, so make sure it's the latest one. If it's different, you can try simply updating the address, but your best bet is to update the SDK.

Try a different network environment.

In certain recent versions of the Windows environment, the SDK Manager must be RUNAS the system administrator (not just any old administrator) as a standalone. This will, by virtue of the relationship between the SDK and Eclipse, update the appropriate add-ons in Eclipse. If you use this solution all the time, you should remove the address from Eclipse's add-ons repository list.

If you use a proxy server, try this. If not, skip to the next solution.
1. Open a command prompt or terminal window
2. Navigate to the directory in which android.bat resides (the SDK install location)
3. Backup android.bat (in case this fix doesn't work, you will need to revert to the original)
4. Locate the line (near the bottom, very long) that contains %REMOTE_DEBUG%
5. Add the following parameters, using actual values
* Replace [myProxyServer] with the name of your proxy server
* Replace [myProxyPort] with the port number your proxy server uses
-DproxyHost=[myproxyserver] -DproxyPort=[myProxyPort]
6. Save the new android.bat file
7. Restart SDK Manager
8. If problem persists, remove the new android.bat file and restore the original file

SOLUTION 5: For Mac users (may work for other platforms, too)
When the error occurs, click CANCEL, then Update SDK Manager, then Restart SDK Manager.

Take a look at this post for new ideas. A couple of the solutions in this list were gleaned from here. If you find one that works that's not in this list, please let us know by leaving a comment below.

SOLUTION 7: (aka The Last Resort)
Uninstall/Reinstall latest Eclipse _AND_ Android SDK.

28 January 2013

For a recent Tools update, I kept getting a message from Android SDK that the ...\tools directory was in use. Of course, as dumb as it sounds, the program that had locked this directory was the very same Android SDK!!! Here's how I fixed that.
1. Close Eclipse and Android SDK, if running.
2. Manually rename the \tools directory to the destination folder name in the error message. In my case it was ToolPackage.old02.
3. Move the renamed folder via DragNDrop into the ...\temp folder.
4. I found the new version in my ...\temp directory & extracted the tools directory in the SDK root directory.

For example, the newly extracted folder on my Windows 7 machine is c:\Dev\android-sdk-windows\tools.

1 comment:

  1. Good work buddy. All error messages now gone. Thanks