2

I have an EC2 instance on my AWS account with Jenkins installed don Amazon Linux. The AWS credentials, roles etc. and SSH keys exists so as that the instance has EC2 access and I can SSH to any instance created in the security group etc.

I have installed the EC2 plugin and have configured it as per the instructions, however I get an HTTP 404 error;

Oct 27, 2017 1:26:31 PM null
FINEST: Node jenkins-slave (i-0f8aa5fb0ab29164f)(i-0f8aa5fb0ab29164f) is still pending/launching, waiting 5s
Oct 27, 2017 1:26:36 PM null
FINEST: Node jenkins-slave (i-0f8aa5fb0ab29164f)(i-0f8aa5fb0ab29164f) is still pending/launching, waiting 5s
Oct 27, 2017 1:26:41 PM null
FINEST: Node jenkins-slave (i-0f8aa5fb0ab29164f)(i-0f8aa5fb0ab29164f) is still pending/launching, waiting 5s
Oct 27, 2017 1:26:46 PM null
FINER: Node jenkins-slave (i-0f8aa5fb0ab29164f)(i-0f8aa5fb0ab29164f) is ready
Oct 27, 2017 1:26:46 PM null
INFO: Launching instance: i-0f8aa5fb0ab29164f
Oct 27, 2017 1:26:46 PM null
INFO: bootstrap()
Oct 27, 2017 1:26:46 PM null
INFO: Getting keypair...
Oct 27, 2017 1:26:46 PM null
INFO: Using key: jenkins-slave
d5:dd:51:ac:8b:b3:bf:1b:6f:b4:b1:86:5b:26:14:1e:e0:47:25:72
-----BEGIN RSA PRIVATE KEY-----
MIIEowIBAAKCAQEAoxetaNHULbsbqsThxUSxxxxxxxxxxxxxxxxxxxxxxxxxx
ga2jnJaFOG4M/Fnes9ZzHclz7eflwliFZnhIUJldlSBZ2bvAqdp
Oct 27, 2017 1:26:46 PM null
INFO: Authenticating as ec2-user
Oct 27, 2017 1:26:46 PM null
INFO: Connecting to 10.0.2.51 on port 22, with timeout 10000.
Oct 27, 2017 1:26:47 PM null
INFO: Failed to connect via ssh: There was a problem while connecting to 10.0.2.51:22
Oct 27, 2017 1:26:47 PM null
INFO: Waiting for SSH to come up. Sleeping 5.
Oct 27, 2017 1:26:52 PM null
INFO: Connecting to 10.0.2.51 on port 22, with timeout 10000.
Oct 27, 2017 1:26:52 PM null
INFO: Failed to connect via ssh: There was a problem while connecting to 10.0.2.51:22
Oct 27, 2017 1:26:52 PM null
INFO: Waiting for SSH to come up. Sleeping 5.
Oct 27, 2017 1:26:57 PM null
INFO: Connecting to 10.0.2.51 on port 22, with timeout 10000.
Oct 27, 2017 1:26:57 PM null
INFO: Failed to connect via ssh: There was a problem while connecting to 10.0.2.51:22
Oct 27, 2017 1:26:57 PM null
INFO: Waiting for SSH to come up. Sleeping 5.
Oct 27, 2017 1:27:02 PM null
INFO: Connecting to 10.0.2.51 on port 22, with timeout 10000.
Oct 27, 2017 1:27:03 PM null
INFO: Connected via SSH.
Oct 27, 2017 1:27:03 PM null
INFO: connect fresh as root
Oct 27, 2017 1:27:03 PM null
INFO: Connecting to 10.0.2.51 on port 22, with timeout 10000.
Oct 27, 2017 1:27:03 PM null
INFO: Connected via SSH.
Oct 27, 2017 1:27:03 PM null
INFO: Creating tmp directory (/tmp) if it does not exist
Oct 27, 2017 1:27:03 PM null
INFO: Verifying that java exists
java full version "1.7.0_151-mockbuild_2017_08_09_21_42-b00"
Oct 27, 2017 1:27:03 PM null
INFO: Copying slave.jar
Oct 27, 2017 1:27:03 PM null
INFO: Launching slave agent (via Trilead SSH2 Connection):  java  -jar /tmp/slave.jar


HTTP ERROR 404


Problem accessing /computer/jenkins-slave%20(i-0f8aa5fb0ab29164f)/logText/progressiveHtml. Reason:

    Not Found
Powered by Jetty:// 9.4.z-SNAPSHOT
  • I'm having the same problem lately, since installing the latest LTS. Could this be linked to a recent jenkins update? – static_rtti Nov 10 '17 at 12:17
  • It works fine if you use an Ubuntu AMI as the slave – eekfonky Nov 10 '17 at 12:34
1

It's this problem: https://issues.jenkins-ci.org/browse/JENKINS-48182, which will be fixed in the next release of the plugin.

  • This in fact fixed it for me. Had to upgrade my java version: sudo yum install -y java-1.8.0 sudo yum remove -y java-1.7.0-openjdk – Ian Newland Feb 13 '19 at 14:59
0

This could be related to https://issues.jenkins-ci.org/browse/JENKINS-47331 My installation used to work and stopped working around the time this bug was filed.

  • Downgrade to version 2.36 if youre using 2.37 and see if that fixes the issue. My suspicion is in line with static_rtti – Marc Young Nov 10 '17 at 14:05
  • I did downgrade, but ran into other problems. – static_rtti Nov 10 '17 at 14:39
  • No, it's not that, I was able to reproduce this problem on an AMI without SCP before I got to the code in the issue you refer to. – Francis Upton IV Nov 23 '17 at 0:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.