Open mawinter69 opened 1 month ago
working on it
beware that this task is not newby friendly
Is this a bug? Jenkins cannot verify the agent, so the agent can't connect to the controller. All the configuration is correct and no network or firewall blocking. Can access Jenkins from UI and curl, but 'agent-1' can't connect to it. I am currently working on the https://github.com/jenkinsci/pipeline-agent-build-history-plugin/issues/47 My Jenkins instance is from the build of the above Repo using mvn hpi:run. Java version: 17 LTS . Instance identity is generated by Jenkins, but when executed, it is throwing invalid X-instance-identity. Have been working on this for 2 days, to see if I am making any mistake, but issue is on the jenkins @mawinter69
gsadanala@Ganeshs-Air jenkins % java -jar agent.jar -url http://localhost:8080/jenkins/ -secret 8e54e781cd66c7f7605838caf360418b41cd556245a2f07d2709b310118b253f -name "agent-1" -workDir "/Users/gsadanala/jenkins"
May 25, 2024 2:37:45 PM org.jenkinsci.remoting.engine.WorkDirManager initializeWorkDir
INFO: Using /Users/gsadanala/jenkins/remoting as a remoting work directory
May 25, 2024 2:37:45 PM org.jenkinsci.remoting.engine.WorkDirManager setupLogging
INFO: Both error and output logs will be printed to /Users/gsadanala/jenkins/remoting
May 25, 2024 2:37:45 PM hudson.remoting.Launcher createEngine
INFO: Setting up agent: agent-1
May 25, 2024 2:37:45 PM hudson.remoting.Engine startEngine
INFO: Using Remoting version: 3206.vb_15dcf73f6a_9
May 25, 2024 2:37:45 PM org.jenkinsci.remoting.engine.WorkDirManager initializeWorkDir
INFO: Using /Users/gsadanala/jenkins/remoting as a remoting work directory
May 25, 2024 2:37:45 PM hudson.remoting.Launcher$CuiListener status
INFO: Locating server among [http://localhost:8080/jenkins/]
May 25, 2024 2:37:45 PM org.jenkinsci.remoting.engine.JnlpAgentEndpointResolver resolve
INFO: Remoting server accepts the following protocols: [JNLP4-connect, Ping]
May 25, 2024 2:37:45 PM hudson.remoting.Launcher$CuiListener status
INFO: Could not locate server among [http://localhost:8080/jenkins/]; waiting 10 seconds before retry
java.io.IOException: http://localhost:8080/jenkins/tcpSlaveAgentListener/ appears to be publishing an invalid X-Instance-Identity.
at org.jenkinsci.remoting.engine.JnlpAgentEndpointResolver.resolve(JnlpAgentEndpointResolver.java:277)
at hudson.remoting.Engine.innerRun(Engine.java:809)
at hudson.remoting.Engine.run(Engine.java:563)
Hard to tell if this is a bug anywhere but unlikely. I don't use inbound agents (usually I have outbound with ssh) and for development I usually use the Mock-Agent plugin
Can you try to add -webSocket
to the java process
java -jar agent.jar -url http://localhost:8080/jenkins/ -secret 8e54e781cd66c7f7605838caf360418b41cd556245a2f07d2709b310118b253f -name "agent-1" -workDir "/Users/gsadanala/jenkins" -webSocket
Can you try to add
-webSocket
to the java processjava -jar agent.jar -url http://localhost:8080/jenkins/ -secret 8e54e781cd66c7f7605838caf360418b41cd556245a2f07d2709b310118b253f -name "agent-1" -workDir "/Users/gsadanala/jenkins" -webSocket
The websocket connection worked. Amazing! So is this a bug? It would be better if Jenkins provided this as an option to use for traditional TCP/IP connection. Thanks! [Edit]: I see that issue with TCP connection was only for 1st agent, when I created another agent without websocket, it worked with TCP
@mawinter69 Just a small clarification. I am assuming that "badges" here means icons that need to be added for example beside: Failure, Success in the attached Extended Build History of the agent. Please correct me if I am wrong. Thanks for the Mock-Agent plugin suggestion!
I meant the icons you can see in the history widget of a job
Currently the progressive rendering is working by sending json data to javascript and then in javascript the html is generated.
But the badges contain inline svgs so this would mean to transfer bigger amount of data and potentially also duplicate data.
For an easier integration both extended history pages would need to switch away from the progressive rendering approach to a direct approach where everything is done within jelly. That is a bigger change (any why I said it is not newby friendly).
partially solved with #50 for the job history
What feature do you want to see added?
badges are shown in the build history widget. This could be a valuable information to be shown on the agent history page
Upstream changes
No response
Are you interested in contributing this feature?
No response