what logs and events are you getting when you run * kubectl logs your_pod_slave * kubectl describe your_pod_slave
are you getting "failed to open log file" there? if you do it looks like a kubernetes issue, like https://github.com/kubernetes/kubernetes/issues/45911 that points to your container running out of memory On Thu, Dec 28, 2017 at 6:51 PM, Vamsi krishna <[email protected]> wrote: > Hello Team, > > I am using kubernetes plugin 1.1 > My cluster is running in local Host.. Jenkins is running in outside > cluster.. > I want to run my Jenkins build jobs with slave pod in containers..after > build job is done my slave pod has to kill automatically.. > Pod is killing automatically when build job is done..but issue is > My job is running on jenkins/jnlp-slave image not in my base image.for > that I mentioned jnlp as my container name then job is not able to run > showing pending slave-td45h is offline. > > How to connect my container to talk to the Jenkins. I am trying for the > freestyle jobs. > > I created image with making baseimage of in my dockerfike i mentioned > FROM Jenkins/jnlp-slave is it right to use like this.. > If u want I will show my total dockerfile.. > > From jenkins/jnlp-slave > USER root > > ENV NPM_CONFIG_LOGLEVEL info > ENV NODE_VERSION 8.9.0 > ENV COMPOSE_VERSION 1.12.0 > > # NodeJS (from https://github.com/nodejs/docker-node/blob/ > 12ba2e5432cd50037b6c0cf53464b5063b028227/8.1/Dockerfile) > # gpg keys listed at https://github.com/nodejs/node#release-team > RUN set -ex \ > && for key in \ > 94AE36675C464D64BAFA68DD7434390BDBE9B9C5 \ > FD3A5288F042B6850C66B31F09FE44734EB7990E \ > 71DCFD284A79C3B38668286BC97EC7A07EDE3FC1 \ > DD8F2338BAE7501E3DD5AC78C273792F7D83545D \ > C4F0DFFF4E8C1A8236409D08E73BC641CC11F4C8 \ > B9AE9905FFD7803F25714661B63B535A4C206CA9 \ > 56730D5401028683275BD23C23EFEFE93C4CFFFE \ > 77984A986EBC2AA786BC0F66B01FBB92821C587A \ > ; do \ > gpg --keyserver pgp.mit.edu --recv-keys "$key" || \ > gpg --keyserver keyserver.pgp.com --recv-keys "$key" || \ > gpg --keyserver ha.pool.sks-keyservers.net --recv-keys "$key" ; \ > done > > > RUN ARCH= && dpkgArch="$(dpkg --print-architecture)" \ > && case "${dpkgArch##*-}" in \ > amd64) ARCH='x64';; \ > ppc64el) ARCH='ppc64le';; \ > s390x) ARCH='s390x';; \ > arm64) ARCH='arm64';; \ > armhf) ARCH='armv7l';; \ > *) echo "unsupported architecture"; exit 1 ;; \ > esac \ > && curl -SLO "https://nodejs.org/dist/v$NODE_VERSION/node-v$NODE_ > VERSION-linux-$ARCH.tar.xz" \ > && curl -SLO --compressed "https://nodejs.org/dist/v$ > NODE_VERSION/SHASUMS256.txt.asc" \ > && gpg --batch --decrypt --output SHASUMS256.txt SHASUMS256.txt.asc \ > && grep " node-v$NODE_VERSION-linux-$ARCH.tar.xz\$" SHASUMS256.txt | > sha256sum -c - \ > && tar -xJf "node-v$NODE_VERSION-linux-$ARCH.tar.xz" -C /usr/local > --strip-components=1 \ > && rm "node-v$NODE_VERSION-linux-$ARCH.tar.xz" SHASUMS256.txt.asc > SHASUMS256.txt \ > && ln -s /usr/local/bin/node /usr/local/bin/nodejs > > RUN apt-get update && apt-get install -y git jq rsync g++ build-essential > && apt-get clean > > ADD jenkins-slave /usr/local/bin > > USER jenkins > > using this image my container is not running properly getting logs as failed > to open log file "/var/log/pods/70d9def9-ebf7- > 11e7-867e-005056bf5570/jnlp_0.log": open /var/log/pods/70d9def9-ebf7- > 11e7-867e-005056bf5570/jnlp_0.log: no such file or directory > these are the logs i am getting any idea... if this container runs > succesfully then i can run my jenkins job in this container. because i did > base image as jenkins/jnlp-slave. Can anyone please help me.. I have this > issue since week. > > -- > You received this message because you are subscribed to the Google Groups > "Jenkins Users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To view this discussion on the web visit https://groups.google.com/d/ > msgid/jenkinsci-users/c1d734a7-d4f7-444b-8689-81ab3929384b%40googlegroups. > com > <https://groups.google.com/d/msgid/jenkinsci-users/c1d734a7-d4f7-444b-8689-81ab3929384b%40googlegroups.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "Jenkins Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/CALHFn6N0Y0iCwKniof%2BpSzEq9HMF0TbgqO_Lx9WWt%3DNE5ko2Dg%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
