-
Type:
Bug
-
Resolution: Fixed
-
Priority:
Critical
-
Component/s: remoting
-
Environment:Jenkins version 2.223 - Built from docker container jenkins/jenkins:centos
-
Jenkins 2.229
Websocket connections fail if the response from a pipeline step is greater than 64kb.Â
Steps to recreate the problem:
- Run a jenkins server using the docker container jenkins/jenkins:centos
- Create a New Node with webSocket enabled
- On another Linux VM/slave machine, run the agent.jar with -webSocket option to connect to the Jenkins Master
- Create a pipeline with a step that would output text >64kb. For example, create a text file with size > 64Kb. 'cat' the file as a pipeline step.Â
pipeline {
agent {
label 'test-channelclose'
}
stages {
stage ('Debug Issue') {
steps {
sh 'cat build_output.log'
//archiveArtifacts 'build_output.log'
}
}
}
}
5. Running the pipeline will break with the following error.
Mar 07, 2020 2:31:28 PM jenkins.agents.WebSocketAgents$Session error
WARNING: null
org.eclipse.jetty.websocket.api.MessageTooLargeException: Binary message size [524494] exceeds maximum size [65536]
at org.eclipse.jetty.websocket.api.WebSocketPolicy.assertValidBinaryMessageSize(WebSocketPolicy.java:128)
at org.eclipse.jetty.websocket.common.Parser.assertSanePayloadLength(Parser.java:133)
at org.eclipse.jetty.websocket.common.Parser.parseFrame(Parser.java:494)
at org.eclipse.jetty.websocket.common.Parser.parseSingleFrame(Parser.java:253)
at org.eclipse.jetty.websocket.common.io.AbstractWebSocketConnection.onFillable(AbstractWebSocketConnection.java:460)
at org.eclipse.jetty.websocket.common.io.AbstractWebSocketConnection.onFillable(AbstractWebSocketConnection.java:441)
at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:311)
at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:103)
at org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:117)
at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:336)
at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:313)
at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:171)
at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:129)
at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:388)
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:806)
at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:938)
at java.lang.Thread.run(Thread.java:748)
Note: One of the workaround is to write the output to a file and archive the file. However, not all pipeline steps support an easy way to write the output to file.
- relates to
-
JENKINS-61253 Remoting using WebSocket fails with "Handshake response not received" Exception
-
- Closed
-
-
JENKINS-62576 Websockets connection unstable since remoting 4.2.1 (LTS 2.222.4)
-
- Open
-
- links to
(2 links to)