Giter Club home page Giter Club logo

Comments (11)

xianfengsong avatar xianfengsong commented on August 13, 2024 7

Nov 23, 2017 12:52:58 PM org.csanchez.jenkins.plugins.kubernetes.KubernetesLauncher launch
WARNING: Error in provisioning; slave=KubernetesSlave name: jnlp-l80z4, template=org.csanchez.jenkins.plugins.kubernetes.PodTemplate@5d7f5d41
java.lang.IllegalStateException: Containers are terminated with exit codes: {jnlp-slave=127}
at org.csanchez.jenkins.plugins.kubernetes.KubernetesLauncher.launch(KubernetesLauncher.java:184)
at hudson.slaves.SlaveComputer$1.call(SlaveComputer.java:262)
at jenkins.util.ContextResettingExecutorService$2.call(ContextResettingExecutorService.java:46)
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)

from docker-agent.

vasily-v-ryabov avatar vasily-v-ryabov commented on August 13, 2024 1

Code 137 is OOM killer. Please make sure you have enough memory in your pod limits/requests.
Code 127 relates to line endings: https://stackoverflow.com/q/27820268/3648361

from docker-agent.

pictolearn avatar pictolearn commented on August 13, 2024

Did this get resolved yet? I am getting the same issue.

from docker-agent.

rsilvareberth avatar rsilvareberth commented on August 13, 2024

Import image and build again. The problem disappeared. Root cause unknow.

from docker-agent.

devcharted avatar devcharted commented on August 13, 2024

Could be the same:

kubectl -n jenkins describe pod build-24691-utest-j0szw-9kz3p
jnlp:
    Container ID:   containerd://beb7b02d213a91d804d4093b2b4dbdad15658b146a5ed481bef8e0e1ba24faba
    Image:          jenkins/inbound-agent:4.3-4-alpine
    Image ID:       docker.io/jenkins/inbound-agent@sha256:578ab6f78b038897820392c3a37725acc82cd792b0d80c8afadebcf3a1f7ced1
    Port:           <none>
    Host Port:      <none>
    State:          Terminated
      Reason:       Error
      Exit Code:    137
      Started:      Wed, 13 May 2020 21:32:40 +0200
      Finished:     Wed, 13 May 2020 21:46:27 +0200
    Ready:          False
    Restart Count:  0
    Requests:
      cpu:     500m
      memory:  512Mi
    Environment:
      JENKINS_SECRET:         0bfb6ddcd2dd4e2d132eb28d05d2163878dee1503fb69c5ebbd1695ad01743f5
      JENKINS_TUNNEL:         jenkins:50000
      JENKINS_AGENT_NAME:    build-24691-utest-j0szw-9kz3p
      JAVA_OPTS:              -Xrs -Xms512m -Xmx512m -XX:+UnlockExperimentalVMOptions -XX:+UseCGroupMemoryLimitForHeap -Dsun.zip.disableMemoryMapping=true -XX:+UseParallelGC -XX:MinHeapFreeRatio=5 -XX:MaxHeapFreeRatio=10 -XX:GCTimeRatio=4 -XX:AdaptiveSizePolicyWeight=90
      JENKINS_NAME:          build-24691-utest-j0szw-9kz3p
      JENKINS_AGENT_WORKDIR:  /home/jenkins/agent
      JENKINS_URL:            https://jenkins
    Mounts:
      /etc/ssl/certs/java from cm-java-cacerts (rw)
      /home/jenkins/agent from workspace-volume (rw)
      /var/run/secrets/kubernetes.io/serviceaccount from default-token-ffqzp (ro)
