Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

i am getting this error when i try to connect to ftp. #65

Open
nadunlanka opened this issue Mar 10, 2018 · 4 comments
Open

i am getting this error when i try to connect to ftp. #65

nadunlanka opened this issue Mar 10, 2018 · 4 comments

Comments

@nadunlanka
Copy link

var ftps = new FTPS({
  host: '192.168.1.8', // required
  username: 'test', // Optional. Use empty username for anonymous access.
  password: '123', // Required if username is not empty, except when requiresPassword: false
  protocol: 'ftp', // Optional, values : 'ftp', 'sftp', 'ftps', ... default: 'ftp'
  // protocol is added on beginning of host, ex : sftp://domain.com in this case
  port: 21, // Optional
  // port is added to the end of the host, ex: sftp://domain.com:22 in this case
  escape: true, // optional, used for escaping shell characters (space, $, etc.), default: true
  retries: 2, // Optional, defaults to 1 (1 = no retries, 0 = unlimited retries)
  timeout: 10, // Optional, Time before failing a connection attempt. Defaults to 10
  retryInterval: 5, // Optional, Time in seconds between attempts. Defaults to 5
  retryMultiplier: 1, // Optional, Multiplier by which retryInterval is multiplied each time new attempt fails. Defaults to 1
  requiresPassword: true, // Optional, defaults to true
  autoConfirm: true, // Optional, is used to auto confirm ssl questions on sftp or fish protocols, defaults to false
  cwd: '', // Optional, defaults to the directory from where the script is executed
  additionalLftpCommands: '', // Additional commands to pass to lftp, splitted by ';'
  requireSSHKey:  false, //  Optional, defaults to false, This option for SFTP Protocol with ssh key authentication
});

ftps.ls().exec(resp =>{
  console.log(resp)
  resolves(resp)

})

{ Error: spawn lftp ENOENT
at _errnoException (util.js:1022:11)
at Process.ChildProcess._handle.onexit (internal/child_process.js:190:19)
at onErrorNT (internal/child_process.js:372:16)
at _combinedTickCallback (internal/process/next_tick.js:138:11)
at process._tickCallback (internal/process/next_tick.js:180:9)
code: 'ENOENT',
errno: 'ENOENT',
syscall: 'spawn lftp',
path: 'lftp',
spawnargs:
[ '-c',
'set net:max-retries 2;set net:timeout 10;set net:reconnect-interval-base 5;set net:reconnect-interval-multiplier 1;;open -u "test","123" "ftp://192.168.1.8:21";ls' ] }

@roblayton
Copy link

You probably need to install lftp on your machine/server. See this closed issue: #21

@nitingautam
Copy link

nitingautam commented Feb 27, 2019

I have installed lftp and in local when i try to call lftp it shows me lftp prompt. Still same error as shown above

@henkomoss
Copy link

Im having this very same issue. Did you find a solution?

@SebaInfante
Copy link

Im having this very same issue :/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants