-
Notifications
You must be signed in to change notification settings - Fork 166
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The processlogs script sometimes throws "RangeError [ERR_HTTP_INVALID_STATUS_CODE]" #3769
Comments
This happens as callback expects status to be defined build/ansible/roles/metrics/files/process-cloudflare/process-cloudflare.js Lines 216 to 218 in e3e4b4a
But when there's error while downloading file, the callback is called without a status code build/ansible/roles/metrics/files/process-cloudflare/process-cloudflare.js Lines 152 to 156 in e3e4b4a
|
Example log which throws error EVENT TYPE: OBJECT_FINALIZE
Node version is: v20.15.0
BUCKET cloudflare-logs-nodejs
FILENAME 20240625/20240625T193311Z_20240625T193421Z_ce3b0ea7.log.gz
PROCESSEDFILENAME 20240625/20240625T193311Z_20240625T193421Z
INSIDE CREATE PIPELINE
ERROR IN DOWNLOAD 20240625/20240625T193311Z_20240625T193421Z_ce3b0ea7.log.gz [Error: ENOENT: no such file or directory, open '/usr/src/app/metrics-processor-service-key.json'] {
errno: -2,
code: 'ENOENT',
syscall: 'open',
path: '/usr/src/app/metrics-processor-service-key.json'
}
node:_http_server:352
throw new ERR_HTTP_INVALID_STATUS_CODE(originalStatusCode);
^
ERROR 2024-06-25T19:34:33.666202Z RangeError [ERR_HTTP_INVALID_STATUS_CODE]: Invalid status code: undefined at ServerResponse.writeHead (node:_http_server:352:11) at ServerResponse._implicitHeader (node:_http_server:338:8) at ServerResponse.end (node:_http_outgoing:1072:10) at ServerResponse.send (/usr/src/app/node_modules/express/lib/response.js:233:10) at /usr/src/app/process-cloudflare.js:220:24 at /usr/src/app/process-cloudflare.js:155:7 at callback (/usr/src/app/node_modules/@google-cloud/storage/build/src/file.js:1624:17) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
code: 'ERR_HTTP_INVALID_STATUS_CODE'
} This error happened when Dockerfile was deployed without In future, we should consider providing credentials in some different manner. |
Describe the issue
The processlogs script sometimes throws "RangeError [ERR_HTTP_INVALID_STATUS_CODE]"
Steps to reproduce
View if you have access https://cloudlogging.app.goo.gl/rHMd176nXCG1XqgH9
Observed behavior
Expected behavior
No RangeError
Additional context
Noticed while reviewing logs in #3697 (comment)
The text was updated successfully, but these errors were encountered: