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

130 views
Skip to first unread message

matthias.keller@ergon.ch (JIRA)

unread,
Aug 8, 2018, 6:33:02 PM8/8/18
to jenkinsc...@googlegroups.com
Matthias Keller created an issue
 
Jenkins / Bug JENKINS-52946
Attempt to (de-)serialize anonymous class org.jenkinsci.plugins.envinject.EnvInjectComputerListener$2
Issue Type: Bug Bug
Assignee: Unassigned
Components: envinject-plugin
Created: 2018-08-08 22:32
Environment: Jenkins 2.121.2, enviniject 2.1.6
Labels: JEP-200
Priority: Minor Minor
Reporter: Matthias Keller

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/ 
Add Comment Add Comment
 
This message was sent by Atlassian JIRA (v7.10.1#710002-sha1:6efc396)

jsoref+jenkins@gmail.com (JIRA)

unread,
Aug 21, 2018, 5:12:02 PM8/21/18
to jenkinsc...@googlegroups.com

jsoref+jenkins@gmail.com (JIRA)

unread,
Aug 21, 2018, 5:12:02 PM8/21/18
to jenkinsc...@googlegroups.com

jsoref+jenkins@gmail.com (JIRA)

unread,
Aug 21, 2018, 5:12:02 PM8/21/18
to jenkinsc...@googlegroups.com

holger.sunke+jenkins@posteo.de (JIRA)

unread,
Oct 24, 2018, 9:35:01 AM10/24/18
to jenkinsc...@googlegroups.com
Holger Sunke commented on Bug JENKINS-52946
 
Re: Attempt to (de-)serialize anonymous class org.jenkinsci.plugins.envinject.EnvInjectComputerListener$2

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

This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)

ray.kivisto@gmail.com (JIRA)

unread,
Oct 25, 2018, 3:50:01 PM10/25/18
to jenkinsc...@googlegroups.com

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?

totoroliu1215@hotmail.com (JIRA)

unread,
Dec 21, 2018, 7:01:04 PM12/21/18
to jenkinsc...@googlegroups.com
Rick Liu commented on Bug JENKINS-52946

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}}

totoroliu1215@hotmail.com (JIRA)

unread,
Dec 21, 2018, 7:02:02 PM12/21/18
to jenkinsc...@googlegroups.com
Rick Liu edited a comment on Bug JENKINS-52946
I still see the warning below in all of my Jenkins slave log:
{quote}WARNING: Attempt to (de-)serialize anonymous class org.jenkinsci.plugins.envinject.EnvInjectComputerListener$2; see: [https://jenkins.io/redirect/serialization-of-anonymous-classes/]
{quote}
*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}}

totoroliu1215@hotmail.com (JIRA)

unread,
Dec 21, 2018, 7:02:03 PM12/21/18
to jenkinsc...@googlegroups.com

totoroliu1215@hotmail.com (JIRA)

