Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JENKINS_OPTS environment variable not affect seed-job-agent container. #462

Closed
guanwei opened this issue Sep 30, 2020 · 1 comment
Closed

Comments

@guanwei
Copy link

guanwei commented Sep 30, 2020

when I add JENKINS_OPTS environment variable to Jenkins container:

env:
    - name: JENKINS_OPTS
       value: --prefix=/jenkins

Jenkins run as expect, but seed-job-agent run failed.

NOTE: I installed jenkins-operator in jenkins namespace

$ kubectl -n jenkins get pod

NAME                                      READY   STATUS             RESTARTS   AGE
jenkins-jenkins                           2/2     Running            0          22h
jenkins-operator-78789d7d74-rx6h9         1/1     Running            0          22h
seed-job-agent-jenkins-79b9656996-bb2xm   0/1     CrashLoopBackOff   241        20h

print the seed-job-agent container logs:

$ kubectl -n jenkins logs seed-job-agent-jenkins-79b9656996-bb2xm

Sep 30, 2020 2:02:16 AM hudson.remoting.jnlp.Main createEngine
INFO: Setting up agent: seed-job-agent
Sep 30, 2020 2:02:16 AM hudson.remoting.jnlp.Main$CuiListener <init>
INFO: Jenkins agent is running in headless mode.
Sep 30, 2020 2:02:16 AM hudson.remoting.Engine startEngine
INFO: Using Remoting version: 4.3
Sep 30, 2020 2:02:16 AM org.jenkinsci.remoting.engine.WorkDirManager initializeWorkDir
INFO: Using /home/jenkins/agent/remoting as a remoting work directory
Sep 30, 2020 2:02:16 AM org.jenkinsci.remoting.engine.WorkDirManager setupLogging
INFO: Both error and output logs will be printed to /home/jenkins/agent/remoting
Sep 30, 2020 2:02:17 AM hudson.remoting.jnlp.Main$CuiListener status
INFO: Locating server among [http://jenkins-operator-http-jenkins.jenkins.svc.cluster.local:8080]
Sep 30, 2020 2:02:17 AM hudson.remoting.jnlp.Main$CuiListener error
SEVERE: http://jenkins-operator-http-jenkins.jenkins.svc.cluster.local:8080/tcpSlaveAgentListener/ is invalid: 404 Not Found
java.io.IOException: http://jenkins-operator-http-jenkins.jenkins.svc.cluster.local:8080/tcpSlaveAgentListener/ is invalid: 404 Not Found
        at org.jenkinsci.remoting.engine.JnlpAgentEndpointResolver.resolve(JnlpAgentEndpointResolver.java:222)
        at hudson.remoting.Engine.innerRun(Engine.java:693)
        at hudson.remoting.Engine.run(Engine.java:518)

expect access:
http://jenkins-operator-http-jenkins.jenkins.svc.cluster.local:8080/jenkins/tcpSlaveAgentListener/

@tomaszsek
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants