Skip to content
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

[BUG] Strange log entries #90

Open
nappa85 opened this issue Jul 28, 2021 · 3 comments
Open

[BUG] Strange log entries #90

nappa85 opened this issue Jul 28, 2021 · 3 comments

Comments

@nappa85
Copy link

nappa85 commented Jul 28, 2021

My running DCM log is full of

BadRequestError: request aborted
    at IncomingMessage.onAborted (/app/node_modules/raw-body/index.js:231:10)
    at IncomingMessage.emit (events.js:314:20)
    at abortIncoming (_http_server.js:535:9)
    at socketOnClose (_http_server.js:528:3)
    at Socket.emit (events.js:326:22)
    at TCP.<anonymous> (net.js:673:12)

Somethimes also

(node:19) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'match' of undefined
    at /app/src/routes/api.js:413:143
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (internal/process/task_queues.js:93:5)
(Use `node --trace-warnings ...` to show where the warning was created)
(node:19) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:19) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

Is it something I should worry about? Can this exception be handled?
More, it seems that it can't recover from a lost MySQL connection, I'm having some minor problems with MySQL reachability and DCM is the only software I have to force-restart.

@versx
Copy link
Owner

versx commented Jul 29, 2021

OS distro and version?
Node version?
Npm version?
Mysql version?
DCM version?
Using cloudflare?

Request aborted should only occur occasionally tbh, if it's frequent then you have a big-ish issue. Do you use proxies and do they have access to local resources?

I honestly don't ever have to restart DCM other than doing it occasionally (every few months to update it) so I think it can recover from failed mysql connections just fine.

The second error is pointing here: https://github.com/versx/DeviceConfigManager/blob/master/src/routes/api.js#L413 which leads me to believe a CF or proxy issue although you said that it only happens sometimes. 🤔

@nappa85
Copy link
Author

nappa85 commented Jul 30, 2021

Sorry for the late reply

OS distro and version?
docker (alpine)
Node version?
12.16.2
Npm version?
6.14.4
Mysql version?
5.7.33
DCM version?
latest master branch
Using cloudflare?
Yes, but clients are using public IP, so I think cloudflare is skipped

@versx
Copy link
Owner

versx commented Aug 6, 2021

Sorry for the late reply

OS distro and version?
docker (alpine)
Node version?
12.16.2
Npm version?
6.14.4
Mysql version?
5.7.33
DCM version?
latest master branch
Using cloudflare?
Yes, but clients are using public IP, so I think cloudflare is skipped

Is this still an issue?
CF is still used/routed if client is using public IP address to connect.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants