[JIRA] (JENKINS-58788) EC2 Plugin throwing NullPointer exception when connecting to Windows agent.

6 views
Skip to first unread message

bittebrown@gmail.com (JIRA)

unread,
Aug 2, 2019, 11:37:02 AM8/2/19
to jenkinsc...@googlegroups.com
Tim Brown created an issue
 
Jenkins / Bug JENKINS-58788
EC2 Plugin throwing NullPointer exception when connecting to Windows agent.
Issue Type: Bug Bug
Assignee: FABRIZIO MANFREDI
Components: ec2-plugin
Created: 2019-08-02 15:36
Environment: Docker, windows
Priority: Major Major
Reporter: Tim Brown

I was using the latest jenkins/jenkins:lts container(2.176.1), and moved to the jenkins/jenkins container (2.187), but same issue. I am also using the latest ec2-plugin version (1.44.1)
am using
The code and the exception are below.
Exception:

Connecting to (34.245.65.86) with WinRM as Administrator
Waiting for WinRM to come up. Sleeping 10s.
Connecting to (34.245.65.86) with WinRM as Administrator
Waiting for WinRM to come up. Sleeping 10s.
ERROR: Unexpected error in launching an agent. This is probably a bug in Jenkins
java.lang.NullPointerException
	at hudson.plugins.ec2.win.EC2WindowsLauncher.connectToWinRM(EC2WindowsLauncher.java:123)
	at hudson.plugins.ec2.win.EC2WindowsLauncher.launchScript(EC2WindowsLauncher.java:37)
	at hudson.plugins.ec2.EC2ComputerLauncher.launch(EC2ComputerLauncher.java:48)
	at hudson.slaves.SlaveComputer$1.call(SlaveComputer.java:294)
	at jenkins.util.ContextResettingExecutorService$2.call(ContextResettingExecutorService.java:46)
	at jenkins.security.ImpersonatingExecutorService$2.call(ImpersonatingExecutorService.java:71)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:748)

Code:

119:                    throw new AmazonClientException("Timed out after " + (waitTime / 1000)
120:                            + " seconds of waiting for winrm to be connected");
121:               }
122:                Instance instance = computer.updateInstanceDescription();
123:                String host = EC2HostAddressProvider.windows(instance, computer.getSlaveTemplate().connectionStrategy);
124:
125:                if ("0.0.0.0".equals(host)) {

If I were to guess I would say computer.getSlaveTemplate() is returning null (which looks like computer.getNode() returns null), but I'm not a Java programmer.

Here is a full list of my plugin versions:

ace-editor:1.1
amazon-ecr:1.6
antisamy-markup-formatter:1.5
apache-httpcomponents-client-4-api:4.5.5-3.0
authentication-tokens:1.3
aws-credentials:1.27
aws-java-sdk:1.11.594
bouncycastle-api:2.17
branch-api:2.5.4
cloudbees-folder:6.9
command-launcher:1.3
configuration-as-code:1.25
configuration-as-code-support:1.18
credentials:2.2.1
credentials-binding:1.19
display-url-api:2.3.1
docker-build-publish:1.3.2
docker-commons:1.15
docker-java-api:3.0.14
docker-plugin:1.1.7
docker-workflow:1.18
dtkit-api:2.1.1-1
durable-task:1.30
ec2:1.44.1
external-monitor-job:1.7
git:3.11.0
git-client:2.8.0
git-server:1.7
greenballs:1.15
groovy:2.2
handlebars:1.1.1
jackson2-api:2.9.9.1
jdk-tool:1.3
job-dsl:1.74
jquery-detached:1.2.1
jsch:0.1.55.1
junit:1.28
last-changes:2.7.5
ldap:1.20
lockable-resources:2.5
mailer:1.24
mapdb-api:1.0.9.0
matrix-auth:2.4.2
matrix-project:1.14
momentjs:1.1.1
node-iterator-api:1.5.0
pam-auth:1.5.1
phabricator-plugin:2.1.2
pipeline-build-step:2.9
pipeline-graph-analysis:1.10
pipeline-input-step:2.10
pipeline-milestone-step:1.3.1
pipeline-model-api:1.3.9
pipeline-model-declarative-agent:1.1.1
pipeline-model-definition:1.3.9
pipeline-model-extensions:1.3.9
pipeline-rest-api:2.11
pipeline-stage-step:2.3
pipeline-stage-tags-metadata:1.3.9
pipeline-stage-view:2.11
plain-credentials:1.5
rebuild:1.31
resource-disposer:0.13
reverse-proxy-auth-plugin:1.6.3
scm-api:2.6.3
script-security:1.62
ssh-agent:1.17
ssh-credentials:1.17.1
ssh-slaves:1.30.1
structs:1.20
subversion:2.12.2
test-results-analyzer:0.3.5
token-macro:2.8
trilead-api:1.0.4
variant:1.3
windows-slaves:1.4
workflow-aggregator:2.6
workflow-api:2.36
workflow-basic-steps:2.18
workflow-cps:2.73
workflow-cps-global-lib:2.15
workflow-durable-task-step:2.33
workflow-job:2.33
workflow-multibranch:2.21
workflow-scm-step:2.9
workflow-step-api:2.20
workflow-support:3.3
ws-cleanup:0.37
xunit:2.3.5

Add Comment Add Comment
 
This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)

fabrizio.manfredi@gmail.com (JIRA)

unread,
Aug 10, 2019, 3:12:03 PM8/10/19
to jenkinsc...@googlegroups.com
FABRIZIO MANFREDI started work on Bug JENKINS-58788
 
Change By: FABRIZIO MANFREDI
Status: Open In Progress

fabrizio.manfredi@gmail.com (JIRA)

unread,
Aug 10, 2019, 3:13:02 PM8/10/19
to jenkinsc...@googlegroups.com
FABRIZIO MANFREDI commented on Bug JENKINS-58788
 
Re: EC2 Plugin throwing NullPointer exception when connecting to Windows agent.

It should be fixed in the 1.45, the problem is related to the working dir calculation

raihaan.shouhell@autodesk.com (JIRA)

unread,
Oct 2, 2019, 10:55:06 PM10/2/19
to jenkinsc...@googlegroups.com
Raihaan Shouhell resolved as Fixed
 
Change By: Raihaan Shouhell
Status: In Progress Resolved
Resolution: Fixed
Released As: 1.45
This message was sent by Atlassian Jira (v7.13.6#713006-sha1:cc4451f)
Atlassian logo
Reply all
Reply to author
Forward
0 new messages