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

Noisy output from HTTP2 stack with NodeSource Node.js #995

Closed
sffc opened this issue Jan 12, 2020 · 1 comment
Closed

Noisy output from HTTP2 stack with NodeSource Node.js #995

sffc opened this issue Jan 12, 2020 · 1 comment

Comments

@sffc
Copy link

sffc commented Jan 12, 2020

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 nodejs

Note: 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)
@igsu
Copy link
Contributor

igsu commented Feb 10, 2020

@sffc this issue is not related to the way we build RPMs, but to Node.js itself. You can replicate this with our RPMs or taking any other available Node.js binary (I could replicate it in CentOS 8 using the Appstream repo).

I recommend you report it to the Node project.

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