config

jenkins 2.357 requires Java 11

Beginning with Jenkins 2.357 (released on June 28, 2022) and the forthcoming September LTS release, Jenkins requires Java 11. Additionally, beginning with Jenkins 2.355 (released on June 14, 2022) and Jenkins 2.346.1 LTS (released on June 22, 2022), Jenkins supports Java 17. Plugins have already been prepared in JENKINS-68446. Use the Plugin Manager to upgrade all plugins before and after upgrading to Jenkins 2.357.

refrences:

  • get java version from jenkins controller

    • result

  • get Java version from Jenkins agent

    • result

  • or via RemotingDiagnostics

    • result

java configuration

[!TIP|label:official recommended]

  • java 11

    [!NOTE]

    • Omitting -XX:+UnlockDiagnosticVMOptions or -XX:+UnlockExperimentalVMOptions might cause your instance to fail to startup.

    • To increase GC logs to a longer period of time, we suggest

      • increasing the value of the arguments -Xlog option filecount=2 and/or filesize=100M

      • and as ultimate option use file=${LOGDIR}/gc-%t.log instead of file=${LOGDIR}/gc.log.

      • With the parameter %t, the JVM create a new set of GC files each time that the instance is restarted. It is well known that when the GC log folder gets big enough in terms of size, the support bundle might produce performance issues in the instance given that it needs to compress all of them.

  • java 8

    [!NOTE]

    • To increase GC logs to a longer period of time, we suggest

      • increasing the value of the arguments -XX:GCLogFileSize and -XX:NumberOfGCLogFiles

      • and as ultimate option use -Xloggc:${LOGDIR}/gc-%t.log instead of -Xloggc:${LOGDIR}/gc.log.

      • With the parameter %t, the JVM create a new set of GC files each time that the instance is restarted. It is well known that when the GC log folder gets big enough in terms of size, the support bundle might produce performance issues in the instance given that it needs to compress all of them.

threadDump

[!NOTE]

agent

show TCP inbound agent port

using websocket for jnlp

[!NOTE|label:references:]

agent.jar

security

Git Host Key Verification Configuration

[!TIP|label:references:]

mailing format

  • show the logs after building

    • Format:

    • For example:

disable the

Disabling CSRF Protection

reference:

CSRF protection tokens did not expire

SECURITY-626 :

Scripts that obtain a crumb using the `/crumbIssuer/api` URL will now fail to perform actions protected from CSRF unless the scripts retain the web session ID in subsequent requests.

enable crumb proxy compatibility

change workspace name

workspace path

a cache for UserDetails should be valid

copyArtifacts v1.29 : JENKINS-14999 : Support for QueueItemAuthenticator

Unauthorized view fragment access

permissive-script-security.enabled

[!NOTE|label:references:]

[!TIP|label:references:]

set property

  • setup user.timezone in Jenkins

  • enable crumb proxy compatibility

  • setup CSRF protection tokens did not expire for SECURITY-626

get property

  • get all properties

  • or

get system environment :

  • System.getenv()

i.e.: ```groovy System.getenv().JAVA_OPTS ```

remote configuration

[!NOTE|label:references:] information:

  • ${PROTOCOL_FULLY_QUALIFIED_NAME}.disabled: where PROTOCOL_FULLY_QUALIFIED_NAME equals PROTOCOL_HANDLER_CLASSNAME without the Handler suffix.

- description - `hudson.remoting.FlightRecorderInputStream.BUFFER_SIZE` : Size (in bytes) of the flight recorder ring buffer used for debugging remoting issues - `hudson.remoting.Launcher.pingIntervalSec` : Seconds between ping checks to monitor health of agent nodes; 0 to disable ping | - `hudson.remoting.Launcher.pingTimeoutSec` : If ping of agent node takes longer than this, consider it dead; 0 to disable ping | - `hudson.remoting.RemoteClassLoader.force` : Class name String. Forces loading of the specified class name on incoming requests. Works around issues like JENKINS-19445 | - `hudson.remoting.Engine.socketTimeout` : Socket read timeout in milliseconds. If timeout happens and the failOnSocketTimeoutInReader property is true, the channel will be interrupted. | - `hudson.remoting.SynchronousCommandTransport.failOnSocketTimeoutInReader` : Boolean flag. Enables the original aggressive behavior, when the channel reader gets interrupted by any SocketTimeoutException | - `hudson.remoting.ExportTable.unexportLogSize` : Defines number of entries to be stored in the unexport history, which is being analyzed during the invalid object ID analysis. | - `${PROTOCOL_FULLY_QUALIFIED_NAME}.disabled` : Boolean flag, which allows disabling particular protocols in remoting. Property example: org.jenkinsci.remoting.engine.JnlpProtocol3.disabled | - `org.jenkinsci.remoting.nio.NioChannelHub.disabled` : Boolean flag to disable NIO-based socket connection handling, and switch back to classic IO. Used to isolate the problem. | - `org.jenkinsci.remoting.engine.JnlpAgentEndpointResolver.protocolNamesToTry` : If specified, only the protocols from the list will be tried during the connection. The option provides protocol names, but the order of the check is defined internally and cannot be changed. |

SYSTEM PROPERTY
DEFAULT VALUE
SINCE
JENKINS VERSION(S)
RELATED ISSUES

hudson.remoting.FlightRecorderInputStream.BUFFER_SIZE

1048576

2.41

1.563

JENKINS-22734

hudson.remoting.Launcher.pingIntervalSec

0 since 2.60, 600 before

2.0

1.367

JENKINS-35190

hudson.remoting.Launcher.pingTimeoutSec

240

2.0

1.367

N/A

hudson.remoting.RemoteClassLoader.force

null

2.58

2.4

JENKINS-19445 (workaround)

hudson.remoting.Engine.socketTimeout

30 minutes

2.58

2.4

JENKINS-34808

hudson.remoting.SynchronousCommandTransport.failOnSocketTimeoutInReader

false

2.60

TODO

JENKINS-22722

hudson.remoting.ExportTable.unexportLogSize

1024

2.40

?

JENKINS-20707

${PROTOCOL_FULLY_QUALIFIED_NAME}.disabled

false

2.59

2.4

JENKINS-34819

org.jenkinsci.remoting.nio.NioChannelHub.disabled

false

2.62.3

TODO

JENKINS-39290

org.jenkinsci.remoting.engine.JnlpAgentEndpointResolver.protocolNamesToTry

false

TODO

TODO

JENKINS-41730

tips

Last updated

Was this helpful?