Saturday, January 18, 2014

Eclipse Not Able To Connect Internet, Market Place - Configure Connection Proxy Settings

If you are using Eclipse in your company, you might have faced issues, where Eclipse is not able to connect to internet. Since most of companies uses proxy for connecting to Internet, its important to configure proxy settings in Eclipse to allow Eclipse to access Internet behind organization's firewall. If your company regularly changes there internet proxy settings then this also needs to be updated whenever your Proxy server changes. Since Eclipse needs internet connection for connecting to Eclipse Market place, installing and updating plugins, downloading Maven dependencies from remote maven repository, it's really frustrating when Eclipse just hung up, shows connecting and time out after a long time. If you see Eclipse is not able to connect to Market Place or not able to download any Maven dependency, first thing to check is your connection proxy settings. If you don't know where to find connection proxy settings for Eclipse IDE or doesn't know how to configure proxy setting for internet in Eclipse IDE, then you can follow steps given in next section of this article. By the way, this is one of the several tips, which I have shared on Eclipse IDE e.g. Eclipse  keyboard shortcuts, Eclipse debugging tips and productivity settings. Since Eclipse is one of my favourite and most widely used FREE IDE for Java development, it's important for every Java developer to some useful configuration and settings details.



Steps to Configure Internet Connection Proxy Settings in Eclipse

You can follow below steps to fix Eclipse not able to connect to Market place error :

1) Open Preferences Screen by clicking Windows-->Preferences on main menu in Eclipse

2) Expand General node, usually first option on right side, this will open Network connection settings, See first image.



3) On Active Provider Combo box, choose Manual and now select proxy entries for Schema HTTP and HTTPS, one by one. See second image


4) Put your proxy server and port usually 80 and if your proxy server needs authorization, put your username and password as well.

5) Don't configure SOCKS Schema, until you know you need it. This has some issue, and we have seen it Eclipse not able to connect to Market place and download plug-in because of this schema. You can see in first image, we have not configured proxy server for SOCKS schema

6) Click Apply and Ok

Remember
So, now we know how to configure connection proxy settings for Eclipse, but you may find one day that its not working any more, because your company has updated there internet proxy settings. Remembering few things will help you there :

1) Always update your proxy server in Eclipse connection settings, if it changes (though this happens rarely).

2) If your proxy server needs authorization to connect to internet in form of username and password, then keep them updated as soon as you changed. This is by far most common reason for Eclipse internet connection issue.

3) Don't check the SOCKS Schema, until you need it explicitly. This has caused lot of problems and can leave you wondering what's the issue, if proxy server and user name and password is correct. By unchecking SOCKS schema I was able to connect Eclipse market place in a second.

4) Use "Manual" as your Active Provider if you are connecting to internet using Proxy.

That's all on How to configure proxy settings in Eclipse for using Internet. So next time when you Eclipse not able to connect Market place, update plugins or failed to download Maven dependency, follow above steps to verify your proxy settings and update them if they are changed.


9 comments :

Mohan Mareedu said...

Hello Javin Paul, I am quite impressed on you blog post. And the details you put in concept are commandable. Love to see you future posts.

Javin Paul said...

Thanks Mohan and welcome to Javarevisited.

Tarun Trehan said...

Hi,
Nice Post.
Just want to add that this can also be helpful while leveraging CVS client in eclipse to connect to repositories.
I faced it in my organization and had to resort the proxy resolution way.

SARAL SAXENA said...

@Javin Nice article even I have the same problem. I installed Eclipse 3.7 into a new folder, and created a new workspace. I launch Eclipse with a -data argument to reference the new workspace.

When I attempt to connect to the marketplace to get the SVN and Maven plugins, I get the same issues described in OP.

After a few more tries, I cleared the proxy settings for SOCKS protocol, and I was able to connect to the marketplace.

So the solution for me was to configure the manual settings for HTTP and HTTPS proxy, clear the settings for SOCKS, and restart Eclipse.

Jose Luis Rivero said...

Thanks. It works.

Anonymous said...

I think more to settings this is also issue with Eclipse versions itself. I downloaded Eclipse Luna and tried everything but it diddn't work. Then I downloaded Eclipse Kepller version and it worked without doing anything. For the record, I am behind corporate network and needs proxy settings to connect to internet. So, a quick solution is just to go back and start using Eclipse Kepler for Java and JEE development.

Anonymous said...

I am having hard time my Eclipse working behind proxy. I want to download some plugins from market place, but it's not working at all. Can you please advise how to setup proxy for Eclipse and make Eclipse market place work behind proxy? I don't know why simple things are so tough in Eclipse.

Anonymous said...

@Anonymous, that sounds interesting, how does Kepler figure out corporate proxy by itself? did you do anything to make Eclipse work behind proxy, or you just downloaded the version, started and able to connect to market place?

Anonymous said...

update eclipse.ini. This worked for me.

-vmargs
-Dorg.eclipse.ecf.provider.filetransfer.excludeContributors=org.eclipse.ecf.provider.filetransfer.httpclient4

Post a Comment