hey GM guys... We are trying to send over txt fil...
# suitescript
p
hey GM guys... We are trying to send over txt files to a fileserver with N/sftp. in the very beginning this had no issue... now we are getting:
Copy code
{
   type: "error.SuiteScriptError",
   name: "FTP_CONNECT_TIMEOUT_EXCEEDED",
   message: "Timeout exceeded while establishing SFTP connection",
   stack: [
      "Error\n    at Object.beforeSubmit (/SuiteScripts/tungsten_inv/ue_create_invtxt.js:186:43)"
   ],
   cause: {
      type: "internal error",
      code: "FTP_CONNECT_TIMEOUT_EXCEEDED",
      details: "Timeout exceeded while establishing SFTP connection",
      userEvent: null,
      stackTrace: [
         "Error\n    at Object.beforeSubmit (/SuiteScripts/tungsten_inv/ue_create_invtxt.js:186:43)"
      ],
      notifyOff: false
   },
   id: "",
   notifyOff: false,
   userFacing: true
}
anyone got an idea on this error? couldn’t find it on suiteanswers :s
b
👌 1
❤️ 1
p
i’m guessing i need to add a timeout int that is higher that 20? 😅
wrong guess, you can’t go higher than 20
s
probably nested try catch... its bad but it probably works?
👀 1
p
lets try that
s
I've seen this behavior recently as well - no changes on our side and a previously working solution is getting this timeout error.
👀 1
I suspect it's a NS thing
p
hmmm
yeah had it working earlier, but then... btw @Shawn Talbert did you use the recommended bundle 413267 for the connection tool? it doesn’t seem to work for us :/
s
The SFTP Connector SuiteApp failed in the same way, if that's the bundle you're referring to. I don't know the bundle id off the top of my head.
😓 1
a
not sure, try adding below params as well
this.serverConnect = function (bank) { log.debug('bank', bank) var connection = sftp.createConnection({ username: bank["USER_NAME"], passwordGuid: bank["PASSWORD_GUUID"], url: bank["IP_ADDRESS"], hostKeyType: bank["SSH_TYPE"], port: parseInt(bank["PORT"]), directory: bank["FOLDER"], hostKey: bank["SSH_KEY"] }); return connection }
you can check the time out request on the server from sshd.config