HTTP Connection to External Server

Hi,
I had some problem with my RFC connection on SM59.
I get this error ICM_HTTP_SSL_ERROR.
I get this error forn dev_icm file
= Success -- SapCryptoLib SSL ready!
Thr 3964
Thr 3964 Started service 443 for protocol HTTPS on host "sapehd1.ssi.ad"(on all adapters) (processing timeout=60, keep_alive_timeout=30)
Thr 3964 Started service 25025 for protocol SMTP on host "sapehd1.ssi.ad"(on all adapters) (processing timeout=60, keep_alive_timeout=30)
Thr 3964 Tue Jun 15 00:00:02 2010
Thr 3964 *** WARNING => IcmNetCheck: NiHostToAddr(www.doesnotexist.qqq.nxst) took 5 seconds http://icxxman.c 4586
Thr 3964 Tue Jun 15 00:00:07 2010
Thr 3964 *** WARNING => IcmNetCheck: NiAddrToHost(10.0.0.1) took 5 seconds http://icxxman.c 4606
Thr 3964 *** WARNING => IcmNetCheck: 2 possible network problems detected - please check the network/DNS settings http://icxxman.c 4662
Thr 5520 Tue Jun 15 00:01:07 2010
Thr 5520 *** ERROR during SecudeSSL_SessionStart() from SSL_connect()==SSL_ERROR_SSL
Thr 5520 session uses PSE file "D:\usr\sap\EHD\DVEBMGS00\sec\SAPSSLDIBS.pse"
Thr 5520 SecudeSSL_SessionStart: SSL_connect() failed --
secude_error 9 (0x00000009) = "the verification of the server's certificate chain failed"
Thr 5520
Begin of Secude-SSL Errorstack
Thr 5520 ERROR in ssl3_get_server_certificate: (9/0x0009) the verification of the server's certificate chain failed
ERROR in af_verify_Certificates: (24/0x0018) Chain of certificates is incomplete : "OU=VeriSign Trust Network, OU="(c) 1998 VeriSign, Inc. - For authorized use only", OU=Class 3 Public Primary Certification Authority - G2, O="VeriSign, Inc.", C=US"
ERROR in get_path: (24/0x0018) Can't get path because the chain of certificates is incomplete
Thr 5520 <<
End of Secude-SSL Errorstack
Thr 5520 SSL_get_state() returned 0x00002131 "SSLv3 read server certificate B"
Thr 5520 SSL NI-sock: local=192.168.42.112:4581 peer=85.236.67.2:443
Thr 5520 <<- ERROR: SapSSLSessionStart(sssl_hdl=0000000002F34BB0)==SSSLERR_SSL_CONNECT
Thr 5520 *** ERROR => IcmConnInitClientSSL: SapSSLSessionStart failed (-57): SSSLERR_SSL_CONNECT http://icxxconn.c 2012
Any help
Thanks

Hi,
I had some problem with my RFC connection on SM59.
I get this error * ICM_HTTP_SSL_ERROR. I get this error forn dev_icm file *
= Success -- SapCryptoLib SSL ready!
Thr 3964 ================================================= Any help Thanks
Thr 3964 Started service 443 for protocol HTTPS on host "sapehd1.ssi.ad"(on all adapters) (processing timeout=60, keep_alive_timeout=30)
Thr 3964 Started service 25025 for protocol SMTP on host "sapehd1.ssi.ad"(on all adapters) (processing timeout=60, keep_alive_timeout=30)
Thr 3964 Tue Jun 15 00:00:02 2010
Thr 3964 *** WARNING => IcmNetCheck: NiHostToAddr(www.doesnotexist.qqq.nxst) took 5 seconds http://icxxman.c 4586
Thr 3964 Tue Jun 15 00:00:07 2010
Thr 3964 *** WARNING => IcmNetCheck: NiAddrToHost(10.0.0.1) took 5 seconds http://icxxman.c 4606
Thr 3964 *** WARNING => IcmNetCheck: 2 possible network problems detected - please check the network/DNS settings http://icxxman.c 4662
Thr 5520 Tue Jun 15 00:01:07 2010
Thr 5520 *** ERROR during SecudeSSL_SessionStart() from SSL_connect()==SSL_ERROR_SSL
Thr 5520 session uses PSE file "D:\usr\sap\EHD\DVEBMGS00\sec\SAPSSLDIBS.pse"
Thr 5520 SecudeSSL_SessionStart: SSL_connect() failed --
secude_error 9 (0x00000009) = "the verification of the server's certificate chain failed"
Thr 5520 >>
Begin of Secude-SSL Errorstack
>>
Thr 5520 ERROR in ssl3_get_server_certificate: (9/0x0009) the verification of the server's certificate chain failed
ERROR in af_verify_Certificates: (24/0x0018) Chain of certificates is incomplete : "OU=VeriSign Trust Network, OU="(c) 1998 VeriSign, Inc. - For authorized use only", OU=Class 3 Public Primary Certification Authority - G2, O="VeriSign, Inc.", C=US"
ERROR in get_path: (24/0x0018) Can't get path because the chain of certificates is incomplete
Thr 5520 <<
End of Secude-SSL Errorstack
Thr 5520 SSL_get_state() returned 0x00002131 "SSLv3 read server certificate B"
Thr 5520 SSL NI-sock: local=192.168.42.112:4581 peer=85.236.67.2:443
Thr 5520 <<- ERROR: SapSSLSessionStart(sssl_hdl=0000000002F34BB0)==SSSLERR_SSL_CONNECT
Thr 5520 *** ERROR => IcmConnInitClientSSL: SapSSLSessionStart failed (-57): SSSLERR_SSL_CONNECT http://icxxconn.c 2012
Any help
Thanks

