cancel
Showing results for 
Search instead for 
Did you mean: 

Connection Refused in Message mapping

Former Member
0 Kudos


Hi Experts,

We had a requirement to extract data from exchange rates URL and post it to ECC.

For this we are using  a UDF to connect to the URL and extract the data in the message mapping.

We implemented new firewall rules for dev, quality and prod with help of network team to establish connection between SAP PI systems and external URL.

This is working fine and we are able to connect and extract data in our dev and Quality system.

Recently we moved the code to prodcution and we get connection refused error in message mapping.

We provided the ip address of the systems for the firewall rule. Network team provided the log where there is entry for prodcution ip to connect with the URL ip.

But still we are not able to connect from prodcution and message is failing. It is still working in dev and quality.

Can you please throw some pointers on this. Will there be any extra protection for prodcution system?

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

Hi Pavi,

Can you confirm from destination end,whether they have allowed your IP to talk to there server.

Regards

Naveen

Former Member
0 Kudos

It is same destination being used for all systems (dev,QA & prod).

There is no restrictions from the target end.

We did proxy bypass also between the PI prodcution and target url.

Still no luck.

iaki_vila
Active Contributor
0 Kudos

Hi Pavi,

What kind of lookup are you using in the message mapping, SOAP, RFC?. Check the connection parameters are the rights for the production environment.

Regards,

Former Member
0 Kudos

This the UDF used for the extractign the XML from the external link

try{

        URL url = new URL("<Ex rate URL>");

        URLConnection yc = url.openConnection();

        BufferedReader in = new BufferedReader(new InputStreamReader(

                                    yc.getInputStream()));

        String inputLine;

        while ((inputLine = in.readLine()) != null) {

            output = output + inputLine;

        }
        in.close();

        } catch (Exception e){

Error log from test tab in message mapping:

Start of test 

  •   Document start
  •   Start tag [<>]
  •   Add raw attribute [ xmlns:ns1="<>"]
  •   Connection refused
  •   Start tag [Output]
  •   Put value []
  •   Close tag [Output]
  •   Close tag [<>]
  •   Document end

Executed successfully

End of test

Former Member
0 Kudos

Hi,

What is the error you are getting  ?

Thanks,

Sudhansu

Former Member
0 Kudos

Connection refused while calling the external URL.

Harish
Active Contributor
0 Kudos

Hi,

Please check if there is extra security layer for production web service. like certificate etc.

regards,

Harish