ssh launch of jenkins slave stalls jenkins start - jenkins

I'm not sure how to go about debugging this issue. Jenkins on restarts takes forever and from the logs I can see that its sitting trying to launch the slave
06/25/15 14:03:34] SSH Launch of Slave1 on dom-jenkins-sl1.cloud.dev.phx3.gdg failed in 179,907 ms
Jun 25, 2015 2:05:06 PM hudson.slaves.SlaveComputer tryReconnect
INFO: Attempting to reconnect Slave1
Jun 25, 2015 2:05:07 PM org.jenkinsci.main.modules.sshd.SSHD start
INFO: Started SSHD at port 33090
Jun 25, 2015 2:05:07 PM jenkins.InitReactorRunner$1 onAttained
INFO: Completed initialization
Jun 25, 2015 2:05:07 PM org.jenkinsci.plugins.skipcert.ItemListenerImpl onLoaded
INFO: Bypassing certificate check
Jun 25, 2015 2:05:08 PM hudson.WebAppMain$3 run
INFO: Jenkins is fully up and running
[06/25/15 14:05:08] SSH Launch of Slave1 on dom-jenkins-sl1.cloud.dev.phx3.gdg completed in 1,923 ms
And yet on the second try 2 minutes later it works just fine. Any ideas?

Related

Cannot connect to GCE slave via SSH as root

I have installed GCE plugin on Jenkins to provision nodes on demand for builds.
Nodes get provisioned as expected if runAs = [Jenkins] user is selected, but getting below error in agent logs when i want run build as [root] user. I went through https://github.com/jenkinsci/google-compute-engine-plugin/issues/69
and my java is in default path too.
Any help would be appreciated. Thanks in advance
INFO: Authenticating as root
Aug 19, 2022 6:55:21 PM null
INFO: Connecting to <public IP> on port 22, with timeout 10000.
Aug 19, 2022 6:55:21 PM null
INFO: Connected via SSH.
Aug 19, 2022 6:55:21 PM null
WARNING: Authentication failed. Trying again...
Aug 19, 2022 6:55:36 PM null
WARNING: Authentication failed
Aug 19, 2022 6:55:36 PM null
WARNING: bootstrapresult failed

UnresolvedAddressException when connecting JNLP slave to Jenkins master

