Service Virtualization

 View Only
  • 1.  Mule Soft Endpoint for REST API calls - Getting UnknownHostException

    Posted Nov 15, 2023 07:21 AM

    Hi Team,

    Recently we have been provided with mulesoft endpoint for the REST API calls. The skeleton of the Endpoint URL is as below, 

    {{Endpoint_Rest_Protocol}}://{{FTM_Username}}:{{FTM_Password}}@{{Endpoint_Rest}}/ab/cde/addcustomer/

    https://restapi-latest-link.bank-iob.com/paymentproxy-iob-sit

    {{Endpoint_Rest_Protocol}} - https

    {{Endpoint_Rest}} - restapi-latest-link.bank-iob.com/paymentproxy-iob-sit

    No Port number available.

     Resource section -  /ab/cde/addcustomer/

    When I use this endpoint it gives me ,

    ----------------------------------------------------------------------------
    | Message:     java.net.UnknownHostException: restapi-latest-link.bank-iob.com%2Fpaymentproxy-iob-sit
    ----------------------------------------------------------------------------
    | Trapped Exception: restapi-latest-link.bank-iob.com%2Fpaymentproxy-iob-sit
    | Trapped Message:   java.net.UnknownHostException: restapi-latest-link.bank-iob.com%2Fpaymentproxy-iob-sit
    ----------------------------------------------------------------------------
    STACK TRACE
    java.net.UnknownHostException: restapi-latest-link.bank-iob.com%2Fpaymentproxy-iob-sit

    When I use the same format in SOAPUI and check it manually, it works fine . But in CA Devtest it is not accepting the Endpoint . 

    can someone please help me as what has went wrong in the mule soft REST API endpoint. 

    Your help is much appreciated. 

    Note : The URL provided above, is fabricated with the same format for posting it in public form and not the exact original endpoint . 



    ------------------------------
    Shalini Murukes
    ------------------------------


  • 2.  RE: Mule Soft Endpoint for REST API calls - Getting UnknownHostException

    Posted Nov 16, 2023 06:58 AM

    The issue which I had mentioned above is fixed. But getting SocketException now, can anyone please assist.

    {{Endpoint_Rest}} - restapi-latest-link.bank-iob.com/paymentproxy-iob-sit

    I had paced the section 'paymentproxy-iob-sit' in the endpoint Rest tab, which was NOT correct. So I removed it and placed it in the resource tab.

    Gave the proper SSL certificate in the local.properties file. Now I get a different error, which is 

    | HTTP
    ============================================================================
    | Step:        AddCustomer
    ----------------------------------------------------------------------------
    | Message:     java.net.SocketException: Connection reset by peer: socket write error
    ----------------------------------------------------------------------------
    | Trapped Exception: Connection reset by peer: socket write error
    | Trapped Message:   java.net.SocketException: Connection reset by peer: socket write error
    ----------------------------------------------------------------------------
    STACK TRACE
    java.net.SocketException: Connection reset by peer: socket write error




  • 3.  RE: Mule Soft Endpoint for REST API calls - Getting UnknownHostException

    Posted Nov 16, 2023 07:07 AM

    Stack trace below for reference:

    STACK TRACE
    java.net.SocketException: Connection reset by peer: socket write error
        at java.net.SocketOutputStream.socketWrite0(Native Method)
        at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:111)
        at java.net.SocketOutputStream.write(SocketOutputStream.java:155)
        at sun.security.ssl.OutputRecord.writeBuffer(OutputRecord.java:431)
        at sun.security.ssl.OutputRecord.write(OutputRecord.java:417)
        at sun.security.ssl.SSLSocketImpl.writeRecordInternal(SSLSocketImpl.java:879)
        at sun.security.ssl.SSLSocketImpl.writeRecord(SSLSocketImpl.java:850)
        at sun.security.ssl.SSLSocketImpl.writeRecord(SSLSocketImpl.java:720)
        at sun.security.ssl.Handshaker.sendChangeCipherSpec(Handshaker.java:1144)
        at sun.security.ssl.ClientHandshaker.sendChangeCipherAndFinish(ClientHandshaker.java:1333)
        at sun.security.ssl.ClientHandshaker.serverHelloDone(ClientHandshaker.java:1243)
        at sun.security.ssl.ClientHandshaker.processMessage(ClientHandshaker.java:373)
        at sun.security.ssl.Handshaker.processLoop(Handshaker.java:1037)
        at sun.security.ssl.Handshaker.process_record(Handshaker.java:965)
        at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:1064)
        at sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1367)
        at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1395)
        at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1379)
        at org.apache.http.conn.ssl.SSLSocketFactory.connectSocket(SSLSocketFactory.java:535)
        at org.apache.http.conn.ssl.SSLSocketFactory.connectSocket(SSLSocketFactory.java:403)
        at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:177)
        at org.apache.http.impl.conn.ManagedClientConnectionImpl.open(ManagedClientConnectionImpl.java:304)
        at org.apache.http.impl.client.DefaultRequestDirector.tryConnect(DefaultRequestDirector.java:611)
        at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:446)
        at org.apache.http.impl.client.AbstractHttpClient.doExecute(AbstractHttpClient.java:863)
        at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:72)
        at com.itko.lisa.test.CommTrans.doSend(CommTrans.java:1082)
        at com.itko.lisa.test.CommTrans.send(CommTrans.java:851)
        at com.itko.lisa.test.CommTrans.sendPOST(CommTrans.java:811)
        at com.itko.lisa.ws.rest.RESTNode.doSend(RESTNode.java:226)
        at com.itko.lisa.ws.rest.RESTNode.doWebTrans(RESTNode.java:171)
        at com.itko.lisa.ws.rest.RESTNodeBase.execute(RESTNodeBase.java:380)
        at com.itko.lisa.test.TestNode.executeNode(TestNode.java:995)
        at com.itko.lisa.test.TestCase.execute(TestCase.java:1297)
        at com.itko.lisa.test.TestCase.execute(TestCase.java:1198)
        at com.itko.lisa.test.TestCase.executeNextNode(TestCase.java:1183)
        at com.itko.lisa.utils.ExecSubProcessNode.doFullExec(ExecSubProcessNode.java:354)
        at com.itko.lisa.utils.ExecSubProcessNode.execute(ExecSubProcessNode.java:268)
        at com.itko.lisa.test.TestNode.executeNode(TestNode.java:995)
        at com.itko.lisa.test.TestCase.execute(TestCase.java:1297)
        at com.itko.lisa.test.TestCase.execute(TestCase.java:1198)
        at com.itko.lisa.test.TestCase.executeNextNode(TestCase.java:1183)
        at com.itko.lisa.editor.WalkThruPanel.prepAndExecNode(WalkThruPanel.java:1120)
        at com.itko.lisa.editor.WalkThruPanel.access$900(WalkThruPanel.java:73)
        at com.itko.lisa.editor.WalkThruPanel$10.doCallback(WalkThruPanel.java:1022)
        at com.itko.util.swing.panels.ProcessingDialog$2.run(ProcessingDialog.java:195)
        at java.lang.Thread.run(Thread.java:748)
    ============================================================================




  • 4.  RE: Mule Soft Endpoint for REST API calls - Getting UnknownHostException

    Broadcom Employee
    Posted Dec 04, 2023 12:59 PM

    Shalini,  is the issue similar to the one you have posted here:  https://community.broadcom.com/enterprisesoftware/discussion/mule-soft-endpoint-for-rest-api-call-with-ssl-certificate-javanetsocketexception-connection-reset-by-peer-socket-write-error#bm3e393c41-9365-4cd4-a88a-98f8347a99b1