unread,
Dec 21, 2018, 7:05:03 PM12/21/18
to jenkinsc...@googlegroups.com
Rick Liu edited a comment on Bug JENKINS-52946
I still see the warning below in all of my Jenkins slave log:
{quote}WARNING: Attempt to (de-)serialize anonymous class org.jenkinsci.plugins.envinject.EnvInjectComputerListener$2; see: [https://jenkins.io/redirect/serialization-of-anonymous-classes/]
{quote}
*Environment:*
*Ubuntu 16.04*
*Jenkins vers: 2.138.4*
*EnvInject 2.1.6*
*EnvInject API 1.5*

 

 

Jenkins slave connection log snippet:

{ { quote} [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

{color:#172b4d}
[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

{color}
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 {quote } }

totoroliu1215@hotmail.com (JIRA)

unread,
Dec 21, 2018, 7:06:03 PM12/21/18
to jenkinsc...@googlegroups.com

beermichael@siemens.com (JIRA)

unread,
Dec 28, 2018, 5:09:02 AM12/28/18
to jenkinsc...@googlegroups.com

beermichael@siemens.com (JIRA)

unread,
Dec 28, 2018, 5:10:04 AM12/28/18
to jenkinsc...@googlegroups.com
Beer Michael commented on Bug JENKINS-52946
 
Re: Attempt to (de-)serialize anonymous class org.jenkinsci.plugins.envinject.EnvInjectComputerListener$2

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

beermichael@siemens.com (JIRA)

unread,
Dec 28, 2018, 5:10:04 AM12/28/18
to jenkinsc...@googlegroups.com
Beer Michael edited a comment on Bug JENKINS-52946
We also still face the same problem in with Jenkins version 2.150.1 during connect with the agent.jar.

!image-2018-12-28-11-08-24-794.png!

totoroliu1215@hotmail.com (JIRA)

unread,
Dec 28, 2018, 1:31:04 PM12/28/18
to jenkinsc...@googlegroups.com
Rick Liu reopened an issue
 

Environment:
Ubuntu 16.04 (both master ans slaves)


Jenkins vers: 2.138.4
EnvInject 2.1.6
EnvInject API 1.5

Change By: Rick Liu
Resolution: Fixed
Status: Resolved Reopened

totoroliu1215@hotmail.com (JIRA)

unread,
Dec 28, 2018, 1:31:06 PM12/28/18
to jenkinsc...@googlegroups.com

totoroliu1215@hotmail.com (JIRA)

unread,
Dec 28, 2018, 1:33:03 PM12/28/18
to jenkinsc...@googlegroups.com

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

jsoref+jenkins@gmail.com (JIRA)

unread,
Dec 28, 2018, 2:13:02 PM12/28/18
to jenkinsc...@googlegroups.com

jsoref+jenkins@gmail.com (JIRA)

unread,
Dec 28, 2018, 2:14:02 PM12/28/18
to jenkinsc...@googlegroups.com

timothy.g.donohue@gmail.com (JIRA)

unread,
Jan 14, 2019, 11:43:02 AM1/14/19
to jenkinsc...@googlegroups.com

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@batmat.net (JIRA)

unread,
Jan 24, 2019, 10:27:06 AM1/24/19
to jenkinsc...@googlegroups.com
Baptiste Mathus started work on Bug JENKINS-52946
 
Change By: Baptiste Mathus
Status: Reopened In Progress

batmat@batmat.net (JIRA)

unread,
Jan 24, 2019, 10:27:07 AM1/24/19
to jenkinsc...@googlegroups.com

batmat@batmat.net (JIRA)

unread,
Jan 24, 2019, 10:27:10 AM1/24/19
to jenkinsc...@googlegroups.com

batmat@batmat.net (JIRA)

unread,
Jan 24, 2019, 10:27:11 AM1/24/19
to jenkinsc...@googlegroups.com

batmat@batmat.net (JIRA)

unread,
Jan 24, 2019, 10:27:13 AM1/24/19
to jenkinsc...@googlegroups.com

amolkrishanbhatia@gmail.com (JIRA)

unread,
Jul 16, 2019, 4:49:02 PM7/16/19
to jenkinsc...@googlegroups.com
Amol Bhatia commented on Bug JENKINS-52946
 
Re: Attempt to (de-)serialize anonymous class org.jenkinsci.plugins.envinject.EnvInjectComputerListener$2

Timothy Donohue Can you please share your old slave.jar file with me? 

I do not have any backup and the fix by Josh Soref is still in unreleased state. 

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

 

amolkrishanbhatia@gmail.com (JIRA)

unread,
Jul 18, 2019, 12:24:02 PM7/18/19
to jenkinsc...@googlegroups.com
Amol Bhatia updated an issue
 
Change By: Amol Bhatia
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?

 

rene.scheibe@gmail.com (JIRA)

unread,
Sep 1, 2019, 5:44:04 PM9/1/19
to jenkinsc...@googlegroups.com

rene.scheibe@gmail.com (JIRA)

unread,
Sep 1, 2019, 5:44:05 PM9/1/19
to jenkinsc...@googlegroups.com

rusty.carruth@smartm.com (JIRA)

unread,
Oct 23, 2019, 4:14:04 PM10/23/19
to jenkinsc...@googlegroups.com
Rusty Carruth commented on Bug JENKINS-52946
 
Re: Attempt to (de-)serialize anonymous class org.jenkinsci.plugins.envinject.EnvInjectComputerListener$2

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)

This message was sent by Atlassian Jira (v7.13.6#713006-sha1:cc4451f)
Atlassian logo

rusty.carruth@smartm.com (JIRA)

unread,
Oct 23, 2019, 4:40:04 PM10/23/19
to jenkinsc...@googlegroups.com
Rusty Carruth edited a comment on Bug JENKINS-52946
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
h1. 2.176.2

of Jenkins)
Reply all
Reply to author
Forward
0 new messages