jenkinsci / npm-yarn-wrapper-steps-plugin

A Jenkins plugin for convenient usage of npm and yarn in pipelines
https://plugins.jenkins.io/npm-yarn-wrapper-steps/
MIT License
2 stars 2 forks source link

node: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.xx' not found (required by node) #17

Open Will-N3t opened 1 year ago

Will-N3t commented 1 year ago

Jenkins and plugins versions report

Environment ```text Jenkins: 2.346.2 OS: Linux - 4.14.248-189.473.amzn2.x86_64 --- ace-editor:1.1 amazon-ecr:1.73.v741d474abe74 ansicolor:1.0.2 ant:475.vf34069fef73c antisamy-markup-formatter:2.7 apache-httpcomponents-client-4-api:4.5.13-138.v4e7d9a_7b_a_e61 authentication-tokens:1.4 aws-credentials:191.vcb_f183ce58b_9 aws-java-sdk:1.12.246-349.v96b_b_f7eb_a_c3c aws-java-sdk-cloudformation:1.12.246-349.v96b_b_f7eb_a_c3c aws-java-sdk-codebuild:1.12.246-349.v96b_b_f7eb_a_c3c aws-java-sdk-ec2:1.12.246-349.v96b_b_f7eb_a_c3c aws-java-sdk-ecr:1.12.246-349.v96b_b_f7eb_a_c3c aws-java-sdk-ecs:1.12.246-349.v96b_b_f7eb_a_c3c aws-java-sdk-elasticbeanstalk:1.12.246-349.v96b_b_f7eb_a_c3c aws-java-sdk-iam:1.12.246-349.v96b_b_f7eb_a_c3c aws-java-sdk-logs:1.12.246-349.v96b_b_f7eb_a_c3c aws-java-sdk-minimal:1.12.246-349.v96b_b_f7eb_a_c3c aws-java-sdk-sns:1.12.246-349.v96b_b_f7eb_a_c3c aws-java-sdk-sqs:1.12.246-349.v96b_b_f7eb_a_c3c aws-java-sdk-ssm:1.12.246-349.v96b_b_f7eb_a_c3c blueocean:1.25.6 blueocean-autofavorite:1.2.5 blueocean-bitbucket-pipeline:1.25.6 blueocean-commons:1.25.6 blueocean-config:1.25.6 blueocean-core-js:1.25.6 blueocean-dashboard:1.25.6 blueocean-display-url:2.4.1 blueocean-events:1.25.6 blueocean-git-pipeline:1.25.6 blueocean-github-pipeline:1.25.6 blueocean-i18n:1.25.6 blueocean-jira:1.25.6 blueocean-jwt:1.25.6 blueocean-personalization:1.25.6 blueocean-pipeline-api-impl:1.25.6 blueocean-pipeline-editor:1.25.6 blueocean-pipeline-scm-api:1.25.6 blueocean-rest:1.25.6 blueocean-rest-impl:1.25.6 blueocean-web:1.25.6 bootstrap4-api:4.6.0-5 bootstrap5-api:5.2.0-1 bouncycastle-api:2.26 branch-api:2.1046.v0ca_37783ecc5 build-timeout:1.21 build-timestamp:1.0.3 build-token-root:151.va_e52fe3215fc build-user-vars-plugin:1.9 build-with-parameters:1.6 buildgraph-view:1.8 built-on-column:1.1 caffeine-api:2.9.3-65.v6a_47d0f4d1fe checks-api:1.7.5 cloudbees-bitbucket-branch-source:785.ve724eb_44e286 cloudbees-folder:6.740.ve4f4ffa_dea_54 command-launcher:84.v4a_97f2027398 commons-lang3-api:3.12.0-36.vd97de6465d5b_ commons-text-api:1.10.0-27.vb_fa_3896786a_7 conditional-buildstep:1.4.2 config-file-provider:3.11.1 copyartifact:1.46.4 credentials:1139.veb_9579fca_33b_ credentials-binding:523.vd859a_4b_122e6 cvs:2.19.1 depgraph-view:1.0.5 display-url-api:2.3.6 docker-commons:1.19 docker-custom-build-environment:1.8.0-SNAPSHOT (private-fc797d1d-dennis) docker-java-api:3.2.13-37.vf3411c9828b9 docker-plugin:1.2.9 docker-workflow:521.v1a_a_dd2073b_2e durable-task:500.v8927d9fd99d8 echarts-api:5.3.3-1 email-ext:2.91 envinject:2.875.v9b_9e962da_a_ec envinject-api:1.199.v3ce31253ed13 extended-choice-parameter:359.v35dcfdd0c20d external-monitor-job:192.ve979ca_8b_3ccd favorite:2.4.1 flexible-publish:0.16.1 font-awesome-api:6.1.2-1 git:4.11.4 git-client:3.11.2 git-parameter:0.9.18 git-server:1.11 github:1.34.5 github-api:1.303-400.v35c2d8258028 github-branch-source:1677.v731f745ea_0cf github-checks:1.0.19 github-oauth:0.39 gradle:1.39.4 handlebars:3.0.8 handy-uri-templates-2-api:2.1.8-22.v77d5b_75e6953 htmlpublisher:1.30 ionicons-api:31.v4757b_6987003 jackson2-api:2.13.3-285.vc03c0256d517 jakarta-activation-api:2.0.1-1 jakarta-mail-api:2.0.1-1 javadoc:226.v71211feb_e7e9 javax-activation-api:1.2.0-4 javax-mail-api:1.6.2-7 jaxb:2.3.6-1 jdk-tool:55.v1b_32b_6ca_f9ca jenkins-design-language:1.25.6 jenkins-multijob-plugin:611.v9d3180d752e6 jira:3.7.1 jjwt-api:0.11.5-77.v646c772fddb_0 jobConfigHistory:1165.v8cc9fd1f4597 jquery:1.12.4-1 jquery-detached:1.2.1 jquery3-api:3.6.0-4 jsch:0.1.55.61.va_e9ee26616e7 junit:1119.1121.vc43d0fc45561 ldap:2.11 lockable-resources:2.16 mailer:435.v79ef3972b_5c7 mapdb-api:1.0.9-28.vf251ce40855d matrix-auth:3.1.5 matrix-project:772.v494f19991984 maven-plugin:3.19 mercurial:2.16.2 mina-sshd-api-common:2.8.0-36.v8e25ce90d4b_1 mina-sshd-api-core:2.8.0-36.v8e25ce90d4b_1 momentjs:1.1.1 multiple-scms:0.8 naginator:1.18.1 nodejs:1.5.1 nodelabelparameter:1.11.0 notification:1.15 npm-yarn-wrapper-steps:0.4.0 oauth-credentials:0.5 okhttp-api:4.9.3-108.v0feda04578cf pagerduty:0.7.0 pam-auth:1.10 parameterized-trigger:2.45 pipeline-aws:1.43 pipeline-build-step:2.18 pipeline-github-lib:38.v445716ea_edda_ pipeline-graph-analysis:195.v5812d95a_a_2f9 pipeline-groovy-lib:613.v9c41a_160233f pipeline-input-step:449.v77f0e8b_845c4 pipeline-milestone-step:101.vd572fef9d926 pipeline-model-api:2.2114.v2654ca_721309 pipeline-model-definition:2.2114.v2654ca_721309 pipeline-model-extensions:2.2114.v2654ca_721309 pipeline-rest-api:2.24 pipeline-stage-step:293.v200037eefcd5 pipeline-stage-tags-metadata:2.2114.v2654ca_721309 pipeline-stage-view:2.24 pipeline-utility-steps:2.14.0 plain-credentials:139.ved2b_9cf7587b plugin-util-api:2.17.0 popper-api:1.16.1-3 popper2-api:2.11.5-2 postbuildscript:3.1.0-375.v3db_cd92485e1 project-inheritance:21.04.03 promoted-builds:881.vb_72da_69ffca_1 pubsub-light:1.16 rebuild:1.34 resource-disposer:0.19 run-condition:1.5 s3:0.12.1 saml:2.333.vc81e525974a_c scm-api:621.vda_a_b_055e58f7 scoring-load-balancer:1.0.1 script-security:1228.vd93135a_2fb_25 slack:616.v03b_1e98d13dd snakeyaml-api:1.30.2-76.vc104f7ce9870 sonar:2.14 sse-gateway:1.25 ssh-agent:295.v9ca_a_1c7cc3a_a_ ssh-credentials:295.vced876c18eb_4 ssh-slaves:1.834.v622da_57f702c sshd:3.242.va_db_9da_b_26a_c3 structs:324.va_f5d6774f3a_d subversion:2.16.0 throttle-concurrents:2.8 timestamper:1.18 token-macro:308.v4f2b_ed62b_b_16 translation:1.16 trilead-api:1.67.vc3938a_35172f variant:59.vf075fe829ccb windows-slaves:1.8.1 workflow-aggregator:590.v6a_d052e5a_a_b_5 workflow-api:1192.v2d0deb_19d212 workflow-basic-steps:991.v43d80fea_ff66 workflow-cps:2803.v1a_f77ffcc773 workflow-cps-global-lib:609.vd95673f149b_b workflow-durable-task-step:1199.v02b_9244f8064 workflow-job:1207.ve6191ff089f8 workflow-multibranch:716.vc692a_e52371b_ workflow-scm-step:400.v6b_89a_1317c9a_ workflow-step-api:639.v6eca_cd8c04a_a_ workflow-support:838.va_3a_087b_4055b ws-cleanup:0.42 xcode-plugin:2.0.17-565.v1c48051d46ef ```

