2
votes

Need help! I am trying to create a Logic App in Azure (Windows PaaS app service) that would connect to AWS cloud environment (SFTP Linux VM) and get files from there. In the Logic App when I am using SFTP-SSH API connection, the connection gets created, but it shows Bad Gateway error as below:

enter image description here

And below is what it shows when I try to run the Logic App enter image description here

enter image description here

I have ensured that all the IPs of my Azure PaaS app service are white-listed by AWS cloud environment (SFTP Linux VM) and I could check this by running below PowerShell command in my azure app service so seems the connection is established.

enter image description here

But for some reason, I can't access the SFTP folder that is present in AWS and it throws 502 Bad Gateway error. There is no other step or code that I can share, as its the very first step of my Logic App. Has anyone faced this kind of error before? Any ideas/pointers why I may be getting this error or what should I do to get rid of this error?

Thanks for any ideas/suggestions in advance!

1
You show No such host is known but then try to connect directly to an IP (based on the length of your New-Object command). Have you tried to use the hostname instead?stdunbar
@stdunbar, you are right, I see what you mean, in the New-Object powershell command when I provide the hostname instead of IP address, it shows "No such host is known". Any suggestions how to resolve this?KRM
Can you put the IP address into the Azure app for now? It really shouldn't matter very much either way as AWS host names include the IP address in them like ec2-XX-XX-XX-XX.us-west-2.compute.amazonaws.com.stdunbar
Are you positive that your Amazon resource is allowing port 22 (the SSH port)? Amazon has security groups which are similar in concept to an Azure network security group. By default no connections are allowed on any port.stdunbar
Yes, Amazon has confirmed that they opened port 22. And they also recommended to use FQDN to connect because it’s a cluster hosted on 2 servers so they have two different IPs and the FQDN can point to any of these servers. Thanks as always for your helpful comments!KRM

1 Answers

0
votes

This error is finally resolved for me, and the problem in this case was, the new IPs (managed connectors IPs) at https://docs.microsoft.com/en-us/azure/logic-apps/logic-apps-limits-and-config#configuration-ip-addresses were not white-listed. And I also had to create a DNS record for FQDN pointing to A record (AWS SFTP folder IP address) to resolve this error.