Issue with service callout to endpoint with 2 way ssl

Not applicable

Hi,

I am observing a weird behavior.

I have a service callout to an endpoint with 2way ssl enabled. I have done all configurations mentioned at http://apigee.com/docs/api-services/content/configuring-ssl-edge-backend-service

When I hardcode the URL in the policy, it goes through.

But when I get the URL from KVM in an earlier policy and use a variable in the service callout policy, it doesnt work. I get the following error:

{

  • "fault": {
    • "faultstring": "Execution of ServiceCallout Callout-crypt failed. Reason: eof unexpected",
    • "detail": {
      • "errorcode": "steps.servicecallout.ExecutionFailed"

      }

    }

}

The trace log seems fine and the variable is getting replaced.

0 11 1,946
11 REPLIES 11

Not applicable

Can you please paste you service callout policy. That will help debugging this issue.

Not applicable

Please find the service callout xml below -

targetHostname comes from KVM. But when hardcoded, it works.

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<ServiceCallout async="false" continueOnError="false" enabled="true" name="Callout-crypt">
    <DisplayName>Callout crypt</DisplayName>
    <Properties/>
    <Request>
        <Set>
          <Verb>POST</Verb>
          <Payload contentType="application/json" variablePrefix="@" variableSuffix="#">
            {"plainText":"@number#"}
          </Payload>
          <Headers>
            <Header name="Authorization">{cryptAuthorization}</Header>
            <Header name="Accept">application/json</Header>
          </Headers>
        </Set>
    </Request>
    <Response>cryptResponse</Response>
    <HTTPTargetConnection>      
      <URL>https://{targetHostname}/crypt/</URL>
      <SSLInfo>
        <Enabled>true</Enabled>
        <ClientAuthEnabled>true</ClientAuthEnabled>
        <KeyStore>myKeyStore</KeyStore>
        <KeyAlias>myKeyAlias</KeyAlias>
      </SSLInfo>	  
    </HTTPTargetConnection>
</ServiceCallout>

In your trace window - you see the value of {targetHostname} replaced correctly?

Yes, the service callout url is getting created correctly.

Can you share your proxy bundle with just minimal information to simulate the issue?

Not applicable

Hi @jaskaran.rm , is this on cloud or on-premise ?

If on-premise can you check the system.logs or the tcp dump to find more information ?

I have seen the same fault raised when there was EOF exception during the SSL handshake . You said when hardcoded it works , Is that consistently working and when passing as a variable does it consistently break ? See if you can test with couple of requests in both the cases ?

Hi @Maruti Chand, This is on cloud.

I tried a few times, as I couldnt understand the reason aswell. Tried 4-5 times by redeploying and this was happening consistently.

You should request for system.logs to get more details on the exception .

Not applicable

Hi,

I am also facing the same issue Service Call out

Is this solved yeT

There have been lots of updates and fixes applied to the apigee runtime in the. past 7-8 years.

If you are having a current problem, maybe you could post a new thread and describe

  • what you are trying (your configuration, etc)
  • what you are seeing (the results you are observing, and how you are observing them)
  • what you are expecting to see