Erreur: ETIMEDOUT
Closed this issue · 9 comments
Bonjour, après plusieurs résolutions d'erreurs comme ECONNREFUSED qui s'affichait vu que je n'avais pas de serveur http allumé sur mon port 80 ou encore Bad Request parce que je n'avais pas mis le http:// devant l'url pronote je me retrouve avec l'erreur ETIMEDOUT qui s'affiche au bout de 2min d'exécution du code...
Malgré mes recherches, je ne trouve pas la cause de l'erreur...
Pouvez vous m'aider ?
Merci d'avance
Hello, Je comprend pas ton erreur vu que l'api n'utilise pas le port 80.
Cdt
THibaut
Voici l'erreur complète pour que vous ayez plus d'infos:
{ Error: connect ETIMEDOUT 46.33.178.5:80 at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1107:14) errno: 'ETIMEDOUT', code: 'ETIMEDOUT', syscall: 'connect', address: '46.33.178.5', port: 80, config: { url: 'http://0595166v.index-education.net/eleve.html', method: 'get', headers: { Accept: 'application/json, text/plain, */*', 'User-Agent': 'Mozilla/5.0 (X11; Linux x86_64; rv:59.0) Gecko/20100101 Firefox/59.0', 'Content-Type': '', Cookie: 'JSESSIONID_LOGIN=4C2hNjlRD9vKN2O3Hnc8dvh2UKIbeszS66XFkXZr_ON9WgCUNmFq!-1495946915; FrEduOrigAuth=ATEN; FCATENINFOCOMPL=undefined; ATENCNX=ENpEQPs8oTIeHvYVLjRbVbpInta9TY1EL+3XiNzelortRN07V6InZAcTdNHfk7nhLHDBra8T3/5slWaxt+UkSXcEj0JrVmJAg64Q9zpanQO/QaNn5BMQ2uzS2qIcRmGLHmaO13dsc+j1rI81L6MMFKOshBJKy1lPdWqfZg1YKsQ=|/sso/SSO?SPEntityID=urn:fi:ent:lille-hdf-ts:1.0&TARGET=https://www.enthdf.fr/; CTSESSIONTS=AAAABAABAFjpZmhi7opUQZEBkQI7EutrpstNoAwSZpiiBWHYinLBBLNYiMUQW%2FMeRj9RDhbW0GAFh1vVtRdtEs3x9SditVpwkUPL12P93BjOcSGMKIifFXPWG7LfxihL; ATENCNX=undefined; JSESSIONID=PnTbgpFT8QhNhHbzJSmZYCbqYlMMvyb2f7hxbbR424lcx2TkH1kG!1442687162; RSA_FIM_BROWSER_ID=3237828665659255388; oneSessionId=a3fa5f6b-74f9-4025-91fe-8289507f6336:RsyuMx+9wN5VxLpyCyjz6NpFw1s=; authenticated=true; webviewignored=true:O48F/n2uyN0HJ4m2vUzGc0gGSBQ=; XSRF-TOKEN=b3848b14-a0ef-41d0-a6f1-99bec8325d60' }, transformRequest: [ [Function: transformRequest] ], transformResponse: [ [Function: transformResponse] ], timeout: 0, adapter: [Function: httpAdapter], xsrfCookieName: 'XSRF-TOKEN', xsrfHeaderName: 'X-XSRF-TOKEN', maxContentLength: -1, maxBodyLength: -1, maxRedirects: 0, validateStatus: [Function: validateStatus], data: undefined }, request: ClientRequest { _events: [Object: null prototype] { response: [Function], error: [Function: handleRequestError] }, _eventsCount: 2, _maxListeners: undefined, output: [], outputEncodings: [], outputCallbacks: [], outputSize: 0, writable: true, _last: true, chunkedEncoding: false, shouldKeepAlive: false, useChunkedEncodingByDefault: false, sendDate: false, _removedConnection: false, _removedContLen: false, _removedTE: false, _contentLength: 0, _hasBody: true, _trailer: '', finished: true, _headerSent: true, socket: Socket { connecting: false, _hadError: true, _handle: null, _parent: null, _host: '0595166v.index-education.net', _readableState: [ReadableState], readable: false, _events: [Object], _eventsCount: 7, _maxListeners: undefined, _writableState: [WritableState], writable: false, allowHalfOpen: false, _sockname: null, _pendingData: 'GET /eleve.html HTTP/1.1\r\nAccept: application/json, text/plain, */*\r\nUser-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:59.0) Gecko/20100101 Firefox/59.0\r\nContent-Type: \r\nCookie: JSESSIONID_LOGIN=4C2hNjlRD9vKN2O3Hnc8dvh2UKIbeszS66XFkXZr_ON9WgCUNmFq!-1495946915; FrEduOrigAuth=ATEN; FCATENINFOCOMPL=undefined; ATENCNX=ENpEQPs8oTIeHvYVLjRbVbpInta9TY1EL+3XiNzelortRN07V6InZAcTdNHfk7nhLHDBra8T3/5slWaxt+UkSXcEj0JrVmJAg64Q9zpanQO/QaNn5BMQ2uzS2qIcRmGLHmaO13dsc+j1rI81L6MMFKOshBJKy1lPdWqfZg1YKsQ=|/sso/SSO?SPEntityID=urn:fi:ent:lille-hdf-ts:1.0&TARGET=https://www.enthdf.fr/; CTSESSIONTS=AAAABAABAFjpZmhi7opUQZEBkQI7EutrpstNoAwSZpiiBWHYinLBBLNYiMUQW%2FMeRj9RDhbW0GAFh1vVtRdtEs3x9SditVpwkUPL12P93BjOcSGMKIifFXPWG7LfxihL; ATENCNX=undefined; JSESSIONID=PnTbgpFT8QhNhHbzJSmZYCbqYlMMvyb2f7hxbbR424lcx2TkH1kG!1442687162; RSA_FIM_BROWSER_ID=3237828665659255388; oneSessionId=a3fa5f6b-74f9-4025-91fe-8289507f6336:RsyuMx+9wN5VxLpyCyjz6NpFw1s=; authenticated=true; webviewignored=true:O48F/n2uyN0HJ4m2vUzGc0gGSBQ=; XSRF-TOKEN=b3848b14-a0ef-41d0-a6f1-99bec8325d60\r\nHost: 0595166v.index-education.net\r\nConnection: close\r\n\r\n', _pendingEncoding: 'latin1', server: null, _server: null, parser: null, _httpMessage: [Circular], [Symbol(asyncId)]: 175, [Symbol(lastWriteQueueSize)]: 0, [Symbol(timeout)]: null, [Symbol(kBytesRead)]: 0, [Symbol(kBytesWritten)]: 0 }, connection: Socket { connecting: false, _hadError: true, _handle: null, _parent: null, _host: '0595166v.index-education.net', _readableState: [ReadableState], readable: false, _events: [Object], _eventsCount: 7, _maxListeners: undefined, _writableState: [WritableState], writable: false, allowHalfOpen: false, _sockname: null, _pendingData: 'GET /eleve.html HTTP/1.1\r\nAccept: application/json, text/plain, */*\r\nUser-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:59.0) Gecko/20100101 Firefox/59.0\r\nContent-Type: \r\nCookie: JSESSIONID_LOGIN=4C2hNjlRD9vKN2O3Hnc8dvh2UKIbeszS66XFkXZr_ON9WgCUNmFq!-1495946915; FrEduOrigAuth=ATEN; FCATENINFOCOMPL=undefined; ATENCNX=ENpEQPs8oTIeHvYVLjRbVbpInta9TY1EL+3XiNzelortRN07V6InZAcTdNHfk7nhLHDBra8T3/5slWaxt+UkSXcEj0JrVmJAg64Q9zpanQO/QaNn5BMQ2uzS2qIcRmGLHmaO13dsc+j1rI81L6MMFKOshBJKy1lPdWqfZg1YKsQ=|/sso/SSO?SPEntityID=urn:fi:ent:lille-hdf-ts:1.0&TARGET=https://www.enthdf.fr/; CTSESSIONTS=AAAABAABAFjpZmhi7opUQZEBkQI7EutrpstNoAwSZpiiBWHYinLBBLNYiMUQW%2FMeRj9RDhbW0GAFh1vVtRdtEs3x9SditVpwkUPL12P93BjOcSGMKIifFXPWG7LfxihL; ATENCNX=undefined; JSESSIONID=PnTbgpFT8QhNhHbzJSmZYCbqYlMMvyb2f7hxbbR424lcx2TkH1kG!1442687162; RSA_FIM_BROWSER_ID=3237828665659255388; oneSessionId=a3fa5f6b-74f9-4025-91fe-8289507f6336:RsyuMx+9wN5VxLpyCyjz6NpFw1s=; authenticated=true; webviewignored=true:O48F/n2uyN0HJ4m2vUzGc0gGSBQ=; XSRF-TOKEN=b3848b14-a0ef-41d0-a6f1-99bec8325d60\r\nHost: 0595166v.index-education.net\r\nConnection: close\r\n\r\n', _pendingEncoding: 'latin1', server: null, _server: null, parser: null, _httpMessage: [Circular], [Symbol(asyncId)]: 175, [Symbol(lastWriteQueueSize)]: 0, [Symbol(timeout)]: null, [Symbol(kBytesRead)]: 0, [Symbol(kBytesWritten)]: 0 }, _header: 'GET /eleve.html HTTP/1.1\r\nAccept: application/json, text/plain, */*\r\nUser-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:59.0) Gecko/20100101 Firefox/59.0\r\nContent-Type: \r\nCookie: JSESSIONID_LOGIN=4C2hNjlRD9vKN2O3Hnc8dvh2UKIbeszS66XFkXZr_ON9WgCUNmFq!-1495946915; FrEduOrigAuth=ATEN; FCATENINFOCOMPL=undefined; ATENCNX=ENpEQPs8oTIeHvYVLjRbVbpInta9TY1EL+3XiNzelortRN07V6InZAcTdNHfk7nhLHDBra8T3/5slWaxt+UkSXcEj0JrVmJAg64Q9zpanQO/QaNn5BMQ2uzS2qIcRmGLHmaO13dsc+j1rI81L6MMFKOshBJKy1lPdWqfZg1YKsQ=|/sso/SSO?SPEntityID=urn:fi:ent:lille-hdf-ts:1.0&TARGET=https://www.enthdf.fr/; CTSESSIONTS=AAAABAABAFjpZmhi7opUQZEBkQI7EutrpstNoAwSZpiiBWHYinLBBLNYiMUQW%2FMeRj9RDhbW0GAFh1vVtRdtEs3x9SditVpwkUPL12P93BjOcSGMKIifFXPWG7LfxihL; ATENCNX=undefined; JSESSIONID=PnTbgpFT8QhNhHbzJSmZYCbqYlMMvyb2f7hxbbR424lcx2TkH1kG!1442687162; RSA_FIM_BROWSER_ID=3237828665659255388; oneSessionId=a3fa5f6b-74f9-4025-91fe-8289507f6336:RsyuMx+9wN5VxLpyCyjz6NpFw1s=; authenticated=true; webviewignored=true:O48F/n2uyN0HJ4m2vUzGc0gGSBQ=; XSRF-TOKEN=b3848b14-a0ef-41d0-a6f1-99bec8325d60\r\nHost: 0595166v.index-education.net\r\nConnection: close\r\n\r\n', _onPendingData: [Function: noopPendingOutput], agent: Agent { _events: [Object], _eventsCount: 1, _maxListeners: undefined, defaultPort: 80, protocol: 'http:', options: [Object], requests: {}, sockets: [Object], freeSockets: {}, keepAliveMsecs: 1000, keepAlive: false, maxSockets: Infinity, maxFreeSockets: 256 }, socketPath: undefined, timeout: undefined, method: 'GET', insecureHTTPParser: undefined, path: '/eleve.html', _ended: false, res: null, aborted: undefined, timeoutCb: null, upgradeOrConnect: false, parser: null, maxHeadersCount: null, [Symbol(isCorked)]: false, [Symbol(outHeadersKey)]: [Object: null prototype] { accept: [Array], 'user-agent': [Array], 'content-type': [Array], cookie: [Array], host: [Array] } }, response: undefined, isAxiosError: true, toJSON: [Function: toJSON] }
Tu a juste mal config l'api, choisi comme lien : https://0595166v.index-education.net/pronote/
ensuite choisis bien ton CAS.
Cdt
Thibaut
J'ai mis ceci pour me connecter à ma session , est-ce correct ?
const session = await pronote.login(url, username, password,"ac-lille2");
Cordialement,
Kalaghar
Yes, si ton pronote est a l'url que je t'ai donnée et que la page de connection est a celle la : 'teleservices.ac-lille.fr'
Cdt
Thibaut
Mais comment configurer la page de connection ?
Que veux tu dire ?
Vous me dites de choisir comme url de Pronote https://0595166v.index-education.net/pronote/ et la page de connexion "teleservices.ac-lille.fr" mais le cas ne choisit-il pas automatiquement la page de connexion ?
Je viens de tester, j'avais oublié le /pronote/ dans l'url, tout marche parfaitement, merci à vous !