starter-NodeJS icon indicating copy to clipboard operation
starter-NodeJS copied to clipboard

Error: connect ECONNREFUSED 54.72.152.240:443

Open rlopmar opened this issue 7 years ago • 11 comments

Hi, your website is refusing me when sending a request. This was working a couple of weeks ago. Here my NodeJS code:

const recastai = require('recastai').default;
const myBotToken = '7342ac85a271995d596f6d21acfa0b88';

function setRecastBot(botToken){
    //let recastClient = new recastai('7342ac85a271995d596f6d21acfa0b88');
    let recastClient = new recastai(botToken);
    return recastClient;
};

let recastBot = setRecastBot(myBotToken);

recastBot.request.analyseText("Hello").then((response) => {
    console.log('response:');
    console.log(response);
    console.log('intent:');
    console.log(response.intent());
});

error:

(node:12532) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Error: connect ECONNREFUSED 54.194.194.229:443

Could you please assist?

rlopmar avatar Mar 08 '18 11:03 rlopmar

Hi @rafachurre , what happens if you run curl https://api.recast.ai, do you get the same error ? This error makes me suspect you can't query https://recast.ai from your code for some reason, because the public IP of the server was resolved. So I would guess it's some kind of firewall issue on your part or something like that. Do you use a proxy ?

dbousque avatar Mar 08 '18 12:03 dbousque

Yes, I'm behind my company proxy. Just tested now form the public network and it works. Any configuration you recommend to use Recast behind a proxy?

rlopmar avatar Mar 08 '18 12:03 rlopmar

I have no idea, but I would say that the problem occurs because our API is not authorized by your proxy, or something of this nature. Could you give me the public IP of the proxy if you know it ? You can query curl ipinfo.io/ip using the proxy to find this out.

dbousque avatar Mar 08 '18 12:03 dbousque

I think I can't give you this right now. But I'll contact IT department and let you know afterwards. Thank you. Rafael

rlopmar avatar Mar 08 '18 13:03 rlopmar

It seems the module 'recastai' does not handle to be able to use a proxy. Example most firms/companies have proxy to go outside. I do see the module tries to use superagent and superagent-proxy but it does not ready environment variable HTTP_PROXY. Would be good if recastai module can handle proxy.

jjwallaby avatar Sep 25 '18 09:09 jjwallaby

I am facing same issues

{ Error: connect ECONNREFUSED 185.82.212.199:443 at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1191:14) message: 'connect ECONNREFUSED 185.82.212.199:443', errno: 'ECONNREFUSED', code: 'NetworkingError', syscall: 'connect', address: '185.82.212.199', port: 443, region: 'US West (Oregon)', hostname: 'tngproduction.s3.us', retryable: true, time: 2019-04-23T09:34:18.787Z }

anuraggupta816 avatar Apr 23 '19 09:04 anuraggupta816

{ Error: getaddrinfo ENOTFOUND tngproduction.s3.us tngproduction.s3.us:443 0|server | at errnoException (dns.js:50:10) 0|server | at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:92:26) 0|server | message: 'getaddrinfo ENOTFOUND tngproduction.s3.us tngproduction.s3.us:443', 0|server | code: 'NetworkingError', 0|server | errno: 'ENOTFOUND', 0|server | syscall: 'getaddrinfo', 0|server | hostname: 'tngproduction.s3.us', 0|server | host: 'tngproduction.s3.us', 0|server | port: 443, 0|server | region: 'US West (Oregon)', 0|server | retryable: true, 0|server | time: 2019-04-23T09:18:08.454Z },

anuraggupta816 avatar Apr 23 '19 09:04 anuraggupta816

please help me

anuraggupta816 avatar Apr 23 '19 09:04 anuraggupta816

hi, I am trying to connect to app center by

  1. installing npm package i.e I am running command : npm install -g appcenter-cli on cmd and
  2. then run appcenter login command
  3. you'll get a code on browser. copy and paste on cmd I am not able to connect to app center , instead I am seeing below error Error: connect ECONNREFUSED 104.209.152.237:443

Any ideas, on how this will work

JaskiranKaur93 avatar Jun 12 '19 19:06 JaskiranKaur93

Did you find the solution for this .https://github.com/SAPConversationalAI/starter-NodeJS/issues/5#issuecomment-485734620

pooja241 avatar Nov 08 '19 08:11 pooja241

i have faced the same issue, i solved it by clearing the authorization from the header. The problem was authorization did not meet the requirement.Hope this help for someone

Aswin123as avatar Apr 10 '21 03:04 Aswin123as