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

Access denied on Windows system AppData after clicking on 'Build Now'

    Details

    • Type: Bug
    • Status: Fixed but Unreleased (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Component/s: git-plugin
    • Labels:
      None
    • Environment:
      Jenkins: 2.249 | OS: Windows 10 Home Edition | Plugins: Git, Go
    • Similar Issues:

      Description

      > git.exe rev-list --no-walk 53d075b33f29d31dd0dcba44c08abbfa42b087e2 # timeout=10
      java.nio.file.AccessDeniedException: C:\Windows\system32\config\systemprofile\AppData\Local\Jenkins.jenkins\workspace\GO Sample@script\jenkins
      at java.base/sun.nio.fs.WindowsException.translateToIOException(WindowsException.java:89)
      at java.base/sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:103)
      at java.base/sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:108)
      at java.base/sun.nio.fs.WindowsFileSystemProvider.newByteChannel(WindowsFileSystemProvider.java:235)
      at java.base/java.nio.file.Files.newByteChannel(Files.java:370)
      at java.base/java.nio.file.Files.newByteChannel(Files.java:421)
      at java.base/java.nio.file.Files.readAllBytes(Files.java:3205)
      at hudson.FilePath$ReadToString.invoke(FilePath.java:2083)
      at hudson.FilePath$ReadToString.invoke(FilePath.java:2079)
      at hudson.FilePath.act(FilePath.java:1076)
      at hudson.FilePath.act(FilePath.java:1059)
      at hudson.FilePath.readToString(FilePath.java:2077)
      at org.jenkinsci.plugins.workflow.cps.CpsScmFlowDefinition.create(CpsScmFlowDefinition.java:184)
      at org.jenkinsci.plugins.workflow.cps.CpsScmFlowDefinition.create(CpsScmFlowDefinition.java:69)
      at org.jenkinsci.plugins.workflow.job.WorkflowRun.run(WorkflowRun.java:309)
      at hudson.model.ResourceController.execute(ResourceController.java:97)
      at hudson.model.Executor.run(Executor.java:428)
      Finished: FAILURE

        Attachments

        1. build_triggers.png
          build_triggers.png
          15 kB
        2. general.png
          general.png
          21 kB
        3. pipeline.png
          pipeline.png
          28 kB

          Activity

          Show
          jgonito Jerick Gonito added a comment - - edited I am new to jenkins so please, let me know what other details you need in order to resolve this issue. Thanks!  This a pipeline item, btw. Please see the attached files for my configuration.
          Hide
          markewaite Mark Waite added a comment - - edited

          I think that you're looking for help to diagnose a configuration issue, not reporting a bug. Since you're running a recent Jenkins weekly build (2.249) on Windows, I assume that you probably installed Jenkins with the Jenkins Windows installer. Can you confirm that is how Jenkins was installed?

          It is usually best to seek assistance for configuration issues in the chat system or in the Jenkins users mailing list.

          A bug report is typically seen by very few people and every time those very few people assist with a configuration related issue, they are reducing the amount of time they can work on bugs and the time they can work on new features.

          The chat systems and the mailing lists have many, many members and they are often able to assist with this type of question.

          Some of the questions that they will likely ask include:

          • How was Jenkins installed (MSI installer, or launched from a Windows command prompt)?
          • What user account is running the Jenkins process?
          • Does the user account running the Jenkins process have permission to write to the directory that is reporting "Access Denied"?
          • What are the environment variables set in the Jenkins process?
          • Do other versions of Jenkins show the same behavior (like 2.250 or 2.248 or 2.235.3)?
          Show
          markewaite Mark Waite added a comment - - edited I think that you're looking for help to diagnose a configuration issue, not reporting a bug. Since you're running a recent Jenkins weekly build (2.249) on Windows, I assume that you probably installed Jenkins with the Jenkins Windows installer. Can you confirm that is how Jenkins was installed? It is usually best to seek assistance for configuration issues in the chat system or in the Jenkins users mailing list . A bug report is typically seen by very few people and every time those very few people assist with a configuration related issue, they are reducing the amount of time they can work on bugs and the time they can work on new features. The chat systems and the mailing lists have many, many members and they are often able to assist with this type of question. Some of the questions that they will likely ask include: How was Jenkins installed (MSI installer, or launched from a Windows command prompt)? What user account is running the Jenkins process? Does the user account running the Jenkins process have permission to write to the directory that is reporting "Access Denied"? What are the environment variables set in the Jenkins process? Do other versions of Jenkins show the same behavior (like 2.250 or 2.248 or 2.235.3)?
          Hide
          jgonito Jerick Gonito added a comment -

          Thanks for the immediate response. Actually, before I filed an issue about this, I already checked the permission of the user running Jenkins, it has a full control access on that folder Jenkins is trying to access to. And yes, I used an msi file to install Jenkins on my laptop. I will seek assistance on the chat system and once resolved, I'll closed this ticket. Thanks again.

          Show
          jgonito Jerick Gonito added a comment - Thanks for the immediate response. Actually, before I filed an issue about this, I already checked the permission of the user running Jenkins, it has a full control access on that folder Jenkins is trying to access to. And yes, I used an msi file to install Jenkins on my laptop. I will seek assistance on the chat system and once resolved, I'll closed this ticket. Thanks again.
          Hide
          markewaite Mark Waite added a comment -

          That's a good plan. I've installed Jenkins 2.235.3 on Windows with the MSI installer and am successfully running builds with it.

          Show
          markewaite Mark Waite added a comment - That's a good plan. I've installed Jenkins 2.235.3 on Windows with the MSI installer and am successfully running builds with it.
          Hide
          slide_o_mix Alex Earl added a comment -

          Are you running Jenkins as LocalSystem?

          Show
          slide_o_mix Alex Earl added a comment - Are you running Jenkins as LocalSystem?
          Hide
          markewaite Mark Waite added a comment -

          Jerick Gonito were you able to resolve the issue? If not, can you provide more information about the conditions that cause it?

          Show
          markewaite Mark Waite added a comment - Jerick Gonito were you able to resolve the issue? If not, can you provide more information about the conditions that cause it?
          Hide
          jgonito Jerick Gonito added a comment - - edited

          Oh yes, this issue is already resolved. It seems that the error is not with Jenkins but with my setup of Golang workspace. Will close this now, thanks everyone!

          Show
          jgonito Jerick Gonito added a comment - - edited Oh yes, this issue is already resolved. It seems that the error is not with Jenkins but with my setup of Golang workspace. Will close this now, thanks everyone!

            People

            • Assignee:
              Unassigned
              Reporter:
              jgonito Jerick Gonito
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: