I have deployed two Jenkins nodes, one master and one agent, both running ubuntu 18.04 LTS.
Both nodes are running: OpenJDK Runtime Environment (build 1.8.0_181-8u181-b13-0ubuntu0.18.04.1-b13)
The Jenkins master is v2.138.2.
I'm catting a file containing some terraform output (approximately 30KB) on the agent using the shell executor in a Jenkins pipeline (see below).
As the job runs, only a section of the file content is displayed in my console log and then the job freezes. In some cases some more lines from the file are displayed after some time. In any case, an error message is thrown:
Cannot contact jenkins-linux-agent: java.lang.InterruptedException
Could not connect to jenkins-linux-agent to send interrupt signal to process
The work around that I've found is to rate limit the number of bytes delivered to stdout using the linux utility pv.