-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Closed
Description
The Node.js RPM appears to be configured such that requests made with the http2 module print noisy debug messages to standard error, and there is no way to suppress them.
I originally filed this bug as googleapis/nodejs-logging#668 the Google Cloud Node.js Logging module, which uses the http2 module under the hood.
Steps to reproduce:
Install Node.js 10.x on Centos 8 from the NodeSource repository (consider starting from a cleanroom environment like the centos:centos8 dockerhub image):
$ curl -sL https://rpm.nodesource.com/setup_10.x | bash -
$ sudo yum install -y nodejsNote: this also reproduces on the 12.x stream.
Run the following Node.js program from googleapis/nodejs-logging#668 (comment):
const http2 = require('http2');
const client = http2.connect('https://www.google.com');
client.on('error', (err) => console.error(err));
const req = client.request({ ':path': '/' });
req.on('response', (headers, flags) => {
for (const name in headers) {
console.log(`${name}: ${headers[name]}`);
}
});
req.setEncoding('utf8');
let data = '';
req.on('data', (chunk) => { data += chunk; });
req.on('end', () => {
console.log(`\nReceived ${data.length} bytes of data.`);
client.close();
});
req.end();Expected: There should be nothing logged to standard error.
Actual: A lot of messages are printed, such as:
send: reset nghttp2_active_outbound_item
send: aob->item = (nil)
stream: adjusting kept idle streams num_idle_streams=0, max=100
stream: adjusting kept idle streams num_idle_streams=0, max=100
send: end transmission of client magic
send: reset nghttp2_active_outbound_item
send: aob->item = (nil)
send: next frame: payloadlen=0, type=4, flags=0x00, stream_id=0
send: start transmitting frame type=4, length=9
stream: adjusting kept idle streams num_idle_streams=0, max=100
send: end transmission of a frame
send: reset nghttp2_active_outbound_item
send: aob->item = 0x5652b4afcfc8
stream: dep_add dep_stream(0x5652b4af38b8)=0, stream(0x5652b4af2f28)=1
deflatehd: deflating :scheme: https
deflatehd: name/value match index=6
deflatehd: emit indexed index=6, 1 bytes
deflatehd: deflating :authority: www.google.com:443
deflatehd: name match index=0
...
inflatehd: 11 bytes read
inflatehd: header emission: vary: Accept-Encoding
recv: proclen=13
inflatehd: start state=2
inflatehd: all input bytes were processed
inflatehd: in_final set
recv: proclen=0
stream: adjusting kept idle streams num_idle_streams=0, max=100
recv: connection recv_window_size=0, local_window=65535
...
recv: [IB_READ_HEAD]
recv: payloadlen=8, type=6, flags=0x00, stream_id=0
recv: PING
recv: [IB_READ_NBYTE]
recv: readlen=8, payloadleft=0, left=0
send: reset nghttp2_active_outbound_item
send: aob->item = (nil)
Metadata
Metadata
Assignees
Labels
No labels