$ kubectl -n jenkins logs build-24691-utest-j0szw-9kz3p jnlp                                                                                             [21:55:52]
May 13, 2020 7:32:41 PM hudson.remoting.jnlp.Main createEngine
INFO: Setting up agent: build-24691-utest-j0szw-9kz3p
May 13, 2020 7:32:41 PM hudson.remoting.jnlp.Main$CuiListener <init>
INFO: Jenkins agent is running in headless mode.
May 13, 2020 7:32:41 PM hudson.remoting.Engine startEngine
INFO: Using Remoting version: 4.3
May 13, 2020 7:32:41 PM org.jenkinsci.remoting.engine.WorkDirManager initializeWorkDir
INFO: Using /home/jenkins/agent/remoting as a remoting work directory
May 13, 2020 7:32:41 PM org.jenkinsci.remoting.engine.WorkDirManager setupLogging
INFO: Both error and output logs will be printed to /home/jenkins/agent/remoting
May 13, 2020 7:32:41 PM hudson.remoting.jnlp.Main$CuiListener status
INFO: Locating server among [https://jenkins/]
May 13, 2020 7:32:41 PM org.jenkinsci.remoting.engine.JnlpAgentEndpointResolver resolve
INFO: Remoting server accepts the following protocols: [JNLP4-connect, Ping]
May 13, 2020 7:32:41 PM org.jenkinsci.remoting.engine.JnlpAgentEndpointResolver resolve
INFO: Remoting TCP connection tunneling is enabled. Skipping the TCP Agent Listener Port availability check
May 13, 2020 7:32:41 PM hudson.remoting.jnlp.Main$CuiListener status
INFO: Agent discovery successful
  Agent address: jenkins
  Agent port:    50000
  Identity:      15:ff:8e:1d:7c:f3:fe:e0:dc:f3:66:88:a5:84:42:36
May 13, 2020 7:32:41 PM hudson.remoting.jnlp.Main$CuiListener status
INFO: Handshaking
May 13, 2020 7:32:41 PM hudson.remoting.jnlp.Main$CuiListener status
INFO: Connecting to jenkins:50000
May 13, 2020 7:32:41 PM hudson.remoting.jnlp.Main$CuiListener status
INFO: Trying protocol: JNLP4-connect
May 13, 2020 7:32:41 PM hudson.remoting.jnlp.Main$CuiListener status
INFO: Remote identity confirmed: 15:ff:8e:1d:7c:f3:fe:e0:dc:f3:66:88:a5:84:42:36
May 13, 2020 7:32:42 PM hudson.remoting.jnlp.Main$CuiListener status
INFO: Connected

from docker-agent.

mbarbero avatar mbarbero commented on August 13, 2024

@devcharted, IIRC exitCode: 127 can be triggered when the jnlp container gets killed by the OOMKiller. You specified -Xms512m -Xmx512m while the container gets memory: 512Mi. This is very risky: it means that container's max memory == JVM max heap. It can trigger the OOM killer as the JVM does not only need heap memory.

My advise: ensure that you run with jdk8u191 or later and use -XX:InitialRAMPercentage, -XX:MaxRAMPercentage, and -XX:MinRAMPercentage to specify your memory limits instead of the the -Xms/-Xmx. jdk8u191 ensures that the container memory will be "read" by the JVM instead of the host's memory (without any parameters to give). -XX:***RAMPercentage will configure the JVM with the % of that memory you want to allocate to heap. Something between 50 and 75 are usually the safe spot. Above is risky.

from docker-agent.

micha-eleric avatar micha-eleric commented on August 13, 2024

@mbarbero , please explain "-XX:InitialRAMPercentage, -XX:MaxRAMPercentage, and -XX:MinRAMPercentage"

from docker-agent.

MarkEWaite avatar MarkEWaite commented on August 13, 2024

@micha-eleric refer to https://dzone.com/articles/difference-between-initialrampercentage-minramperc for a description

from docker-agent.

micha-eleric avatar micha-eleric commented on August 13, 2024

@MarkEWaite, thank you, got it, still did not fix my 127 error

from docker-agent.

vasily-v-ryabov avatar vasily-v-ryabov commented on August 13, 2024

General way to google it is "docker exit code 127" or similar.

from docker-agent.

dduportal avatar dduportal commented on August 13, 2024

Closing as @vasily-v-ryabov gave the answer: it is an OOM-kill which terminated the reporter's container agent.

from docker-agent.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.