Java

Java

Java

Topics on Semeru (Java) on IBM Z

 View Only

Jenkins ssh agent on USS hangs with Java21

  • 1.  Jenkins ssh agent on USS hangs with Java21

    Posted 3 days ago

    Hello,

      I have a problem with Jenkins ssh remote agent on USS with Java 21 (J21.0_64.0.9.1). i guess, this is because of changes described in https://www.ibm.com/docs/en/semeru-runtime-ce-z/21.0.0?topic=guide-file-encoding-utf-8-as-default-charset but i can't find the correct parameters update.

    I use 2.534 Jenkins server, which can run with both, java21 and java17. Server run on Linux (docker, java21), agent on USS. JVM Options is " -Dfile.encoding=ISO8859-1 -Xnoargsconversion ", Suffix Start Agent Command is " -text "

    Server:

    docker run --restart unless-stopped --name jenkins -p 8080:8080 -p 50000:50000 jenkins/jenkins:2.534-jdk21

    Here is the log (tweaked to show FINE level)  for Java 17 agent:


    Verified agent jar. No update is necessary.
    Expanded the channel window size to 4MB
    [01/22/26 11:09:53] [SSH] Starting agent process: export _BPXK_AUTOCVT=ON && export _CEE_RUNOPTS='FILETAG(AUTOCVT,AUTOTAG) POSIX(ON)' && export _TAG_REDIR_ERR=txt && export _TAG_REDIR_IN=txt && export _TAG_REDIR_OUT=txt && export JAVA_HOME=/rsusr/java/IBM/J17.0_64 && export IBM_JAVA_ENABLE_ASCII_FILETAG=ON && export PATH=/rsusr/ported/bin:$PATH && env && cd "/u/ssuser1/jenkins" && /rsusr/java/IBM/J17.0_64/bin/java  -Dfile.encoding=ISO8859-1 -Xnoargsconversion  -jar remoting.jar -workDir /u/ssuser1/jenkins -jar-cache /u/ssuser1/jenkins/remoting/jarCache -text -loggingConfig /u/ssuser1/jenkins/logging.properties
    MAIL=/usr/mail/SSUSER1
    PATH=/rsusr/ported/bin:/bin
    _TAG_REDIR_IN=txt
    SSH_CLIENT= xxx
    _BPXK_AUTOCVT=ON
    SHELL=/bin/sh
    IBM_JAVA_ENABLE_ASCII_FILETAG=ON
    _CEE_RUNOPTS=FILETAG(AUTOCVT,AUTOTAG) POSIX(ON)
    _=/bin/env
    LOGNAME=SSUSER1
    _TAG_REDIR_OUT=txt
    USER=SSUSER1
    HOME=/u/ssuser1
    SSH_CONNECTION=xxx 50438 yyyy
    JAVA_HOME=/rsusr/java/IBM/J17.0_64
    TZ=EST5EDT
    _TAG_REDIR_ERR=txt
    _ZOS_SMF_FD=3
    Running in text mode
    Jan 22, 2026 6:09:54 AM org.jenkinsci.remoting.engine.WorkDirManager initializeWorkDir
    INFO: Using /u/ssuser1/jenkins/remoting as a remoting work directory
    Jan 22, 2026 6:09:54 AM org.jenkinsci.remoting.engine.WorkDirManager setupLogging
    INFO: Both error and output logs will be printed to /u/ssuser1/jenkins/remoting
    Jan 22, 2026 6:09:54 AM hudson.remoting.ClassFilter createDefaultInstance
    FINE: Using default in built class blacklisting
    Jan 22, 2026 6:09:54 AM hudson.remoting.ChannelBuilder negotiate
    FINER: Sending capability preamble: Capability{Multi-ClassLoader RPC, Pipe throttling, Mimic Exception, Prefetch, Greedy RemoteInputStream, Proxy writer 2.35, Chunked encoding, ProxyException fallback}
    <===[JENKINS REMOTING CAPACITY]===Jan 22, 2026 6:09:54 AM hudson.remoting.ChannelBuilder negotiate
    FINER: Sending mode preamble: TEXT
    ><===[HUDSON TRANSMISSION BEGINS]===Jan 22, 2026 6:09:54 AM java.io.ObjectInputFilter$Config traceFilter
    FINER: Builtin factory: null -> new: null
    Jan 22, 2026 6:09:54 AM hudson.remoting.ChannelBuilder negotiate
    FINER: Received capability preamble: Capability{Multi-ClassLoader RPC, Pipe throttling, Mimic Exception, Prefetch, Greedy RemoteInputStream, Proxy writer 2.35, Chunked encoding, ProxyException fallback}
    Jan 22, 2026 6:09:54 AM hudson.remoting.ChannelBuilder negotiate
    FINER: Received mode preamble: TEXT
    Jan 22, 2026 6:09:54 AM hudson.remoting.ChannelBuilder negotiate
    FINE: Channel name channel negotiated mode TEXT with capability Capability{Multi-ClassLoader RPC, Pipe throttling, Mimic Exception, Prefetch, Greedy RemoteInputStream, Proxy writer 2.35, Chunked encoding, ProxyException fallback}
    channel started
    Jan 22, 2026 6:09:54 AM hudson.remoting.Launcher main
    FINE: performPing=true timeout=240,000 interval=0
    Jan 22, 2026 6:09:55 AM java.io.ObjectInputFilter$Config traceFilter
    FINER: Builtin factory: null -> new: null
    Jan 22, 2026 6:09:55 AM hudson.remoting.Channel$1 handle
    FINE: Received UserRequest:hudson.slaves.SlaveComputer$SlaveVersion@1b26cfd9
    Jan 22, 2026 6:09:55 AM hudson.remoting.Channel$1 handle
    FINE: Completed command UserRequest:hudson.slaves.SlaveComputer$SlaveVersion@1b26cfd9. It took 2ms
    Jan 22, 2026 6:09:55 AM hudson.remoting.Channel send
    FINE: Send RPCRequest:hudson.remoting.RemoteClassLoader$IClassLoader.getName[](2)
    Jan 22, 2026 6:09:55 AM java.io.ObjectInputFilter$Config traceFilter
    FINER: Builtin factory: null -> new: null
    Jan 22, 2026 6:09:55 AM hudson.remoting.Channel$1 handle
    FINE: Received Response(java.lang.String)
    Jan 22, 2026 6:09:55 AM hudson.remoting.Channel$1 handle
    FINE: Completed command Response:RPCRequest:hudson.remoting.RemoteClassLoader$IClassLoader.getName[](2)(java.lang.String). It took 2ms
    Jan 22, 2026 6:09:55 AM java.io.ObjectInputFilter$Config traceFilter
    FINER: Builtin factory: null -> new: null

    Here is a Java 21 log (last couple of lines which are different)

    FINE: Using default in built class blacklisting
    Jan 22, 2026 6:58:56 AM hudson.remoting.ChannelBuilder negotiate
    FINER: Sending capability preamble: Capability{Multi-ClassLoader RPC, Pipe throttling, Mimic Exception, Prefetch, Greedy RemoteInputStream, Proxy writer 2.35, Chunked encoding, ProxyException fallback}
    $��+.�+���(|��+��&�����)��|����+`���?���:����_��“���_����������%��頠��������Š��Š����:Jan 22, 2026 6:58:56 AM hudson.remoting.ChannelBuilder negotiate
    FINER: Sending mode preamble: TEXT
    /��Ϡ��������Ô$����|+���+�(����|+�����+�)�Jan 22, 2026 6:58:56 AM java.io.ObjectInputFilter$Config traceFilter
    FINER: Builtin factory: null -> new: null
    Jan 22, 2026 6:58:56 AM hudson.remoting.ChannelBuilder negotiate
    FINER: Received capability preamble: Capability{Multi-ClassLoader RPC, Pipe throttling, Mimic Exception, Prefetch, Greedy RemoteInputStream, Proxy writer 2.35, Chunked encoding, ProxyException fallback}

    This is the last line and agent hangs in "launching" state.

    Any ideas?

    Thanks.



    ------------------------------
    Sergey Korzhevsky
    ------------------------------