Expand my Community achievements bar.

adobe io runtime closed ports

Avatar

Level 1

Good team!

The problem I am trying to solve is the following:

From adobe io runtime we are deploying an app. One of its functions is to take a certain document and upload it to FTP. The problem we are encountering is that as indicated in this link https://adobedocs.github.io/adobeio-runtime/resources/faq.html#what-ports-are-open, certain ports are not open, including port 21 which is the one with which I must access the FTP. How can we solve this problem? I am using the BASIF FTP client for Node.js.

 

This is a little fragment of the code: 

vmenendez_0-1610645176180.png

 

The output is:

vmenendez_2-1610645213745.png

 

Thanks all!

 

6 Replies

Avatar

Employee

Hello Vmenendez,

 

You are correct, port 21 is closed by design. Security best practice is to use  SFTP instead of FTP. This is why port 22 (SFTP) is opened and 21 (FTP) is not.

 

Regarding your code, the way you can debug it, assuming that your provider supports SFTP is to first make the code run on your local machine (like running the action code within your node.js). Once this runs successfully, try to deploy it on Runtime. If doesn't run on Runtime, it could be that the SFTP server blocks certain IP ranges (like IPs owned by AWS or Azure). You'll have to work with them on this.

 

Hope this helps,

Mihai

 

 

Avatar

Level 1

Hi Mihai,

 

First of all, thank's for your answer.

 

The FTP we want to access is the Adobe customer attributes FTP. We are currently working on an automation that retrieves data from a third party tool(BigQuery) and loads it to Adobe Target. We should be able to automate the data upload that was done manually with an automated process at a Project Firefly application.

 

I see in this link https://experienceleague.adobe.com/docs/core-services/interface/customer-attributes/t-upload-attribu... that this resource can be accessed from both FTP and SFTP. In our tests, we have been able to execute the code in Node environment, but when moving the execution to Adobe i/o we are gettint multiple errors. AdobeIO runtime has port 21 blocked and Im not able to connect the FTP on port 22. Also with SFTP we have problems within adobe io runtime (like timout errors)

May we whitelist the FTP IP to be able to connect?

Avatar

Employee

No, we can't enable port 21 because it is against security best practices. Have you been able to connect to port 22 from a local Node.js environment?

Avatar

Level 1

Hi Mihai,

 

Right, if we connect to port 21 or 22 from a local Node.js environment we have no problem. Trying to connect to this FTP with port 22 from the Adobe IO runtime the output is a TIMEOUT:

vmenendez_1-1610958781507.jpeg

 Thanks!

Avatar

Employee

@vmenendez - I could run an action that connects to a test SFTP server. Below is the relevant code extract.

 

const sftpClient = require('ssh2-sftp-client')
async function main (params) {
    let sftp = new sftpClient()
    const options = {
      host: 'test.rebex.net',
      port: '22',
      username: 'demo',
      password: 'password'
    }
    await sftp.connect(options);
    
    const sftpList = await sftp.list('/')
    logger.debug(`${response.statusCode}: successful request`)
    await sftp.end()
    // return your response
}

Avatar

Level 2

This was really helpfull the port i was using is in effect closed so i did change the port used to conect on the remote instance (in my case was Elastic Search) and worked well