Hello, I am attempting to connect two Jenkins instances, both running 2.346.2. The controller instance is on Rocky Linux 8 and the agent is on Windows Server 2019. Both servers are running Bellsoft Liberica JDK 11.0.
I downloaded agent.jar onto our Windows agent and put it in the same c:\Program Files\Jenkins\ folder as the main install. When running the command from powershell I get the following error:
PS C:\Program Files\Jenkins> java -jar agent.jar -jnlpUrl https://<serverHostnameHere>/computer/vic%2Dwin%2Djenkins/jenkins-agent.jnlp -secret somelongseceretkeythatshouldntgoontheinternet -workDir "c:\JenkinsWorkDir"
Jul. 19, 2022 4:01:12 P.M. org.jenkinsci.remoting.engine.WorkDirManager initializeWorkDir
INFO: Using c:\JenkinsWorkDir\remoting as a remoting work directory
Jul. 19, 2022 4:01:13 P.M. org.jenkinsci.remoting.engine.WorkDirManager setupLogging
INFO: Both error and output logs will be printed to c:\JenkinsWorkDir\remoting
Jul. 19, 2022 4:01:14 P.M. hudson.remoting.jnlp.Main createEngine
INFO: Setting up agent: vic-win-jenkins
Jul. 19, 2022 4:01:14 P.M. hudson.remoting.jnlp.Main$CuiListener <init>
INFO: Jenkins agent is running in headless mode.
Jul. 19, 2022 4:01:14 P.M. hudson.remoting.Engine startEngine
INFO: Using Remoting version: 4.13.2
Jul. 19, 2022 4:01:14 P.M. org.jenkinsci.remoting.engine.WorkDirManager initializeWorkDir
INFO: Using c:\JenkinsWorkDir\remoting as a remoting work directory
Jul. 19, 2022 4:01:14 P.M. hudson.remoting.jnlp.Main$CuiListener error
SEVERE: Handshake error.
io.jenkins.remoting.shaded.javax.websocket.DeploymentException: Handshake error.
at io.jenkins.remoting.shaded.org.glassfish.tyrus.client.ClientManager$3$1.run(ClientManager.java:658)
at io.jenkins.remoting.shaded.org.glassfish.tyrus.client.ClientManager$3.run(ClientManager.java:696)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at io.jenkins.remoting.shaded.org.glassfish.tyrus.client.ClientManager$SameThreadExecutorService.execute(ClientManager.java:849)
at java.base/java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:118)
at io.jenkins.remoting.shaded.org.glassfish.tyrus.client.ClientManager.connectToServer(ClientManager.java:493)
at io.jenkins.remoting.shaded.org.glassfish.tyrus.client.ClientManager.connectToServer(ClientManager.java:337)
at hudson.remoting.Engine.runWebSocket(Engine.java:668)
at hudson.remoting.Engine.run(Engine.java:500)
Caused by: io.jenkins.remoting.shaded.org.glassfish.tyrus.client.RedirectException: Received HTTP response status code: 301 and redirect processing is not enabled.
at io.jenkins.remoting.shaded.org.glassfish.tyrus.client.TyrusClientEngine.handleRedirect(TyrusClientEngine.java:381)
at io.jenkins.remoting.shaded.org.glassfish.tyrus.client.TyrusClientEngine.processResponse(TyrusClientEngine.java:261)
at io.jenkins.remoting.shaded.org.glassfish.tyrus.container.jdk.client.ClientFilter.processRead(ClientFilter.java:167)
at io.jenkins.remoting.shaded.org.glassfish.tyrus.container.jdk.client.Filter.onRead(Filter.java:111)
at io.jenkins.remoting.shaded.org.glassfish.tyrus.container.jdk.client.Filter.onRead(Filter.java:113)
at io.jenkins.remoting.shaded.org.glassfish.tyrus.container.jdk.client.Filter.onRead(Filter.java:113)
at io.jenkins.remoting.shaded.org.glassfish.tyrus.container.jdk.client.TransportFilter$4.completed(TransportFilter.java:294)
at io.jenkins.remoting.shaded.org.glassfish.tyrus.container.jdk.client.TransportFilter$4.completed(TransportFilter.java:278)
at java.base/sun.nio.ch.Invoker.invokeUnchecked(Invoker.java:127)
at java.base/sun.nio.ch.Invoker.invokeUnchecked(Invoker.java:282)
at java.base/sun.nio.ch.WindowsAsynchronousSocketChannelImpl$ReadTask.completed(WindowsAsynchronousSocketChannelImpl.java:581)
at java.base/sun.nio.ch.Iocp$EventHandlerTask.run(Iocp.java:387)
at java.base/sun.nio.ch.AsynchronousChannelGroupImpl$1.run(AsynchronousChannelGroupImpl.java:112)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:829)
I’ve started searching through settings in Jenkins but didn’t find anything directly applicable. I tried turning on the “Agents” - TCP port for inbound agents setting but it didn’t change anything. Does anyone have any hints as to where the 301 redirect processing setting might be? I can’t tell if this is a client or server side issue either. Any input would be fantastic.
Thanks!
Russell