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

Unable to run init script after upgrade to 1823.v828850f7f155

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • ec2-plugin
    • None
    • 1864.v6fc4480cb_8fb_

      Follow-up ticket of https://issues.jenkins.io/browse/JENKINS-75187?focusedId=452183&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-452183


      Original comment:

      Our agents are also connected with "Unix Launcher" method and have Windows OpenSSH installed. However, we have an init script and that fails. If I remove that it connects - haven't tested if a job can actually run on it though.
      This is the init script:

      powershell C:\\Users\\User\\computer_rename.ps1
      powershell -Command "Start-Service -Name 'Alloy'"          

       

          [JENKINS-75230] Unable to run init script after upgrade to 1823.v828850f7f155

          Jean-Marc Desprez created issue -
          Jean-Marc Desprez made changes -
          Status Original: Open [ 1 ] New: In Progress [ 3 ]
          Jean-Marc Desprez made changes -
          Status Original: In Progress [ 3 ] New: In Review [ 10005 ]
          Jean-Marc Desprez made changes -
          Remote Link New: This issue links to "Pull request (Web Link)" [ 30527 ]
          Steve Freitas made changes -
          Comment [ Same configuration as you mentioned, however in our case clearing the init script did not help. It looks like maybe it's tripping over creation of a temp directory we have specified:
          {code:java}
          INFO: Creating tmp directory (C:\\temp) if it does not exist
          A subdirectory or file -p already exists.
          Error occurred while processing: -p.
          A subdirectory or file C:\\temp already exists.
          Error occurred while processing: C:\\temp.
          'test' is not recognized as an internal or external command,
          operable program or batch file.
          Feb 11, 2025 8:42:24 PM hudson.plugins.ec2.EC2Cloud
          INFO: Executing init script
          Feb 11, 2025 8:42:25 PM hudson.plugins.ec2.EC2Cloud
          INFO: Creating ~/.hudson-run-init
          Feb 11, 2025 8:42:25 PM hudson.plugins.ec2.EC2Cloud
          WARNING: init script failed: exit code=1 {code}
          Hard to tell exactly what was causing the error, though, since connecting via SSH to Windows agents creates so much noise in the logs running commands that don't work anyway, but after reverting to 1801.v526399543dca_ it started working again and that part of the log looks like this:
          {code:java}
          INFO: Creating tmp directory (C:\\temp) if it does not exist
          Feb 11, 2025 8:47:33 PM hudson.plugins.ec2.EC2Cloud
          INFO: Verifying: java -fullversion
          java full version "21.0.6+8-LTS-188" {code} ]
          Jean-Marc Desprez made changes -
          Released As New: 1864.v6fc4480cb_8fb_
          Resolution New: Fixed [ 1 ]
          Status Original: In Review [ 10005 ] New: Resolved [ 5 ]

            jmdesprez Jean-Marc Desprez
            jmdesprez Jean-Marc Desprez
            Votes:
            5 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: