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

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

    XMLWordPrintable

    Details

    • Similar Issues:
    • Released As:
      2.2.0

      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

            seldor Matthias Keller created issue -
            Show
            jsoref Josh Soref added a comment - https://github.com/jenkinsci/envinject-plugin/pull/131
            jsoref Josh Soref made changes -
            Field Original Value New Value
            Resolution Fixed [ 1 ]
            Status Open [ 1 ] Fixed but Unreleased [ 10203 ]
            jsoref Josh Soref made changes -
            Status Fixed but Unreleased [ 10203 ] Reopened [ 4 ]
            jsoref Josh Soref made changes -
            Link This issue duplicates JENKINS-50457 [ JENKINS-50457 ]
            jsoref Josh Soref made changes -
            Status Reopened [ 4 ] Resolved [ 5 ]
            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
            mibe Beer Michael made changes -
            Attachment image-2018-12-28-11-08-24-794.png [ 45552 ]
            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".
            totoroliu Rick Liu made changes -
            Resolution Fixed [ 1 ]
            Status Resolved [ 5 ] Reopened [ 4 ]
            totoroliu Rick Liu made changes -
            Attachment Selection_010.png [ 45553 ]
            jsoref Josh Soref made changes -
            Assignee Josh Soref [ jsoref ]
            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.
            batmat Baptiste Mathus made changes -
            Status Reopened [ 4 ] In Progress [ 3 ]
            batmat Baptiste Mathus made changes -
            Status In Progress [ 3 ] In Review [ 10005 ]
            batmat Baptiste Mathus made changes -
            Resolution Fixed [ 1 ]
            Status In Review [ 10005 ] Resolved [ 5 ]
            batmat Baptiste Mathus made changes -
            Status Resolved [ 5 ] Fixed but Unreleased [ 10203 ]
            batmat Baptiste Mathus made changes -
            Released As 2.1.7-SNAPSHOT (unreleased)
            amolkbhatia Amol Bhatia made changes -
            Comment [ [~tgd0n0hue] Can you please share your old slave.jar file with me? 

            I do not have any backup and the fix by [~jsoref] is still in unreleased state. 

            Is there any other workaround, I can use for this issue meanwhile?

              ]
            renescheibe René Scheibe made changes -
            Released As 2.1.7-SNAPSHOT (unreleased) 2.2.0
            renescheibe René Scheibe made changes -
            Status Fixed but Unreleased [ 10203 ] Resolved [ 5 ]
            Hide
            rustycar54 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)

            Show
            rustycar54 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)

              People

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

                Dates

                Created:
                Updated:
                Resolved: