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

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.

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 :stuck_out_tongue:

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.

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

request-promise also works with POST.

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

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

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.

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

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