Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-52946

Attempt to (de-)serialize anonymous class org.jenkinsci.plugins.envinject.EnvInjectComputerListener$2

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Fixed but Unreleased (View Workflow)
    • Priority: Minor
    • Resolution: Fixed
    • Component/s: envinject-plugin
    • Labels:
    • Environment:
      Jenkins 2.121.2, enviniject 2.1.6
    • Similar Issues:
    • Released As:
      2.1.7-SNAPSHOT (unreleased)

      Description

      I'm seeing the following warning in the logs:

      WARNING: Attempt to (de-)serialize anonymous class org.jenkinsci.plugins.envinject.EnvInjectComputerListener$2 in file:/var/lib/jenkins/plugins/envinject/WEB-INF/lib/envinject.jar; see: https://jenkins.io/redirect/serialization-of-anonymous-classes/ 

        Attachments

          Issue Links

            Activity

            Show
            jsoref Josh Soref added a comment - https://github.com/jenkinsci/envinject-plugin/pull/131
            Hide
            holgersu Holger Sunke added a comment -

            Although marked as duplicate of a fixed issue, this is still not fixed in enviniject 2.1.6, jenkins 2.148

            Show
            holgersu Holger Sunke added a comment - Although marked as duplicate of a fixed issue, this is still not fixed in enviniject 2.1.6, jenkins 2.148
            Hide
            rkivisto Ray Kivisto added a comment -

            Holger Sunke I have been trying to reproduce this error with envinject plugin 2.1.6 and Jenkins LTS 2.138.2, and have been unable to, but I do see reports of this warning from others.

            Can you please provide the steps to reproduce this bug?

            Show
            rkivisto Ray Kivisto added a comment - Holger Sunke I have been trying to reproduce this error with envinject plugin 2.1.6 and Jenkins LTS 2.138.2, and have been unable to, but I do see reports of this warning from others. Can you please provide the steps to reproduce this bug?
            Hide
            totoroliu Rick Liu added a comment - - edited

            I still see the warning below in all of my Jenkins slave log:

            WARNING: Attempt to (de-)serialize anonymous class org.jenkinsci.plugins.envinject.EnvInjectComputerListener$2; see: https://jenkins.io/redirect/serialization-of-anonymous-classes/

            Environment:
            Ubuntu 16.04
            Jenkins vers: 2.138.4
            EnvInject 2.1.6
            EnvInject API 1.5

             

             

            Jenkins slave connection log snippet:

            [12/21/18 15:44:08] [SSH] Checking java version of /home/devops/jenkins_robot_slave/jdk/bin/java
            Couldn't figure out the Java version of /home/devops/jenkins_robot_slave/jdk/bin/java
            bash: /home/devops/jenkins_robot_slave/jdk/bin/java: No such file or directory

            [12/21/18 15:44:08] [SSH] Checking java version of java
            [12/21/18 15:44:08] [SSH] java -version returned 1.8.0_162.
            [12/21/18 15:44:08] [SSH] Starting sftp client.
            [12/21/18 15:44:08] [SSH] Copying latest remoting.jar...
            [12/21/18 15:44:08] [SSH] Copied 776,265 bytes. Expanded the channel window size to 4MB
            [12/21/18 15:44:08] [SSH] Starting agent process: cd "/home/devops/jenkins_robot_slave" && java -jar remoting.jar -workDir /home/devops/jenkins_robot_slave
            Dec 21, 2018 3:44:09 PM org.jenkinsci.remoting.engine.WorkDirManager initializeWorkDir
            INFO: Using /home/devops/jenkins_robot_slave/remoting as a remoting work directory
            Both error and output logs will be printed to /home/devops/jenkins_robot_slave/remoting
            <===[JENKINS REMOTING CAPACITY]===>channel started
            Remoting version: 3.25
            This is a Unix agent
            Evacuated stdout

            Dec 21, 2018 3:44:18 PM org.jenkinsci.remoting.util.AnonymousClassWarnings warn
            WARNING: Attempt to (de-)serialize anonymous class org.jenkinsci.plugins.envinject.EnvInjectComputerListener$2; see:
            https://jenkins.io/redirect/serialization-of-anonymous-classes/

            Agent successfully connected and online

            Show
            totoroliu Rick Liu added a comment - - edited I still see the warning below in all of my Jenkins slave log: WARNING: Attempt to (de-)serialize anonymous class org.jenkinsci.plugins.envinject.EnvInjectComputerListener$2; see: https://jenkins.io/redirect/serialization-of-anonymous-classes/ Environment: Ubuntu 16.04 Jenkins vers: 2.138.4 EnvInject 2.1.6 EnvInject API 1.5     Jenkins slave connection log snippet: [12/21/18 15:44:08] [SSH] Checking java version of /home/devops/jenkins_robot_slave/jdk/bin/java Couldn't figure out the Java version of /home/devops/jenkins_robot_slave/jdk/bin/java bash: /home/devops/jenkins_robot_slave/jdk/bin/java: No such file or directory [12/21/18 15:44:08] [SSH] Checking java version of java [12/21/18 15:44:08] [SSH] java -version returned 1.8.0_162. [12/21/18 15:44:08] [SSH] Starting sftp client. [12/21/18 15:44:08] [SSH] Copying latest remoting.jar... [12/21/18 15:44:08] [SSH] Copied 776,265 bytes. Expanded the channel window size to 4MB [12/21/18 15:44:08] [SSH] Starting agent process: cd "/home/devops/jenkins_robot_slave" && java -jar remoting.jar -workDir /home/devops/jenkins_robot_slave Dec 21, 2018 3:44:09 PM org.jenkinsci.remoting.engine.WorkDirManager initializeWorkDir INFO: Using /home/devops/jenkins_robot_slave/remoting as a remoting work directory Both error and output logs will be printed to /home/devops/jenkins_robot_slave/remoting <=== [JENKINS REMOTING CAPACITY] ===>channel started Remoting version: 3.25 This is a Unix agent Evacuated stdout Dec 21, 2018 3:44:18 PM org.jenkinsci.remoting.util.AnonymousClassWarnings warn WARNING: Attempt to (de-)serialize anonymous class org.jenkinsci.plugins.envinject.EnvInjectComputerListener$2; see: https://jenkins.io/redirect/serialization-of-anonymous-classes/ Agent successfully connected and online
            Hide
            mibe Beer Michael added a comment - - edited

            We also still face the same problem in with Jenkins version 2.150.1 during connect with the agent.jar.

            Show
            mibe Beer Michael added a comment - - edited We also still face the same problem in with Jenkins version 2.150.1 during connect with the agent.jar.
            Hide
            totoroliu Rick Liu added a comment - - edited

            Environment:
            Ubuntu 16.04 (both master ans slaves)
            Jenkins vers: 2.138.4
            EnvInject 2.1.6
            EnvInject API 1.5

             

            All I did was disconnect the slave and reconnect again.

            The warning would always show up right before the line "Agent successfully connected and online".

            Show
            totoroliu Rick Liu added a comment - - edited Environment: Ubuntu 16.04 (both master ans slaves) Jenkins vers: 2.138.4 EnvInject 2.1.6 EnvInject API 1.5   All I did was disconnect the slave and reconnect again. The warning would always show up right before the line "Agent successfully connected and online".
            Show
            jsoref Josh Soref added a comment - Sorry. https://github.com/jenkinsci/envinject-plugin/pull/134  
            Hide
            tgd0n0hue Timothy Donohue added a comment -

            I am experiencing the same issue with a recent upgrade using the following environment listed below.

            Warning message on agent:

            .....
            Jan 14, 2019 11:36:15 AM hudson.remoting.jnlp.Main$CuiListener status
            INFO: Connected
            Jan 14, 2019 11:36:21 AM org.jenkinsci.remoting.util.AnonymousClassWarnings warn
            WARNING: Attempt to (de-)serialize anonymous class org.jenkinsci.plugins.envinject.EnvInjectComputerListener$2; see: https://jenkins.io/redirect/serialization-of-anonymous-classes/

            Environment:
            Jenkins vers: 2.150
            EnvInject 2.1.6
            EnvInject API 1.5
            Agent: Windows 10 Build 1803 (fully patched)
            Master: CentOS 6.10
            Java: 1.8.0_191 (Master and Agents)

            One piece of troubleshooting was replacing the agent.jar file with the previous slave.jar file and bringing the agent online successfully without the warning message.

            Show
            tgd0n0hue Timothy Donohue added a comment - I am experiencing the same issue with a recent upgrade using the following environment listed below. Warning message on agent: ..... Jan 14, 2019 11:36:15 AM hudson.remoting.jnlp.Main$CuiListener status INFO: Connected Jan 14, 2019 11:36:21 AM org.jenkinsci.remoting.util.AnonymousClassWarnings warn WARNING: Attempt to (de-)serialize anonymous class org.jenkinsci.plugins.envinject.EnvInjectComputerListener$2; see: https: //jenkins.io/redirect/serialization-of-anonymous-classes/ Environment: Jenkins vers: 2.150 EnvInject 2.1.6 EnvInject API 1.5 Agent: Windows 10 Build 1803 (fully patched) Master: CentOS 6.10 Java: 1.8.0_191 (Master and Agents) One piece of troubleshooting was replacing the agent.jar file with the previous slave.jar file and bringing the agent online successfully without the warning message.

              People

              • Assignee:
                jsoref Josh Soref
                Reporter:
                seldor Matthias Keller
              • Votes:
                4 Vote for this issue
                Watchers:
                17 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: