# NODE JS gets ETIMEDOUT for esi.tech.ccp.is

**URL:** <https://forums.eveonline.com/t/node-js-gets-etimedout-for-esi-tech-ccp-is/73089>\
**Category:** Third Party Developers\
**Created:** [April 28, 2018, 8:36pm UTC](https://forums.eveonline.com/t/node-js-gets-etimedout-for-esi-tech-ccp-is/73089 "2018-04-28T20:36:47Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Alpho](https://sea1.discourse-cdn.com/eveonline/user_avatar/forums.eveonline.com/alpho/32/384735_2.png) [@Alpho](https://forums.eveonline.com/u/Alpho)\
**Post date:** [April 28, 2018, 8:36pm UTC](https://forums.eveonline.com/t/node-js-gets-etimedout-for-esi-tech-ccp-is/73089/1 "2018-04-28T20:36:47Z")

</div>

POST request at `https://login.eveonline.com/oauth/token` for getting access tokens is working well, but GET request at `esi.tech.ccp.is` for gettind any data only recieve  
`connect ETIMEDOUT 35.186.214.164:443`  
I tried dozens of http-request libraries - all with the same result.  
The code:

> ```
> var options = {
> host: 'esi.tech.ccp.is',
> method: 'GET',
> path: '/v2/characters/'+charID+'/online/?datasource=tranquility',
> headers: {
> 'Host': 'esi.tech.ccp.is',
> 'Authorization': 'Bearer ' + token
> }
> };
> var request_test = https.request(options, function (response) {
> response.on('data', function (data) {
> console.log(BODY: ${data});
> console.log(data.toString('utf8'));
> });
> response.on('end', function () {
> console.log('');
> });
> });
> request_test.on('error', function (e) {
> console.log('Problem with request: ' + e.message);
> });
> 
> ```

I tried different headers, different styles of URL-formatting, http/httpS, google said it can be proxy - i tried adding it too.

---

<div class="post-metadata">

**Author:** ![AnnoyingSchlabbi](https://sea1.discourse-cdn.com/eveonline/user_avatar/forums.eveonline.com/annoyingschlabbi/32/418538_2.png) [@AnnoyingSchlabbi](https://forums.eveonline.com/u/AnnoyingSchlabbi)\
**Post date:** [April 29, 2018, 12:30am UTC](https://forums.eveonline.com/t/node-js-gets-etimedout-for-esi-tech-ccp-is/73089/2 "2018-04-29T00:30:32Z")

</div>

This does not work for me either, I get the same error but I don’t actually know anything about the module you are using… so here is a different one 😛

For requests I use `request-promise`. A request can then look something like this:

```
const rp = require('request-promise');

let token = 'XXXX';
let charID = 0000000;

let options = {
    uri: 'https://esi.tech.ccp.is/v1/characters/' + charID + '/industry/jobs/',
    method: 'GET',
    headers: {
        'Authorization': 'Bearer ' + token
    }
};

rp(options).then(console.log).catch(console.error);

```

Maybe you can get it to work with this request module.

---

<div class="post-metadata">

**Author:** ![Alpho](https://sea1.discourse-cdn.com/eveonline/user_avatar/forums.eveonline.com/alpho/32/384735_2.png) [@Alpho](https://forums.eveonline.com/u/Alpho)\
**Post date:** [April 29, 2018, 10:47am UTC](https://forums.eveonline.com/t/node-js-gets-etimedout-for-esi-tech-ccp-is/73089/3 "2018-04-29T10:47:46Z")

</div>

I tried request module and its the only one that workes with POST.

---

<div class="post-metadata">

**Author:** ![AnnoyingSchlabbi](https://sea1.discourse-cdn.com/eveonline/user_avatar/forums.eveonline.com/annoyingschlabbi/32/418538_2.png) [@AnnoyingSchlabbi](https://forums.eveonline.com/u/AnnoyingSchlabbi)\
**Post date:** [April 29, 2018, 3:12pm UTC](https://forums.eveonline.com/t/node-js-gets-etimedout-for-esi-tech-ccp-is/73089/4 "2018-04-29T15:12:10Z")

</div>

`request-promise` also works with POST.

---

<div class="post-metadata">

**Author:** ![Krysenth](https://sea1.discourse-cdn.com/eveonline/user_avatar/forums.eveonline.com/krysenth/32/58194_2.png) [@Krysenth](https://forums.eveonline.com/u/Krysenth)\
**Post date:** [April 30, 2018, 11:42am UTC](https://forums.eveonline.com/t/node-js-gets-etimedout-for-esi-tech-ccp-is/73089/5 "2018-04-30T11:42:31Z")

</div>

`'Authorization': 'Bearer ' + token`  
Should probably be  
`'Authorization: Bearer ' + token`

---

<div class="post-metadata">

**Author:** ![Alpho](https://sea1.discourse-cdn.com/eveonline/user_avatar/forums.eveonline.com/alpho/32/384735_2.png) [@Alpho](https://forums.eveonline.com/u/Alpho)\
**Post date:** [April 30, 2018, 12:53pm UTC](https://forums.eveonline.com/t/node-js-gets-etimedout-for-esi-tech-ccp-is/73089/6 "2018-04-30T12:53:36Z")

</div>

If so there must be ‘Bad request’, but no answer at all.

---

<div class="post-metadata">

**Author:** ![EveDataRules](https://sea1.discourse-cdn.com/eveonline/user_avatar/forums.eveonline.com/evedatarules/32/52946_2.png) [@EveDataRules](https://forums.eveonline.com/u/EveDataRules)\
**Post date:** [April 30, 2018, 1:31pm UTC](https://forums.eveonline.com/t/node-js-gets-etimedout-for-esi-tech-ccp-is/73089/7 "2018-04-30T13:31:22Z")

</div>

This is a networking issue, your connections to the cdn are not going through.

Are you reusing your client or making a new connection for each request? If you make too many connections in a time period to the cdn, you will get blacklisted temporarily.

It could also be the bad header as suggested above causing a protocol error.

---

<div class="post-metadata">

**Author:** ![Alpho](https://sea1.discourse-cdn.com/eveonline/user_avatar/forums.eveonline.com/alpho/32/384735_2.png) [@Alpho](https://forums.eveonline.com/u/Alpho)\
**Post date:** [April 30, 2018, 3:03pm UTC](https://forums.eveonline.com/t/node-js-gets-etimedout-for-esi-tech-ccp-is/73089/8 "2018-04-30T15:03:52Z")

</div>

Exactly the same code is working greate at the home computer, but not at the server.  
I guess it can be nginx config problem.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/eveonline/original/3X/4/1/41ec4921cbaca7a6f9ea556e7cc20018461eae5e.png) [@system](https://forums.eveonline.com/u/system)\
**Post date:** [July 29, 2018, 3:03pm UTC](https://forums.eveonline.com/t/node-js-gets-etimedout-for-esi-tech-ccp-is/73089/9 "2018-07-29T15:03:57Z")

</div>

Closed on July 29, 2018, 3:03pm UTC

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.
