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

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

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • envinject-plugin
    • Jenkins 2.121.2, enviniject 2.1.6
    • 2.2.0

      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/ 

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

          Josh Soref added a comment -

          Josh Soref added a comment - https://github.com/jenkinsci/envinject-plugin/pull/131

          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

          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

          Ray Kivisto added a comment -

          holgersu 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?

          Ray Kivisto added a comment - holgersu 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?

          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

          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

          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.

          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.

          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".

          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".

          Josh Soref added a comment -

          Josh Soref added a comment - Sorry. https://github.com/jenkinsci/envinject-plugin/pull/134  

          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.

          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.

          Rusty Carruth added a comment - - edited

          How did you replace the agent.jar with the previous slave.jar?  (I'm here because I got that message, AND because my slave execution takes 20GIG of ram!:

           

          PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
          4539 engineer 20 0 20.738g 224564 14776 S 0.3 0.3 0:49.35 java

           

          and am trying to see if I can do anything to make it better)

           

          Also, what do I need to do to GET the 'fixed' version, since supposedly it is fixed (assuming that's why it was resolved!  I am using

          2.176.2

          of Jenkins)

          Rusty Carruth added a comment - - edited How did you replace the agent.jar with the previous slave.jar?  (I'm here because I got that message, AND because my slave execution takes 20GIG of ram!:   PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND 4539 engineer 20 0 20.738g 224564 14776 S 0.3 0.3 0:49.35 java   and am trying to see if I can do anything to make it better)   Also, what do I need to do to GET the 'fixed' version, since supposedly it is fixed (assuming that's why it was resolved!  I am using 2.176.2 of Jenkins)

            jsoref Josh Soref
            seldor Matthias Keller
            Votes:
            4 Vote for this issue
            Watchers:
            18 Start watching this issue

              Created:
              Updated:
              Resolved: