Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

jenkins/agent:latest-windows not found #85

Closed
AlbMor opened this issue Sep 24, 2019 · 21 comments
Closed

jenkins/agent:latest-windows not found #85

AlbMor opened this issue Sep 24, 2019 · 21 comments
Assignees

Comments

@AlbMor
Copy link

AlbMor commented Sep 24, 2019

Hi

I would like to use the jenkins agent slave for Windows but when perfoming

docker pull jenkins/agent:latest-windows

I get

Error response from daemon: manifest for jenkins/agent:latest-windows not found: manifest unknown: manifest unknown

How can I get the right image for Windows?

Can you help me with it?

Alberto

@oleg-nenashev
Copy link
Member

oleg-nenashev commented Sep 24, 2019

I believe this is a documentation issue. We should not have listed production images and ongoing unreleased prototypes in the same list. CC @slide

@AlbMor
Copy link
Author

AlbMor commented Sep 24, 2019

Hi Oleg

Thanks for your info

Can you point out which is the image I need to use and how to use it?

I have used the

jenkins4eval/remoting:latest-windows

but when I run

docker run --rm -it jenkins4eval/remoting:latest-windows powershell

I get

C:\Program Files\Docker\Docker\Resources\bin\docker.exe: Error response from daemon: container 7bedc2877df4e3eff736d713e6177997e30acd2f92cac1b0d79260f7c34e3442 encountered an error during CreateProcess: failure in a Windows system call: The password for this account has expired. (0x532)
[Event Detail:  Provider: 00000000-0000-0000-0000-000000000000]
[Event Detail:  Provider: 00000000-0000-0000-0000-000000000000]
[Event Detail: onecore\vm\compute\management\orchestration\vmhostedcontainer\processmanagement.cpp(173)\vmcomputeagent.exe!00007FF7E5879D2B: (caller: 00007FF7E582E13A) Exception(6) tid(380) 80070532 The password for this account has expired.
    CallContext:[\Bridge_ProcessMessage\VmHostedContainer_ExecuteProcess]
 Provider: 00000000-0000-0000-0000-000000000000] extra info: {"CommandLine":"powershell","User":"jenkins","WorkingDirectory":"C:\\Users\\jenkins\\Jenkins","Environment":{"AGENT_WORKDIR":"C:/Users/jenkins/Jenkins/Agent","JAVA_BASE_URL":"https://github.com/AdoptOpenJDK/openjdk8-upstream-binaries/releases/download/jdk8u212-b04/OpenJDK8U-","JAVA_HOME":"C:\\openjdk-8","JAVA_URL_VERSION":"8u212b04","JAVA_VERSION":"8u212-b04"},"EmulateConsole":true,"CreateStdInPipe":true,"CreateStdOutPipe":true,"ConsoleSize":[69,226]}.

Can you help me with it?

Thanks

Alberto

@slide
Copy link
Member

slide commented Sep 24, 2019

Agreed, I should have put jenkins4eval since that is where the image is located.

Do you have a jenkins user on the host system?

@slide
Copy link
Member

slide commented Sep 24, 2019

See #86

@AlbMor
Copy link
Author

AlbMor commented Sep 24, 2019

@slide No I don´t have a jenkins user

Can you point out which are the steps to be able to use the jenkins4eval image?

@AlbMor AlbMor closed this as completed Sep 24, 2019
@AlbMor AlbMor reopened this Sep 24, 2019
@AlbMor
Copy link
Author

AlbMor commented Sep 24, 2019

Sorry i have hit the Close button :-)

@AlbMor
Copy link
Author

AlbMor commented Sep 25, 2019

Hi

Just info if someone is having the same issue

I can manage to run the image jenkins4eval/remoting:latest-windows rebuilding the image.

It seems that when we create the user inside the docker image the password expiring date is set

So what I have done is:

  1. rebuild the image locally with
docker build -t jenkinsagent_baseimage:0.1.0 .
  1. run the
docker run -it -v c:\tmp\JenkinsAgent\Agent:C:/Users/jenkins/Jenkins/Agent -v c:\tmp\JenkinsAgent\.jenkins:C:/Users/jenkins/Jenkins/.jenkins jenkinsagent_baseimage:0.1.0 powershell
  1. When inside the container run
net user jenkins

and get

PS C:\Users\jenkins\Jenkins> net user jenkins
User name                    jenkins
Full Name
Comment
User's comment
Country/region code          000 (System Default)
Account active               Yes
Account expires              Never

Password last set            9/25/2019 1:46:21 PM
Password expires             11/6/2019 1:46:21 PM
Password changeable          9/25/2019 1:46:21 PM
Password required            Yes
User may change password     Yes

Workstations allowed         All
Logon script
User profile
Home directory
Last logon                   9/25/2019 2:37:53 PM

Logon hours allowed          All

Local Group Memberships      *Users
Global Group memberships     *None
The command completed successfully.

So we can see that password exipires 11/6/2019 1:46:21 PM

4)Now I have built the image again adding

RUN Set-LocalUser -Name "$env:user" -PasswordNeverExpires $true

and now when I run the container with

docker run -it -v c:\tmp\JenkinsAgent\Agent:C:/Users/jenkins/Jenkins/Agent -v c:\tmp\JenkinsAgent\.jenkins:C:/Users/jenkins/Jenkins/.jenkins jenkinsagent_baseimage:0.1.0 powershell

and When inside the container run

net user jenkins

and I get

PS C:\Users\jenkins\Jenkins> net user jenkins
User name                    jenkins
Full Name
Comment
User's comment
Country/region code          000 (System Default)
Account active               Yes
Account expires              Never

Password last set            9/25/2019 1:46:21 PM
Password expires             Never
Password changeable          9/25/2019 1:46:21 PM
Password required            Yes
User may change password     Yes

Workstations allowed         All
Logon script
User profile
Home directory
Last logon                   9/25/2019 3:38:02 PM

Logon hours allowed          All

Local Group Memberships      *Users
Global Group memberships     *None
The command completed successfully.

We can see that the Password expires Never and therefore we avoid the issue with password expired

After this long explanation I would suggest to add

RUN Set-LocalUser -Name "$env:user" -PasswordNeverExpires $true

to the Dockerfile for windows

Let me know if this make sense

Alberto

@slide
Copy link
Member

slide commented Sep 25, 2019

Yeah, that makes sense. I'll update the PR. I'm working on getting this into automated build for the Windows image and automatic publishing to dockerhub

@slide slide self-assigned this Mar 5, 2020
@slide
Copy link
Member

slide commented Mar 5, 2020

FYI, this has been fixed, the jenkins/agent:latest-windows image is being published now.

@slide slide closed this as completed Mar 5, 2020
@Aamir010
Copy link

We are hitting the same issue. And I don't see the Jenkins image gets updated since last 2 months.

image

@chrismathis
Copy link

Same here.

@Aamir010
Copy link

I also try creating a new docker image by adding "RUN Set-LocalUser -Name "$env:user" -PasswordNeverExpires $true" on the existing Dockerfile, which leads the password expiration issue solved. But something new came up with the image. My k8s pods are killing itself after 100s.

@slide
Copy link
Member

slide commented Mar 16, 2020

Please file a new issue, the issue that this covered has been fixed. If there is a new issue, please file a new ticket.

@Aamir010
Copy link

I don't think it's fixed. Because with the original tag the password expiration issue was still there

@slide
Copy link
Member

slide commented Mar 16, 2020

The original issue is that the image wasn't being published. It is being published, now there are additional issues.

@Aamir010
Copy link

If that was published than do you mind pointing me to the right docker image and tag ?

@Aamir010
Copy link

I tried the same image which returns password expiration error

@chrismathis
Copy link

Should there be -PasswordNeverExpires in the Image History?
Can you please check if that really got published?

@Aamir010
Copy link

Aamir010 commented Mar 16, 2020 via email

@tomikapc
Copy link

Whoever encounters this problem, this might be helpful:
FROM jenkins/jnlp-agent:latest-windows

USER ContainerAdministrator

RUN Set-LocalUser -Name "Jenkins" -PasswordNeverExpires $true

USER Jenkins

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants