nut-http icon indicating copy to clipboard operation
nut-http copied to clipboard

nut-http not working - Warning "The legacy HTTP parser is deprecated."

Open Andre15711 opened this issue 2 years ago • 2 comments

Starting the nut-http in a docker container I got the following error / warning and nothin more happen.

`> [email protected] start /usr/src/app

node index.js [2023-07-15T08:56:34.014] [INFO] nut-http - environment variables: { LOG_LEVEL: 'DEBUG', SERVER_PORT: 3001, SERVER_TIMEOUT: 120000, NUT_ADDRESS: 'aaa.bbb.ccc.ddd', NUT_PORT: 3493, LOCK_TIMEOUT: 1000 } (node:24) [DEP0131] DeprecationWarning: The legacy HTTP parser is deprecated. [2023-07-15T08:56:34.029] [INFO] nut-http - nut-http listening on port 3001`

I used this container already earlier and found some older logs. I these older logs it continues to log and communcate [2023-01-30T18:02:52.028] [INFO] nut-http - environment variables: { LOG_LEVEL: 'DEBUG', SERVER_PORT: 3001, SERVER_TIMEOUT: 120000, NUT_ADDRESS: 'aaa.bbb.ccc.ddd', NUT_PORT: 3493, LOCK_TIMEOUT: 1000 } [2023-01-30T18:02:52.124] [INFO] nut-http - nut-http listening on port 3001 [2023-01-30T18:03:00.120] [DEBUG] nut-http - received GETUPS /devices for netups [2023-01-30T18:03:01.198] [INFO] nut-http - nut connection established to aaa.bbb.ccc.ddd:3493 [2023-01-30T18:03:01.240] [DEBUG] nut-http - processing took 1 second [2023-01-30T18:03:10.072] [DEBUG] nut-http - received GETUPS /devices for netups [2023-01-30T18:03:10.087] [DEBUG] nut-http - processing took 14 ms

Any idea, why it is not working anymore? I it related to the warning?

Andre15711 avatar Jul 15 '23 09:07 Andre15711

Hmm, I don't think a deprecation notice will cause the container to stop.

Is this the prebuild container or did you built it yourself with a newer version of nodejs? Does it log anything when you perform /devices?

dietah avatar Jul 17 '23 10:07 dietah

It works here despite the deprecation notice.

desertwitch avatar Jul 18 '23 11:07 desertwitch