linux-on-ibm-z / docs

A collection of instructions and tutorials to help you get your favorite software up and running on Linux on z
147 stars 58 forks source link

Building Kibana - TLS error when downloading dependencies (Manual Setup) #36

Open Bubsavvage opened 4 years ago

Bubsavvage commented 4 years ago

Followed the instructions exactly, but having issues on the kibana build step :

Command : yarn build --skip-os-packages --oss

Error : info [ global ] Downloading node.js builds for all platforms │ERROR failure │ERROR Error: Client network socket disconnected before secure TLS connection was established │ at TLSSocket.onConnectEnd (_tls_wrap.js:1088:19) │ at Object.onceWrapper (events.js:277:13) │ at TLSSocket.emit (events.js:194:15) │ at endReadableNT (_stream_readable.js:1103:12) │ at process._tickCallback (internal/process/next_tick.js:63:19)

It seems that nodejs has a big problem with ignoring-tls at the required version for this document. Generally there is a ingore-ssl flag that allows our team to bypass this. Perhaps you guys know the correct way around this issue? We are currently blocked by this problem.

Nayana-ibm commented 4 years ago

@jajohnsonpro We followed exact same steps however we didn't face mentioned issue and build completed successfully. Can you please give us more info like - Openssl version that is installed at your end, it is OpenSSL 1.0.2g with TLSv1.2? If you could check whether nodejs download link is blocked on the system (while using proxy)?

Bubsavvage commented 4 years ago

Sorry it took so long to get back with you. I tried this with openssl versions 1.0.2t, 1.0.2g, and 1.1.0l. Still no luck. I tried to run node with a https get command with the corporate proxy for nodejs.org, but got the same error ECONNREST. Is there possibly some sort of NodeJS environment variable that may have been missed in the documentation?

lcada commented 4 years ago

Hi, where youre probably going is hardcoded in https:// in https://github.com/elastic/kibana/blob/ec78348db74ec3eb618d01c171563f63229cbeb7/src/dev/ci_setup/setup_env.sh https://github.com/elastic/kibana/blob/b54c1a1d2be4ab4b91477b13b313cbbbb2ec5796/src/dev/build/tasks/nodejs/node_download_info.js https://github.com/elastic/kibana/blob/b54c1a1d2be4ab4b91477b13b313cbbbb2ec5796/src/dev/build/tasks/nodejs/node_shasums.ts https://github.com/elastic/kibana/blob/b54c1a1d2be4ab4b91477b13b313cbbbb2ec5796/src/dev/build/tasks/nodejs/node_shasums.test.ts which is us-central1-elastic-kibana-184716.cloudfunctions.net you can try to openssl test what tls level they tolerate. You can also put --verbose on the yarn build although probably wont give you much. Try some or all of these as well: ENV http_proxy=http:// ENV https_proxy=http:// ENV HTTP_PROXY=http:// ENV HTTPS_PROXY=http:// ENV NODE_TLS_REJECT_UNAUTHORIZED=0 npm config --global set strict-ssl false npm config --global set cafile npm config --global set proxy http:// npm config --global set https-proxy http:// npm config --global set registry http://registry.npmjs.org/ yarn config set registry http://registry.yarnpkg.com --global yarn config set --global strict-ssl false yarn config set --global proxy http:// yarn config set --global https-proxy http:// yarn config --global set cafile Let me know if that helps

rposts commented 4 years ago

@jajohnsonpro I am unable to reproduce it either:

 info [  global  ] Downloading node.js builds for all platforms
   debg Attempting download of https://us-central1-elastic-kibana-184716.cloudfunctions.net/kibana-ci-proxy-cache/dist/v10.15.2/node-v10.15.2-darwin-x64.tar.gz 8bbb6c15a0572f493d33ef044d06ccd0ff7ead8daa67f9a32df3e863277568e8
....
Downloaded https://us-central1-elastic-kibana-184716.cloudfunctions.net/kibana-ci-proxy-cache/dist/v10.15.2/node-v10.15.2-darwin-x64.tar.gz and verified checksum
....
 info [  global  ] Extracting node.js builds for all platforms