Similar Messages

  • Errors with HTTPS Connection to external server

    I am trying to establish a HTTPS connection to an external web site in transaction SM59,  but I get “ICM_HTTP_CONNECTION_FAILED” errors.  I get the same errors from a bespoke ABAP program.
    I know the request is getting to the web site, but the response is not getting back into SAP. 
    This is not firewall related.
    I have installed and configured the SAPCRYPTOLIB software for SSL support and entered the necessary instance profile parameters.
    I have configured STRUST.
    SM59 is setup for type G (HTTP Connection to Ext. Server) and port no. 8443
    I have started the HTTPS service in SMICM
    I have noticed an odd entry in the SCICM trace file,  but don’t know how to fix.
    <i>ERROR => Connection request from (-1/65535/0) to host: mms-sap.sapmms.com, service: 8000 failed (NIECONN_PENDING)</i>
    Does anyone have any suggestions?

    Thanks for your comments.
    I've tried everything in SM59. 
    SAP refers to both protocols as HTTP. 
    I think the error is with the response coming back into SAP.  SAP doesn't know what to do.  It might be DNS related or I might need to configure the ICM somewhere.  Oddly the response comes back into sap on port 8000 (which is HTTP).  It went out on port 8443 (which is HTTPS).

  • Message via SM59 "HTTP connection to external partner" not sent to partner

    I have a scenario where I am supposed to send a message to an external partner using https. I have created the HTTP connection in SM59 "HTTP connection to external server" and selected the default certificate. This connection is referenced in the http receiver CC in PI 7.1, but when I send the iDoc message from the backend it is not sent out of PI to the external partner.
    There are no apparent errors in the trace files in SMICM on the PI system, but our firewall guys say, that they cannot see the outgoing call in our firewall and the external partner cannot see the message either.
    There is connection to the external server from the PI server, which has been confirmed by a telnet connection.
    We think that there might be a problem on our web server, but we are not sure.
    We have previously succeeded in calling an other server at the external partner from the PI system using a different client certificate. When we do a connection test in SM59 we get an error 500 but the external partner can see the GET request in their firewall.
    Any suggestions are more than welcome
    MIkael

    The error message appears in the call adapter pipeline step before the supposed mapping is supposed to take place. The error message is:
    <?xml version="1.0" encoding="UTF-8" standalone="yes" ?><!-- Call Adapter --> <SAP:Error xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" SOAP:mustUnderstand=""><SAP:Category>XIAdapter</SAP:Category><SAP:Code area="PLAINHTTP_ADAPTER">ATTRIBUTE_CLIENT</SAP:Code><SAP:P1>400</SAP:P1><SAP:P2>ICM_HTTP_CONNECTION_FAILED</SAP:P2><SAP:P3/><SAP:P4/><SAP:AdditionalText/><SAP:Stack>HTTP client code 400 reason ICM_HTTP_CONNECTION_FAILED
    </SAP:Stack><SAP:Retry>A</SAP:Retry></SAP:Error>
    Mikael

  • Error while connecting to external server through SOAP/HTTP adapter

    Hi,
    we are trying to connect to the external server through SOAP adapter. The scenario is proxy to SOAP asynchronous scenario.
    We are getting following error in Communication channel monitoring:
    *Message processing failed. Cause: com.sap.aii.af.ra.ms.api.RecoverableException: SOAP: response message contains an error Application/UNKNOWN/APPLICATION_ERROR - application fault*
    We also tried HTTP adapter in the receiver side. But it is giving red flag in SXMB_MONI with following error:
      <?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
    - <!--  Call Adapter
      -->
    - <SAP:Error xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" SOAP:mustUnderstand="">
      <SAP:Category>XIAdapter</SAP:Category>
      <SAP:Code area="PLAINHTTP_ADAPTER">ATTRIBUTE_SERVER</SAP:Code>
      <SAP:P1>500</SAP:P1>
      <SAP:P2>Internal Server Error</SAP:P2>
      <SAP:P3>Internal Server Error</SAP:P3>
      <SAP:P4 />
      <SAP:AdditionalText />
      <SAP:ApplicationFaultMessage namespace="" />
      <SAP:Stack>HTTP server code 500 reason Internal Server Error explanation Internal Server Error</SAP:Stack>
      <SAP:Retry>M</SAP:Retry>
      </SAP:Error>
    Please help.
    Thanks in advance.
    Regards,
    sriparna

    Make sure that the receiver webservice is up and running and in a state to receive the external calls. Confirm if the data you send is as per the requirement of the webservice and they haven't changed anything at their end.
    Regards,
    Prateek

  • How to auto-connect to external server upon startup?

    Is there a way that a user could by-pass "Connect to Server" and have the workstation auto-connect to an external, but in-house server each time the work-station is booted up? Also, is there a way to have it connect to this server without having to enter a password each time? Thanks in advance.

    Is there a way that a user could by-pass "Connect to
    Server" and have the workstation auto-connect to an
    external, but in-house server each time the
    work-station is booted up?
    after you mount the share, drag the icon to sys pref -> accoutns -> login items
    Also, is there a way to
    have it connect to this server without having to
    enter a password each time? Thanks in advance.
    use apple+k to connect to the share, enter the share name as:
    smb://your-user-name@server/share
    keychain should remember the password for you.

  • How to connect to external server using router from VLAN's

    Hi, I am newbie. I am trying to build network system in Packet Tracer.
    Now I have such network layout.
    I have different VLAN's Accounting and Sales. I have configured this using subinterface in router to allow computers from different vlan's communicate with each other. Everything works.
    Let's assume that there are next subnets and VLAN's. Acct. VLAN (2) (ip's 172.168.0.1-172.168.0.254/24) and Sales VLAN (4) (ip's 172.168.1.1-172.168.1.254/24).
    But I need to connect all this computers to the external server.  That has ip , for instance 192.168.20.13/24. Like this.
    I don't know hot to correctly configure router to make it possible for computers to connect to this server. I have connected switch to the another router interface. And than connected server to the switch and specified ip 192.168.20.13/24. Than I tried to set ip to the router interface from the same subnet like 192.168.20.22/24. So now router can communicate with server.
    But how to allow computers to communicate with the server. Please help. I am newbie.
    I would be grateful for any help.

    Hi Androgen,
    One question for you..How does the sales VLAN computers communicate with the accounting VLAN machines? It's through the inter-VLAN routing that you have already setup.
    Communicating to the external server is also similar to this.
    The computer's in the VLAN should be configured with the default gateway IP which is the the L3 sub-interface IP for that subnet.
    Also, the external server needs to have a default gateway to communicate with other remote subnet. The default gateway of that server would be 192.168.20.22 which is the L3 interface for your external subnet.
    CF

  • IPad issue when connecting to external server on 8.81 PL03

    This thread is split off from "Extenally connection for the i-phone or i-pad. "
    The issue is that the iPad fails to connect to an external server, while it did so successfully to a server on an ad hoc network setup.
    In Integration Framework page -> Monitoring -> Authent. Monitor I only see feedback on the sap.Xcelsius scenario - again it says the info is from 8080 (while B1mobile is on port 8443, since Enforce Secure Transport = True for sap.B1Mobile?)
    The attemps by the iPad to login only shows in the B1authcheck log. I have confirmed the time stamps.
    I compared this unsuccessful log entry to my successful ad hoc network's log entry and it seems to break here:
    "#177765 --- 2011-03-26T11:58:14, millis=1301165894004
    Level CONFIG
    Logger com.sap.b1i.bizprocessor
    Class/Method com.sap.b1i.bizprocessor.BPLogger, log
    Thread 9422
    BPC141 XSL-stylesheet to execute: bizstore:/com.sap.b1i.vplatform.scenarios.authen/sap.B1Mobile/Authenticate1.xsl
    #177768 --- 2011-03-26T11:58:14, millis=1301165894004
    Level INFO
    Logger com.sap.b1i.dblayer
    Class/Method com.sap.b1i.dblayer.DBLayer$DBConnection, logP
    Thread 9422
    DBL012 DBConn.#65 Did an explicit DB-Rollback at point java.lang.Throwable
    at com.sap.b1i.dblayer.DBLayer$DBConnection.Rollback(DBLayer.java:215)..."
    I have tried connecting both via 3G and with the iPad connected to local Wifi.
    SAP is 8.81 PL3 with the B1iC that ships with the patch. The iPad is running the 1.1.1 app.  Secure Transport is enforced (i.e. SSL is ON and port 8443 is in use)
    Any insight will be appreciated!
    Edited by: Maria Trinidad MARTINEZ GEA on Mar 28, 2011 2:38 PM

    Hi Frank,
    The SQL password was in the format Xxxxxx! - with '!' being the offending character.
    As a consequence of changing the password, I had to reinstall B1iC (I could not figure out how to get it to use the new password otherwise).  Given that I reinstalled B1iC a few times in the preceding 20 hours' process of elimination, I don't think the reinstallation itself triggered sap.B1mobile into suddenly working.
    Which leaves me to conclude that it was the '!' in the SQL sa password.
    I am glad to hear that it supports special characters (elsewhere) now
    I'd like to suggest to anybody having problems to install it in as simple an environment as possible, and to add layers of complexity (firewalls, special characters, etc.) only after you get it working.  There is little documentation for this process, which makes it challenging to troubleshoot from the top down.

  • Need Help Connecting to External Server

    Hello,
    I installed FMS 2.0 on a server that i have and i'm trying to
    connect to it from a local swf file. I have no idea how to
    reference the Media Server. Is it by IP? Do I need to set up
    something additionally on the server like in IIS? I'm totally
    clueless. Any advice or point in the right direction would be
    greatly appreciated.
    Here is what i'm trying to do...
    var nc:NetConnection = new NetConnection();
    nc.onStatus = function (info)
    trace(info.code);
    if (info.code == "NetConnection.Connect.Success")
    trace("connection successful");
    nc.connect("rtmp://SERVERIP/simpleconnect");
    how do I reference the remote flash media server?
    Thanks in advance?

    You need to have an application directory on FMS - just
    create a subdirectory in the FMS_ROOT/applications directory, name
    it "test". Then change your client code to connect to
    rtmp://server.domain.com/test (or
    rtmp://server.ip.address/test - ip or server name should not
    matter)
    hth

  • Using SSL Module to Encrypt HTTP post to external Server

    I would like to know if it's possible for a CSM with its SSL module to receive an HTTP POST from our internal web servers, encrypt that POST w/ SSL, and finally to forward the newly created SSL transmission to a remote external SSL server? If it is possible, is this good practice or is it better to let the web server do the encryption?

    this is possible.
    It is good practice if you do not want to overload your server with the heavy task of encryption/decryption.
    If your server is very powerfull and far from being used to its maximum capacity, you can do it on the server.
    Another advantage of using an SSL module is that the CSM will see your request in clear text and can therefore perform so *smart* loadbalancing before it gets encrypted by the SSL module.
    [ie: cookie stickyness, url hashing, ...]
    Regards,
    Gilles.

  • Network adapter could not establish a connect from external server

    hi,
    I've set up a jdbc thin driver properly using
    the following input:
    "jdbc:oracle:thin:@ipaddress:1521:DBname",
    "username", "password"
    When outside users try to connect externally (outside the network) there is a different ipaddress. Although they are able to ping,
    telnet, run jsp etc... using the external address, they get the following error when they try the thin driver connection:
    i/o exception: network adapter could not establish a connection
    They change the ipaddress in the connection string to match the external ip. We are using oracle 8i, JRun on Linux. I have a feeling it has something to do with the tnsnames.ora file but I can't be sure.
    Any ideas?
    Thanks in advance!

    this is expected behavior ...
    the jdbc thin driver requires the use of an ip address that the calling program has acces to ...
    internally you have one ip address exposed.
    apparently you have another ip address set up for the external customer.
    fyi
    jdbc thin driver don'ts use the tnsnames.ora file -- they use "host:port:sid" because they are required to be platform independent and not access local datafiles or environment variables on the execution platform.
    jdbc oci drivers do use tnsnames.ora which provides the host:port:sid info in their entries.

  • Trouble connecting to external server with 10.9.2

    So despite all my complaints about Mavericks 10.9 and 10.9.1, I was at least able to mount my GoDaddy server on the disk. Although whenever I restarted the computer, I had to run the mounting program/script again.
    But now, with 10.9.2 it has stopped working! This is especially infuriating because one of the supposed benefits of the update is this:
    > Improves reliability when connecting to a file server using SMB2
    So much for that.
    Has anyone else had this problem and/or found a solution?
    When it tries to run, these are the error messages I get (one after the other):

    I'm not aware of anything special you should need to do. The only factor that immediately springs to mind is the encoding, of user name or password. Do you have any message from the cloud server that explains what problem it is having?

  • HTTP Connection For Proxies

    Hi all,
    Can anyone explain me how to create the http connection in SM59.
    Here iam getting a status error as HTTP_CONNECTION_FAILED
    here my scenario is File to Proxy
    Suggest me where i have to make this connection means in XI or SAP system regarding this scenario (file to proxy)?
    Any suggestions.
    thanx,
    krishna.

    Hi Krishna,
    When you create a RFC in SM59 provide/check the following info
    Provid the RFC destination
    Provide connection type as G HTTP connection to external server
    In description tab provide at least one description
    In technical settings provide target host name and provide service no then provide the path prefix
    Leave the  HTTP proxy options empty
    In Logon&Security tab choose basic authentication in logon procedure
    In Status of Secure Protocol choose SSL as Inactive then choose SSL Client Certificate as DEFAULT SSL Client(standard)
    In Special Options tab choose and set Specify time out 900 msec
    In HTTP Settings choose HTTP 1.0
    Compression Status choose as inactive
    Choose compression status inactive then choose compressed response as YES
    In HTTP Cookies choose Accept Cookies choose NO
    Save the connection and do a test connection it will prompt for Response from Web Server Contains Cookies Accept?  Accept all further cookies tick the box and say YES
    If you still have problem please paste the error.
    You can refer the XI trouble shooting doc at https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/bd5950ff-0701-0010-a5bc-86d45fd52283
    Cheers,
    Shyam

  • HTTPS connection from portal to external webserver

    Hi,
    I am looking for a way to open a HTTPS connection from portal server to an external webserver. According to <a href="http://help.sap.com/saphelp_nw04/helpdata/en/e2/71c83edf72e16be10000000a114084/content.htm">SAP</a> the code should look like
    KeyStore keystoreCAs = ...
    SecureConnectionFactory factory = new SecureConnectionFactory(keystoreCAs, null);
    HttpURLConnection con = factory.createURLConnection("https://www.mycompany.com");
    Does not look difficult, <b>but how do I create the keystore object</b>? The keystore object should somehow be connected to the portal server's keystore which manages the certificates of trusted Certificate Authorities.
    Any ideas?
    Regards,
    Martin

    Hi,
    meanwhile I solved the problem by my own. The solution slightly simplified is given below.
    javax.naming.InitialContext ctx = new javax.naming.InitialContext();
    java.lang.Object o = ctx.lookup("keystore");          
    com.sap.engine.services.keystore.interfaces.KeystoreManagerWrapper_Stub manager = (com.sap.engine.services.keystore.interfaces.KeystoreManagerWrapper_Stub) o;
    java.security.KeyStore keystoreCAs = manager.getKeystore("TrustedCAs");     
    com.sap.security.core.server.https.SecureConnectionFactory factory = new SecureConnectionFactory(keystoreCAs, null);
    java.net.HttpURLConnection con = factory.createURLConnection("https://www.mycompany.com");
    For connecting via a proxy the host name and port number of the proxy have to be set as System properties using "https.proxyHost" and "https.proxyPort".
    java.util.Properties systemSettings = System.getProperties();
              systemSettings.put("proxySet", "true");
              systemSettings.put("https.proxyHost","192.168.0.1") ;
              systemSettings.put("https.proxyPort", "80") ;
    Additionally you have to make sure that the server's certificate is issued by a trusted Certification Authority (Must have an entry in your Keystore "TrustedCAs"). To verify this use the Visual Administrator and view service "Key Storage".
    Regards,
    Martin

  • Error connecting KM system to external server.

    Hello All,
    I am trying to connect to an external server from Portal (KM system - webDAV)
    can any one help me in resloving the below error
    Error
    2008-10-27T13:42:15Z: PROPFIND /webdavtest: com.sapportals.wcm.WcmException: sending request to: http://10.aaa.bb.cc/ request uri: /webdav Connection timed out:could be due to invalid address (java.net.SocketException: Connection timed out:could be due to invalid address)
    thanks-
      sk

    Hello Experts.
    I get the following error when connecting to external server from Portal (KM), PROPFIND /webdavtest: 401 Unauthorized. I donu2019t use SSO, i use the option of user mapping in portal and in virtual directory at external, i have not given any user and password.
    I have some questions, which user id and password I need to give when creating an HTTP system in portal, is it required, even if i give the external servers user id and password, it takes some default password.
    Any suggestions are appreciated with points...
    Thanks-
    sk

  • Connection refused when trying to getOutputStream from https connection

    Hi all !
    I want to make an https connection with a server to send/get the request/response
    What can be the cause of the following error in the following code testHttps.java?
    java.net.ConnectException: Connection refused: connect
    at java.net.PlainSocketImpl.socketConnect(Native Method)
    at java.net.PlainSocketImpl.doConnect(Unknown Source)
    at java.net.PlainSocketImpl.connectToAddress(Unknown Source)
    at java.net.PlainSocketImpl.connect(Unknown Source)
    at java.net.SocksSocketImpl.connect(Unknown Source)
    at java.net.Socket.connect(Unknown Source)
    at com.sun.net.ssl.internal.ssl.SSLSocketImpl.connect(Unknown Source)
    at com.sun.net.ssl.internal.ssl.BaseSSLSocketImpl.connect(Unknown Source)
    at sun.net.NetworkClient.doConnect(Unknown Source)
    at sun.net.www.http.HttpClient.openServer(Unknown Source)
    at sun.net.www.http.HttpClient.openServer(Unknown Source)
    at sun.net.www.protocol.https.HttpsClient.<init>(Unknown Source)
    at sun.net.www.protocol.https.HttpsClient.New(Unknown Source)
    at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.getNewHttpClient(Unknown Source)
    at sun.net.www.protocol.http.HttpURLConnection.plainConnect(Unknown Source)
    at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(Unknown Source)
    at sun.net.www.protocol.http.HttpURLConnection.getOutputStream(Unknown Source)
    at sun.net.www.protocol.https.HttpsURLConnectionImpl.getOutputStream(Unknown Source)
    at Test.testHttps.main(testHttps.java:46)
    Exception in thread "main" java.net.ConnectException: Connection refused: connect
    at java.net.PlainSocketImpl.socketConnect(Native Method)
    at java.net.PlainSocketImpl.doConnect(Unknown Source)
    at java.net.PlainSocketImpl.connectToAddress(Unknown Source)
    at java.net.PlainSocketImpl.connect(Unknown Source)
    at java.net.SocksSocketImpl.connect(Unknown Source)
    at java.net.Socket.connect(Unknown Source)
    at com.sun.net.ssl.internal.ssl.SSLSocketImpl.connect(Unknown Source)
    at com.sun.net.ssl.internal.ssl.BaseSSLSocketImpl.connect(Unknown Source)
    at sun.net.NetworkClient.doConnect(Unknown Source)
    at sun.net.www.http.HttpClient.openServer(Unknown Source)
    at sun.net.www.http.HttpClient.openServer(Unknown Source)
    at sun.net.www.protocol.https.HttpsClient.<init>(Unknown Source)
    at sun.net.www.protocol.https.HttpsClient.New(Unknown Source)
    at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.getNewHttpClient(Unknown Source)
    at sun.net.www.protocol.http.HttpURLConnection.plainConnect(Unknown Source)
    at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(Unknown Source)
    at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
    at sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(Unknown Source)
    at Test.testHttps.main(testHttps.java:51)
    testHttps.java
    package Test;
    import java.io.;
    import java.net.;
    import javax.net.ssl.*;
    public class testHttps {
    public static void main(String args[]) throws Exception {
    //System.setProperty("java.protocol.handler.pkgs", "com.sun.net.ssl.internal.www.protocol");
    // Create a trust manager that does not validate certificate chains
    TrustManager[] trustAllCerts = new TrustManager[]{
    new X509TrustManager() {
    public java.security.cert.X509Certificate[] getAcceptedIssuers() {
    return null;
    public void checkClientTrusted(
    java.security.cert.X509Certificate[] certs, String authType) {
    public void checkServerTrusted(
    java.security.cert.X509Certificate[] certs, String authType) {
    // Install the all-trusting trust manager
    try {
    SSLContext sc = SSLContext.getInstance("SSL");
    sc.init(null, trustAllCerts, new java.security.SecureRandom());
    HttpsURLConnection.setDefaultSSLSocketFactory(sc.getSocketFactory());
    } catch (Exception e) {
    System.out.println("Error" e);
    // Now you can access an https URL without having the certificate in the truststore
    try {
    URL url = new URL("https://..............");-->//address of the server given here
    URLConnection conn = url.openConnection();
    HttpsURLConnection urlConn = (HttpsURLConnection) conn;
    urlConn.setDoOutput(true);
    OutputStreamWriter wr = null;
    try{
    wr = new OutputStreamWriter(conn.getOutputStream());
    catch(Exception e){
    e.printStackTrace();
    BufferedReader in = new BufferedReader(new InputStreamReader(urlConn.getInputStream()));
    String str;
    while( (str=in.readLine()) != null) {
    System.out.println(str);
    } catch (MalformedURLException e) {
    System.out.println("Error in SLL Connetion" +e);
    HostnameVerifier hv = new HostnameVerifier()
    public boolean verify(String urlHostName, SSLSession session)
    System.out.println("Warning: URL Host: " urlHostName " vs. "
    session.getPeerHost());
    return true;
    want to ignore certificate validation.
    plese help me..
    hi brucechapman, as you suggested me, i posted in Core API- networking forum, now please gimme a solution
    Thanks in advance.

    hi brucechapman,
    ran the NetTest program, got the following exception:
    trigger seeding of SecureRandom
    done seeding SecureRandom
    Exception in thread "main" java.net.ConnectException: Connection refused: connect
         at java.net.PlainSocketImpl.socketConnect(Native Method)
         at java.net.PlainSocketImpl.doConnect(Unknown Source)
         at java.net.PlainSocketImpl.connectToAddress(Unknown Source)
         at java.net.PlainSocketImpl.connect(Unknown Source)
         at java.net.SocksSocketImpl.connect(Unknown Source)
         at java.net.Socket.connect(Unknown Source)
         at com.sun.net.ssl.internal.ssl.SSLSocketImpl.connect(Unknown Source)
         at com.sun.net.ssl.internal.ssl.BaseSSLSocketImpl.connect(Unknown Source)
         at sun.net.NetworkClient.doConnect(Unknown Source)
         at sun.net.www.http.HttpClient.openServer(Unknown Source)
         at sun.net.www.http.HttpClient.openServer(Unknown Source)
         at sun.net.www.protocol.https.HttpsClient.<init>(Unknown Source)
         at sun.net.www.protocol.https.HttpsClient.New(Unknown Source)
         at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.getNewHttpClient(Unknown Source)
         at sun.net.www.protocol.http.HttpURLConnection.plainConnect(Unknown Source)
         at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(Unknown Source)
         at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
         at sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(Unknown Source)
         at java.net.URL.openStream(Unknown Source)
         at Test.NetTest.main(NetTest.java:40)
    NetTest.java:40 -- InputStream is = url.openStream(); at this ling throwing exception.
    For the following program, i have added the argument -Djavax.net.ssl.trustStore=cacerts
    i have exported the certificate from IE and added to the keystore.
    import java.io.BufferedReader;
    import java.io.IOException;
    import java.io.InputStreamReader;
    import java.io.OutputStreamWriter;
    import java.security.Security;
    import javax.net.ssl.SSLSocket;
    import javax.net.ssl.SSLSocketFactory;
    public class Communicator {
    public static void main(String[] args) {
    try {
    int port = 34443;
         String strReq = "xml content ";
    Security.addProvider(new com.sun.net.ssl.internal.ssl.Provider());
    SSLSocketFactory factory = (SSLSocketFactory) SSLSocketFactory.getDefault();
    SSLSocket socket = (SSLSocket) factory.createSocket("jyoti-win2k8-32", port);
    //Writer out = new OutputStreamWriter(socket.getOutputStream());
    //out.write("GET http://" + "hostname" + "/ HTTP 1.1\r\n");
    // out.write("\r\n");
    //out.write(strReq);
    //out.flush();
    OutputStreamWriter wr = null;
    try{
         wr = new OutputStreamWriter(socket.getOutputStream());
         catch(Exception e){
              e.printStackTrace();
         System.out.println("got output stream");
         try{
         wr.write(strReq);
         //System.out.println("response code : "+conn.getResponseCode());
         System.out.println("written");
         wr.flush();
         catch(IOException e){
              e.printStackTrace();
    InputStreamReader is = new InputStreamReader(socket.getInputStream(),"UTF8") ;
         BufferedReader rd = new BufferedReader(is);
         String line;int count=0;
         System.out.println("rd "+rd);
         while ((line = rd.readLine()) != null) {
              System.out.println("line "+line );
              System.out.println(count++);
              // Process line...
         System.out.println(count);
    rd.close();
    BufferedReader in = new BufferedReader(new InputStreamReader(socket.getInputStream()));
    int c;
    while ((c = in.read()) != -1) {
    System.out.write(c);
    //out.close();
    in.close();
    socket.close();
    } catch(IOException ex) {
    ex.printStackTrace();
    Exception :
    javax.net.ssl.SSLException: java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty
         at com.sun.net.ssl.internal.ssl.Alerts.getSSLException(Unknown Source)
         at com.sun.net.ssl.internal.ssl.SSLSocketImpl.fatal(Unknown Source)
         at com.sun.net.ssl.internal.ssl.SSLSocketImpl.fatal(Unknown Source)
         at com.sun.net.ssl.internal.ssl.SSLSocketImpl.handleException(Unknown Source)
         at com.sun.net.ssl.internal.ssl.SSLSocketImpl.handleException(Unknown Source)
         at com.sun.net.ssl.internal.ssl.AppOutputStream.write(Unknown Source)
         at sun.nio.cs.StreamEncoder.writeBytes(Unknown Source)
         at sun.nio.cs.StreamEncoder.implFlushBuffer(Unknown Source)
         at sun.nio.cs.StreamEncoder.implFlush(Unknown Source)
         at sun.nio.cs.StreamEncoder.flush(Unknown Source)
         at java.io.OutputStreamWriter.flush(Unknown Source)
         at Test.Communicator.main(Communicator.java:55)
    Caused by: java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty
         at sun.security.validator.PKIXValidator.<init>(Unknown Source)
         at sun.security.validator.Validator.getInstance(Unknown Source)
         at com.sun.net.ssl.internal.ssl.X509TrustManagerImpl.getValidator(Unknown Source)
         at com.sun.net.ssl.internal.ssl.X509TrustManagerImpl.checkServerTrusted(Unknown Source)
         at com.sun.net.ssl.internal.ssl.X509TrustManagerImpl.checkServerTrusted(Unknown Source)
         at com.sun.net.ssl.internal.ssl.ClientHandshaker.serverCertificate(Unknown Source)
         at com.sun.net.ssl.internal.ssl.ClientHandshaker.processMessage(Unknown Source)
         at com.sun.net.ssl.internal.ssl.Handshaker.processLoop(Unknown Source)
         at com.sun.net.ssl.internal.ssl.Handshaker.process_record(Unknown Source)
         at com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRecord(Unknown Source)
         at com.sun.net.ssl.internal.ssl.SSLSocketImpl.performInitialHandshake(Unknown Source)
         at com.sun.net.ssl.internal.ssl.SSLSocketImpl.writeRecord(Unknown Source)
         ... 7 more
    Caused by: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty
         at java.security.cert.PKIXParameters.setTrustAnchors(Unknown Source)
         at java.security.cert.PKIXParameters.<init>(Unknown Source)
         at java.security.cert.PKIXBuilderParameters.<init>(Unknown Source)
         ... 19 more
    java.net.SocketException: Socket is closed
         at com.sun.net.ssl.internal.ssl.SSLSocketImpl.getInputStream(Unknown Source)
         at Test.Communicator.main(Communicator.java:66)
    please help me and provide me suggestion/solution. how to get rid off this trustanchor paramater exception
    what is it actualy?
    Thanks in advance.

Maybe you are looking for