What Operating System are you using (both controller, and any agents involved in the problem)?

Jenkins Controller and Agent OS: Linux - 4.14.248-189.473.amzn2.x86_64

Reproduction steps

  1. In a scripted pipeline, use the withNPMWrapper step E.g:
    withNPMWrapper(credentialsId: "jenkins-npm-credentials")
    {
    npm "--version"
    }
  2. Observe the following in the console output from the job:

    [Pipeline] withNPMWrapper
           Downloading and installing node v19.5.0...
           Downloading https://nodejs.org/dist/v19.5.0/node-v19.5.0-linux-x64.tar.xz...
    
           ######################################################################## 100.0%
           Computing checksum with sha256sum
           Checksums matched!
           node: /lib/x86_64-linux-gnu/libm.so.6: version `GLIBC_2.27' not found (required by node)
           node: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.25' not found (required by node)
           node: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.28' not found (required by node)
           nvm is not compatible with the npm config "prefix" option: currently set to ""
           Run `npm config delete prefix` or `nvm use --delete-prefix v19.5.0` to unset it.
    [Pipeline] // withNPMWrapper
    [Pipeline] }
    [Pipeline] // stage
    [Pipeline] }
    [Pipeline] // node
    [Pipeline] End of Pipeline
           ERROR: 
    Finished: FAILURE

N.B: This is in Jenkins 2.346.2 with plugin version 0.4.0

Expected Results

Expected to be able to enter the code block and use npm and yarn (in this case npm "--version")

Actual Results

Pipeline exits with errors immediately and does not go into the code block:

node: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.28' not found (required by node)
nvm is not compatible with the npm config "prefix" option: currently set to ""
Run `npm config delete prefix` or `nvm use --delete-prefix v19.5.0` to unset it.

Anything else?

Apparently this issue is specific to later versions of node - it would be nice to be able to specify the version of node/npm/yarn to be used as part of the step to counteract this.

Jenfong commented 11 months ago

It's seem conflict with plugin"'NodeJS Plugin" 1.6.1, which provideed 'Provide Node & npm bin/ folder to PATH' in NodeJS job.

Started by user [admin](http://127.0.0.1:8088/user/admin)
Running as SYSTEM
Building on the built-in node in workspace /root/.jenkins/workspace/dev.u_resource
v21.4.0 is already installed.
Now using node v21.4.0 (npm v)
node: /lib64/libm.so.6: version `GLIBC_2.27' not found (required by node)
node: /lib64/libstdc++.so.6: version `GLIBCXX_3.4.20' not found (required by node)
node: /lib64/libstdc++.so.6: version `CXXABI_1.3.9' not found (required by node)
node: /lib64/libstdc++.so.6: version `GLIBCXX_3.4.21' not found (required by node)
node: /lib64/libc.so.6: version `GLIBC_2.27' not found (required by node)
node: /lib64/libc.so.6: version `GLIBC_2.28' not found (required by node)
node: /lib64/libc.so.6: version `GLIBC_2.25' not found (required by node)
ERROR: 
Finished: FAILURE