cancel
Showing results for 
Search instead for 
Did you mean: 

SFTPException : Error setting socket object: A remote host refused an attempted connect operation.

former_member201275
Active Contributor
0 Kudos

I have a number of SFTP type Config Scenarios all through the same Server and Port and User etc. For some reason I am getting this SFTP exception message for 2 of the Scenarios, for the Sender Channel. It cannot be related to the SFTP connection parameters because the other config scenarios, using the same SFTP parameters are functioning fine.

Any advice as to where I can start looking for issue would be greatly appreciated.

Accepted Solutions (1)

Accepted Solutions (1)

JaySchwendemann
Active Contributor
0 Kudos

Am I understanding correctly that you have say 5 scenarios that all sending from the same SFTP host with the same user and port to your SAP PI? And of those 5 scenarios, 2 are failing?

1. Are they failing constantly or now and then?

2. If I understood correctly, I would have a look at the log of the sender SFTP host. Of course if the host is not at your control, you'll have to talk to the third party controlling the SFTP host.

3. You could also try increasing tracing level at your side or try using XPI Inspector

4. Talking to your networks guys or the third party networks guys (Firewall rules, etc) may also be of some help

Cheers

Jens

former_member201275
Active Contributor
0 Kudos

Hi Jens,

Thank you for reply.

Yes that is correct, it is exaxctly this scenario that is occurring.

These 2 are failing now and then, but mostly all the time... however every now and then I see the Channel is Green and working! Most peculiar.

I am bit new to PI could you let me know how I could go about increasing the trace level for SFTP scenarios, and where to see these traces. Also i will google XPI inspector and see if i can find out how to use this, but if you know the transaction and details for this t would help me also to have this info.
Thanks once again.

JaySchwendemann
Active Contributor
0 Kudos

Hi Glen,

1. About Tracing:

Go to http(s)://hostname:port/nwa/log-config select show = Tracing Locations. Navigate to location com.sap.aii.adapter.sftp and increase tracing level to something like "warning" or if not a production environment / FTPS is not used in high volume scenarios even "debug".

There may be other locations that are worth having a look for, see here for an overview of PI 7.4 Logging and Tracing - Administering Process Integration (PI) - SAP Library

2. About XPI Inspector:

Check if it is already installed by opening http(s)://hostname:port/xpi_inspector. If not, you'll need to  open a ticket to get your hands on the *.ear file for deployment. See here how to get http://service.sap.com/sap/support/notes/1514898 and here how to deploy http://service.sap.com/sap/support/notes/2010715

HTH

Cheers

Jens

former_member201275
Active Contributor
0 Kudos

Hi Jens,

Thanks for help, I am still looking for error and have another question if u have a minute?

I have found my way into the NWA and I see the in 'PI Engine Status: Additional Data:' under 'Queue' tab, that for SFTP* all the 'Maximum number of threads' are set to '5'.

My question is, if i change this to '10' could this help?

What does this 'Maximum number of threads' mean?

JaySchwendemann
Active Contributor
0 Kudos

Hi Glen,

I wouldn't think so that increasing that number of threads would help in your case as the error seems more pointing to the remote host (namely the sFTP server of the third party) to be the bottleneck. But to be honest I'm not completely sure about that assumption.

However, to increase the threads you will have to need adjusting Java System property "messaging.connectionDefinition" of service "XPI Service: AF Core". See here for details . This should normally not be a big deal but since this is a system wide parameter that you cannot narrow down to specific scenarios I would be sparse with increasing  the threads in a production environment in order to avoid system overload / unwanted side effects on other PI processes.

Cheers

Jens

Answers (1)

Answers (1)

Former Member
0 Kudos

Hello Glen ,

As a first step you can check whether the user that you are using is having read/write access to the directory or not. The user should have access to the main root path.

Network/firewall issue can be ruled out as you are bale to connect with some different interfaces.

Thanks

former_member201275
Active Contributor
0 Kudos

Hi Gaurav,

Thank you for reply, unfortunately even the User is the same for all these SFTP scenarios.