相关文章推荐
慷慨的黄瓜  ·  org.postgresql.util.PS ...·  10 月前    · 
大力的枕头  ·  vue 获取 ...·  1 年前    · 

Welcome to Support!

Search for an answer or ask a question of the zone or Customer Support.

Need help? Dismiss Show All Questions sorted by Date Posted

Show

sorted by

cpiyush cpiyush

javax.net.ssl.SSLException: Unrecognized SSL message, plaintext connection?

Hi,

I am trying to access Salesforce.com using its published webservices.

I have developed the entire code at my home internet connection and it workes fine there (as I didn't have any firewall blokcing there).
Now when I am trying to run the same code here on my company's LAN I am getting the following error: -
javax.net.ssl.SSLException: Unrecognized SSL message, plaintext connection?

I have set the Proxy settings : -
System.getProperties().put("proxySet", true);
System.setProperty("http.proxyHost", <company-proxy>);
System.setProperty("http.proxyPort", "8080");
System.setProperty("https.proxyHost", <company-proxy>);
System.setProperty("https.proxyPort", "8080");
System.setProperty("java.protocol.handler.pkgs","com.sun.net.ssl.internal.www.protocol");
Security.addProvider(new com.sun.net.ssl.internal.ssl.Provider());

I have gone through the previously posted threads regarding the same problem but couldn't get any solution regarding this.

Probably this has something to do with the ssl certificates. But I am not so familier with them and their installation.
I am using Axis1.3's jar files in my project, But I am not running axis server.

I am also able to access other https sites from my program. But not able to login in salesforce.

As my program is running perfect on my home's internet connection I am quite sure that there is something wrong with the proxy setting of my company, please guide me where am I going worng.


Thanks,
Piyush.

cpiyush cpiyush

Hi,

Can anybody provide me any help??... I am atill stuck with this problem.

Thanks.

Piyush

jack_lincon_zhu jack_lincon_zhu
I face the same problem . Who can tell me how to solve it? Thans in advance!!!!!!!!!!!!!
cpiyush cpiyush

Jack,

Here is the way I solved it.

If we are running our program on a proxy network, then we need to make the proxy settings (which I did before facing this problem) in the program.

Then I used 'wireshark' software to check (network traffic) that on which IP my program was sending the request for logging into SF, there I found that my system was sending request to proxy server and that proxy server was blocking that request and it's response from the SF server. From here I got all the SF's IP on which my program was making the calls.

To get rid of this, I simply asked my system administrator to bypass these IPs from proxy, and to provide a direct access over those set of IPs.

After that my program worked !!

Hope this will help you.

- Piyush.

jack_lincon_zhu jack_lincon_zhu
Thanks a lot. Your advice is very helpful for me .
I also have some differences with you .
In the following I describe our network environment in detail.
Our proxy server is located in Australia. But our office is in Shanghai China.
All of accessing to internet is through the proxy server in Australia.
We can log  on Salesforce  using IE browser and firefox browser. But when we access salesforce through the webservice API published by salesforce,then
we find the error. And When I ask our system administrator about the IPs to Salesforce. he told me that He has opened the Ip to salesforce.If he hasn't open the IP,I can't access salesforce crm
through IE. I want to know the differences between the Ips of IE and the IPs of WebService API. and what should I do for solving the problem. In addition ,Whether exists another way to access salesforce  throught WebService API.
For example if we can access salesforce through HTTP protocol not HTTPS,I think we will not face the problem.
cpiyush cpiyush

Jack,

The problem is exactly the same in both of our cases.

I could also access SF's waebsite through browser, before my network admin opened the IPs for SF.

But interaction with SF through a program is like a two-way communication in which Our program and SF's server send-n-receive message-data and acknowledgements. so if we do this with a proxy server in between, this communication creates some problems.

I would suggest you to install 'wireshark' or some other network traffic analyzer to check which IPs your program is calling. And ask your admin to bypass those IPs from proxy. Everything wshould work then.

Meanwhile, I will also post the IPs we are calling for making web-service calls to SF's server. (Don't know will they work for you or not).

Also the location of proxy server doesn't matter, I don't know yet where my proxy server is placed... in India or US... :)

jack_lincon_zhu jack_lincon_zhu

Cpiyush:

Thanks a lot.I think I know how to solve this confused problem with you help.Thanks again.I hope you kan email me the IPs list you have ,if you can. I think they will be helpful for me.my email is jack@celnet.com.cn
I also want to make friends with you. My name is Jack Zhu. Everyone call me jack.

My msn ID is zhufeng198647@live.cn .
I believe we can exchange our ideas about SF with each other. Thank you again.

Jack

Ali_Bhai Ali_Bhai

Hi Jack, I also facing the similar issue. Did you resolved this issue.

Please help me.

Thanks,

Ali

kannan.pasupathy kannan.pasupathy

Hi,

I also faced the same problem but I was able to solve it. Not sure whether the same solution could be applicable for everyone. While sending the proxy username and password, I had sent it as base64 encoded. Later when I had sent it as plain text, it started working properly. Hope this helps some one.

Thanks!
Kannan Pasupathy