I created a jenkins master in my OKE cluster (a single node cluster). I wanted to try using Jenkins kubernetes plugin and connect jnlp-slaves.
Following are my kuberenetes cloud configurations.
Jenkins tunnel and URL info
Jenkins version that Im using is Jenkins 2.319.3. When I start the build, a pod is creating in my cluster and gives an error.
Following is the log of the created pod.
Mar 17, 2022 5:49:10 AM hudson.remoting.jnlp.Main createEngine
INFO: Setting up agent: kube-agent-s8tw6
Mar 17, 2022 5:49:10 AM hudson.remoting.jnlp.Main$CuiListener <init>
INFO: Jenkins agent is running in headless mode.
Mar 17, 2022 5:49:10 AM hudson.remoting.Engine startEngine
INFO: Using Remoting version: 4.11.2
Mar 17, 2022 5:49:10 AM org.jenkinsci.remoting.engine.WorkDirManager initializeWorkDir
INFO: Using /home/jenkins/agent/remoting as a remoting work directory
Mar 17, 2022 5:49:10 AM org.jenkinsci.remoting.engine.WorkDirManager setupLogging
INFO: Both error and output logs will be printed to /home/jenkins/agent/remoting
Mar 17, 2022 5:49:10 AM hudson.remoting.jnlp.Main$CuiListener status
INFO: Locating server among [http://138.2.75.190:30000/]
Mar 17, 2022 5:49:10 AM org.jenkinsci.remoting.engine.JnlpAgentEndpointResolver resolve
INFO: Remoting server accepts the following protocols: [JNLP4-connect, Ping]
Mar 17, 2022 5:49:10 AM org.jenkinsci.remoting.engine.JnlpAgentEndpointResolver resolve
INFO: Remoting TCP connection tunneling is enabled. Skipping the TCP Agent Listener Port availability check
Mar 17, 2022 5:49:10 AM hudson.remoting.jnlp.Main$CuiListener status
INFO: Agent discovery successful
Agent address: http://138.2.75.190
Agent port: 50000
Identity: 5b:f2:ef:be:d1:98:05:91:83:3d:a5:61:b6:1b:93:e5
Mar 17, 2022 5:49:10 AM hudson.remoting.jnlp.Main$CuiListener status
INFO: Handshaking
Mar 17, 2022 5:49:10 AM hudson.remoting.jnlp.Main$CuiListener status
INFO: Connecting to http://138.2.75.190:50000
Mar 17, 2022 5:49:10 AM hudson.remoting.jnlp.Main$CuiListener error
SEVERE: null
java.nio.channels.UnresolvedAddressException
at java.base/sun.nio.ch.Net.checkAddress(Unknown Source)
at java.base/sun.nio.ch.SocketChannelImpl.connect(Unknown Source)
at java.base/java.nio.channels.SocketChannel.open(Unknown Source)
at org.jenkinsci.remoting.engine.JnlpAgentEndpoint.open(JnlpAgentEndpoint.java:206)
at hudson.remoting.Engine.connectTcp(Engine.java:880)
at hudson.remoting.Engine.innerRun(Engine.java:757)
at hudson.remoting.Engine.run(Engine.java:540)
I checked the ports and I disabled firewall in my node. Im still getting the error. Can someone help me to solve this?

Jenkins build failure ; not understanding jenkins log

I am having trouble understanding the error in the project
Although my build steps pass
02:40:40 api_1 | complete: 6 passing, 0 failing, 0 errors, 0 skipped, 6 total
It is failing. This is output from jenkins log
[root#ip-10-14-6-40 jenkins]# tail jenkins.log
Nov 14, 2018 2:40:35 AM hudson.model.AsyncPeriodicWork$1 run
INFO: Finished DockerContainerWatchdog Asynchronous Periodic Work. 11 ms
Nov 14, 2018 2:40:36 AM jenkins.plugins.slack.StandardSlackService publish
INFO: Posting succeeded
Nov 14, 2018 2:40:46 AM jenkins.plugins.slack.StandardSlackService publish
INFO: Posting succeeded
Nov 14, 2018 2:40:46 AM org.jenkinsci.plugins.workflow.job.WorkflowRun
finish
INFO: tal-ci-test/spec #101 completed: FAILURE
Nov 14, 2018 2:40:46 AM
org.terracotta.jenkins.plugins.postcompleted.PostCompletedRunListener
onCompleted
INFO: The url to submit to is not valid, please check your global
configuration

Jenkins Slave JNLP connection gets terminated

Looking for some help here!
I am running Jenkins(v2.134) as a docker container managed by Rancher(v1.6.16); and i am using haproxy(HA-Proxy version 1.6.3 2015/12/25) as my loadbalancer. Jenkins JNLP port is configured as 50000. haproxy got the rule for TCP port forwarding(8081 > 50000)
My slave (macmini) is in different network and behind firewall (This network can make reach my Jenkins Infra). I am using "Tunnel connection through" property and specified port ":8081". The port 8081 is already opened in the firewall.
My Jenkins Java version is -
openjdk version "1.8.0_151"
OpenJDK Runtime Environment (build 1.8.0_151-8u151-b12-1~deb9u1-b12)
My Slave Java version is -
Sun JDK "1.8.0_151"
Here are the agent logs -
*INFO: Setting up agent: my-slave-01*
Sep 26, 2018 2:48:50 PM hudson.remoting.jnlp.Main$CuiListener <init>
INFO: Jenkins agent is running in headless mode.
Sep 26, 2018 2:48:50 PM hudson.remoting.Engine startEngine
INFO: Using Remoting version: 3.23
Sep 26, 2018 2:48:50 PM hudson.remoting.Engine startEngine
WARNING: No Working Directory. Using the legacy JAR Cache location: /Users/jenkins/.jenkins/cache/jars
Sep 26, 2018 2:48:51 PM hudson.remoting.jnlp.Main$CuiListener status
INFO: Locating server among [http://<My Jenkins URL>/]
Sep 26, 2018 2:48:51 PM org.jenkinsci.remoting.engine.JnlpAgentEndpointResolver resolve
INFO: Remoting server accepts the following protocols: [JNLP4-connect, Ping]
Sep 26, 2018 2:48:51 PM hudson.remoting.jnlp.Main$CuiListener status
*INFO: Agent discovery successful*
*Agent address: <My Jenkins DNS Name>*
*Agent port: 8081*
Identity: b5:c7:33:8d:9c:97:41:3f:e1:b1:b5:31:25:ea:b5:2e
Sep 26, 2018 2:48:51 PM hudson.remoting.jnlp.Main$CuiListener status
INFO: Handshaking
Sep 26, 2018 2:48:51 PM hudson.remoting.jnlp.Main$CuiListener status
INFO: Connecting to <My Jenkins DNS>:8081
Sep 26, 2018 2:48:51 PM hudson.remoting.jnlp.Main$CuiListener status
INFO: Trying protocol: JNLP4-connect
Sep 26, 2018 2:48:51 PM hudson.remoting.jnlp.Main$CuiListener status
INFO: Remote identity confirmed: b5:c7:33:8d:9c:97:41:3f:e1:b1:b5:31:25:ea:b5:2e
Sep 26, 2018 2:48:52 PM hudson.remoting.jnlp.Main$CuiListener status
*INFO: Connected*
Sep 26, 2018 2:48:54 PM org.jenkinsci.remoting.util.AnonymousClassWarnings warn
WARNING: Attempt to (de-)serialize anonymous class org.jenkinsci.plugins.envinject.EnvInjectComputerListener$2; see: https://jenkins.io/redirect/serialization-of-anonymous-classes/
Sep 26, 2018 2:49:49 PM hudson.remoting.jnlp.Main$CuiListener status
*INFO: Terminated*
Any help will be appreciated.
Is there is a way to get more verbose logs?
I found the problem; it was with my load balancer(haproxy) default timeout for TCP connections (if no traffic) which was 50000ms.
https://cbonte.github.io/haproxy-dconv/configuration-1.5.html
However the Jenkins ping interval to slave i.e.hudson.slaves.ChannelPinger.pingInterval was 5 minutes (dafault).
https://wiki.jenkins.io/display/JENKINS/Features+controlled+by+system+properties
Increasing the load balancer timeout i.e. > 5 minutes solved the issue.

Jenkins slave not working on mesos

I'm using the jenkins mesos plugin for CI.
Initially, I followed the following tutorial: http://www.ebaytechblog.com/2014/05/12/delivering-ebays-ci-solution-with-apache-mesos-part-ii/
but the jenkins itself was not being setup via this. (I got error could not load config.xml file, even there was one)
Then I followed https://rogerignazio.com/blog/scaling-jenkins-mesos-marathon/
, and I was able to run jenkins master (jenkin framework/scheduler), but when I define the scripts to run, the jenkins-slaves are not being created. I think I'm missing some configuration regarding slaves. Can you tell me, what's the reason that the slaves are not being created to run jobs.
On the jenkins build page, I'm getting :
(pending—Waiting for next available executor)
And in the jenkins-logs, i'm getting following error:
INFO: Provisioning Jenkins Slave on Mesos with 1 executors. Remaining excess workload: 0 executors)
Jun 19, 2015 4:02:55 PM hudson.slaves.NodeProvisioner$StandardStrategyImpl apply
INFO: Started provisioning MesosCloud from MesosCloud with 1 executors. Remaining excess workload: 0
Jun 19, 2015 4:02:55 PM org.jenkinsci.plugins.mesos.MesosComputerLauncher <init>
INFO: Constructing MesosComputerLauncher
Jun 19, 2015 4:02:55 PM org.jenkinsci.plugins.mesos.MesosSlave <init>
INFO: Constructing Mesos slave mesos-jenkins-1f8691df-9918-4175-87b3-bcc3de80b258 from cloud
Jun 19, 2015 4:03:05 PM org.jenkinsci.plugins.mesos.MesosComputerLauncher launch
INFO: Launching slave computer mesos-jenkins-1f8691df-9918-4175-87b3-bcc3de80b258
Jun 19, 2015 4:03:05 PM org.jenkinsci.plugins.mesos.MesosComputerLauncher launch
INFO: Sending a request to start jenkins slave mesos-jenkins-1f8691df-9918-4175-87b3-bcc3de80b258
Jun 19, 2015 4:03:05 PM org.jenkinsci.plugins.mesos.JenkinsScheduler requestJenkinsSlave
INFO: Enqueuing jenkins slave request
Jun 19, 2015 4:03:05 PM hudson.slaves.NodeProvisioner update
INFO: MesosCloud provisioning successfully completed. We have now 2 computer(s)
java.lang.NullPointerException
at org.jenkinsci.plugins.mesos.JenkinsScheduler.matches(JenkinsScheduler.java:306)
at org.jenkinsci.plugins.mesos.JenkinsScheduler.resourceOffers(JenkinsScheduler.java:252)
Jun 19, 2015 4:03:06 PM org.jenkinsci.plugins.mesos.JenkinsScheduler$1 run
SEVERE: The Mesos driver was aborted! Status code: 3
Edit: I think I'm getting error, because I've not defined any container port mappings.
Can anyone tell me how to do so?
Update : Actually there were many problems with 0.7 version of mesos plugin. So, I simply downgraded to 0.6 version.
For port mappings on marathon have a look here.
Hope this helps!

Resources