Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-67819

java.io.IOException references a file that is not inside

    XMLWordPrintable

Details

    • 564.ve62a_4eb_b_e039

    Description

      After updating Pipeline: Groovy to 2656.vf7a_e7b_75a_457 do to security issue notification, the jobs fails with that message:

      ```
      18:18:02 > git fetch --tags --progress https://url_xxx/yyy.git +refs/heads/:refs/remotes/origin/ # timeout=10
      18:18:03 > git rev-parse refs/remotes/origin/branch_name^

      {commit}

      # timeout=10
      18:18:03 Checking out Revision 7f130050d612342343c086b5db9c2eeaace15527 (refs/remotes/origin/branch_name)
      18:18:03 > git config core.sparsecheckout # timeout=10
      18:18:03 > git checkout -f 7f130050d612342343c086b5db9c2eeaace15527 # timeout=10
      18:18:03 Commit message: "commit info"
      18:18:03 > git rev-list --no-walk 7f130050d610038b763c086b5db9c2eeaace1557 # timeout=10
      18:18:03 java.io.IOException: /workspace/Jobname@script/d66caf2122ef01ed58f1296c9a71a0012423432344e53d67520a5c62/jenkins.groovy references a file that is not inside /workspace/Jobname@script/d66caf2122ef01ed58f1296c9a71a0012423432344e53d67520a5c62
      18:18:03 at org.jenkinsci.plugins.workflow.cps.CpsScmFlowDefinition.create(CpsScmFlowDefinition.java:183)
      18:18:03 at org.jenkinsci.plugins.workflow.cps.CpsScmFlowDefinition.create(CpsScmFlowDefinition.java:70)
      18:18:03 at org.jenkinsci.plugins.workflow.job.WorkflowRun.run(WorkflowRun.java:310)
      18:18:03 at hudson.model.ResourceController.execute(ResourceController.java:99)
      18:18:03 at hudson.model.Executor.run(Executor.java:432)
      18:18:03 Finished: FAILURE
      ```

      Attachments

        Issue Links

          Activity

            ostrer Mark Ostrer added a comment -

            Same issue after yesterday upgrade

            In Bitbucket MultiBranch project branches builds fine, but PRs fails with  java.io.IOException: .... jenkinsfile references a file that is not inside ....

            ostrer Mark Ostrer added a comment - Same issue after yesterday upgrade In Bitbucket MultiBranch project branches builds fine, but PRs fails with  java.io.IOException: .... jenkinsfile references a file that is not inside ....

            Had to roll back to 2648.va9433432b33c version of Pipeline: Groovy plugin

            nitrogear Oleksii Grinko added a comment - Had to roll back to 2648.va9433432b33c version of Pipeline: Groovy plugin

            Issue applies to workflow-cps-global-lib-plugin (aka Pipeline: Shared Groovy Libraries) as well. Had to roll back to previous versions.

            ERROR: path/to/some/file references a file that is not contained within the library: NameOfTheLibrary
            
            strangelookingnerd Daniel Krämer added a comment - Issue applies to workflow-cps-global-lib-plugin (aka Pipeline: Shared Groovy Libraries) as well. Had to roll back to previous versions. ERROR: path/to/some/file references a file that is not contained within the library: NameOfTheLibrary
            basil Basil Crow added a comment -

            pliops_jonathan ostrer nitrogear strangelookingnerd Please upgrade to 564.ve62a_4eb_b_e039 and confirm that the issue has been resolved. Thanks!

            basil Basil Crow added a comment - pliops_jonathan ostrer nitrogear strangelookingnerd Please upgrade to 564.ve62a_4eb_b_e039 and confirm that the issue has been resolved. Thanks!
            dnusbaum Devin Nusbaum added a comment -

            Also just to check, do the people who ran into this have symlinks as part of the path to JENKINS_HOME or the workspace directory? Or is there some other configuration that is also causing the issue?

            dnusbaum Devin Nusbaum added a comment - Also just to check, do the people who ran into this have symlinks as part of the path to JENKINS_HOME or the workspace directory? Or is there some other configuration that is also causing the issue?
            pliops_jonathan Jonathan E added a comment -

            basil Working for me, thank you!

            pliops_jonathan Jonathan E added a comment - basil Working for me, thank you!
            okopecky Ondrej added a comment - - edited

            I am facing this issue and indeed the JENKINS_HOME is pointing to /var/lib/jenkins while that is a symlink to a folder where extra partition is mount.

            What's wrong with that?

            Default pipeline file for this job just includes a common pipeline template which is located outside of the repository.

            okopecky Ondrej added a comment - - edited I am facing this issue and indeed the JENKINS_HOME is pointing to /var/lib/jenkins while that is a symlink to a folder where extra partition is mount. What's wrong with that? Default pipeline file for this job just includes a common pipeline template which is located outside of the repository.
            okopecky Ondrej added a comment -

            Changing JENKINS_HOME to the actual path fixed the problem.

            okopecky Ondrej added a comment - Changing JENKINS_HOME to the actual path fixed the problem.
            dnusbaum Devin Nusbaum added a comment -

            There is not any specific issue with having JENKINS_HOME contain symlinks, but I did not anticipate that case when writing the original security fixes that introduced the exception users are seeing. The latest versions of Pipeline: Groovy (2659.v52d3de6044d0) and Pipeline: Shared Groovy Libraries (564.ve62a_4eb_b_e039) should fix any issues related to legitimate symlinks.

            dnusbaum Devin Nusbaum added a comment - There is not any specific issue with having JENKINS_HOME contain symlinks, but I did not anticipate that case when writing the original security fixes that introduced the exception users are seeing. The latest versions of Pipeline: Groovy (2659.v52d3de6044d0) and Pipeline: Shared Groovy Libraries (564.ve62a_4eb_b_e039) should fix any issues related to legitimate symlinks.
            nitrogear Oleksii Grinko added a comment - - edited

            Update to Pipeline: Shared Groovy Libraries (564.ve62a_4eb_b_e039) helped to fix the issue

            nitrogear Oleksii Grinko added a comment - - edited Update to Pipeline: Shared Groovy Libraries (564.ve62a_4eb_b_e039) helped to fix the issue

            basil: Issue fixed with latest versions. Thanks!

            strangelookingnerd Daniel Krämer added a comment - basil : Issue fixed with latest versions. Thanks!

            People

              dnusbaum Devin Nusbaum
              pliops_jonathan Jonathan E
              Votes:
              2 Vote for this issue
              Watchers:
              8 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: