Remote agent test not running on my local Windows developer machine

21 views
Skip to first unread message

Robin Jansohn

unread,
Jul 23, 2019, 5:51:24 AM7/23/19
to Jenkins Developers
I'm trying to build the deploy-plugin project on my local Windows 10 developer machine but one of the tests is failing and I fail to see what is missing. The build on the Jenkins CI is working, e.g. https://ci.jenkins.io/blue/organizations/jenkins/Plugins%2Fdeploy-plugin/detail/master/9/pipeline

It's going to be difficult to release a new version if it's not running on my local machine. Any help appreciated!


> mvn -Dtest=RemoteCallableTest#testCallableSerialization test
[...]
[INFO] --- maven-enforcer-plugin:1.4.1:display-info (display-info) @ deploy ---
[INFO] Maven Version: 3.5.0
[INFO] JDK Version: 1.8.0_181 normalized as: 1.8.0-181
[INFO] OS Info: Arch: amd64 Family: dos Name: windows 10 Version: 10.0
[...]
=== Starting testCallableSerialization(hudson.plugins.deploy.RemoteCallableTest)
Jul 23, 2019 11:20:44 AM hudson.slaves.CommandLauncher launch
INFO: slave agent launched for slave0
Jul 23, 2019 11:20:44 AM hudson.Util warnWindowsSymlink
WARNING: Symbolic links enabled on this platform but disabled for this user; run as administrator or use Local Security Policy > Security Settings > Local Policies > User Rights Assignment > Create symbolic links
Jul 23, 2019 11:20:46 AM hudson.model.Run execute
INFO: test0 #1 main build action completed: SUCCESS
Jul 23, 2019 11:20:48 AM hudson.model.Run execute
INFO: test0 #2 main build action completed: SUCCESS
WARN: The method class org.apache.commons.logging.impl.SLF4JLogFactory#release() was invoked.
WARN: Please see http://www.slf4j.org/codes.html#release for an explanation.
[ERROR] Tests run: 1, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 80.821 s <<< FAILURE! - in hudson.plugins.deploy.RemoteCallableTest
[ERROR] testCallableSerialization(hudson.plugins.deploy.RemoteCallableTest)  Time elapsed: 79.886 s  <<< FAILURE!
java.lang.AssertionError:

Expected: a string containing "java.io.FileNotFoundException: http://example.com/manager/text/list"
     but: was "Legacy code started this job.  No cause information is available
Building remotely on slave0 in workspace C:\Users\xyz\AppData\Local\Temp\jenkinsTests.tmp\jenkins3814923641781041047test\workspace\test0
[DeployPublisher][INFO] Attempting to deploy 1 war file(s)
[DeployPublisher][INFO] Deploying C:\Users\xyz\AppData\Local\Temp\jenkinsTests.tmp\jenkins3814923641781041047test\workspace\test0\simple5015252018370588681.war to container Tomcat 8.x Remote with context
ERROR: Build step failed with exception
org.codehaus.cargo.container.ContainerException: Failed to redeploy [C:\Users\xyz\AppData\Local\Temp\jenkinsTests.tmp\jenkins3814923641781041047test\workspace\test0\simple5015252018370588681.war]
        at org.codehaus.cargo.container.tomcat.internal.AbstractTomcatManagerDeployer.redeploy(AbstractTomcatManagerDeployer.java:188)
        at hudson.plugins.deploy.CargoContainerAdapter.deploy(CargoContainerAdapter.java:81)
        at hudson.plugins.deploy.CargoContainerAdapter$DeployCallable.invoke(CargoContainerAdapter.java:167)
        at hudson.plugins.deploy.CargoContainerAdapter$DeployCallable.invoke(CargoContainerAdapter.java:1)
        at hudson.FilePath$FileCallableWrapper.call(FilePath.java:2719)
        at hudson.remoting.UserRequest.perform(UserRequest.java:120)
        at hudson.remoting.UserRequest.perform(UserRequest.java:48)
        at hudson.remoting.Request$2.run(Request.java:326)
        at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:68)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
        at java.lang.Thread.run(Thread.java:748)
        at ......remote call to slave0(Native Method)
        at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1416)
        at hudson.remoting.UserResponse.retrieve(UserRequest.java:220)
        at hudson.remoting.Channel.call(Channel.java:781)
        at hudson.FilePath.act(FilePath.java:979)
        at hudson.FilePath.act(FilePath.java:968)
        at hudson.plugins.deploy.CargoContainerAdapter.redeployFile(CargoContainerAdapter.java:133)
        at hudson.plugins.deploy.PasswordProtectedAdapterCargo.redeployFile(PasswordProtectedAdapterCargo.java:95)
        at hudson.plugins.deploy.DeployPublisher.perform(DeployPublisher.java:113)
        at hudson.tasks.BuildStepCompatibilityLayer.perform(BuildStepCompatibilityLayer.java:78)
        at hudson.tasks.BuildStepMonitor$3.perform(BuildStepMonitor.java:45)
        at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:782)
        at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:723)
        at hudson.model.Build$BuildExecution.post2(Build.java:185)
        at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:668)
        at hudson.model.Run.execute(Run.java:1763)
        at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
        at hudson.model.ResourceController.execute(ResourceController.java:98)
        at hudson.model.Executor.run(Executor.java:410)
Caused by: java.net.ConnectException: Connection refused: connect
        at java.net.DualStackPlainSocketImpl.connect0(Native Method)
        at java.net.DualStackPlainSocketImpl.socketConnect(DualStackPlainSocketImpl.java:79)
        at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350)
        at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)
        at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)
        at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:172)
        at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
        at java.net.Socket.connect(Socket.java:589)
        at java.net.Socket.connect(Socket.java:538)
        at sun.net.NetworkClient.doConnect(NetworkClient.java:180)
        at sun.net.www.http.HttpClient.openServer(HttpClient.java:463)
        at sun.net.www.http.HttpClient.openServer(HttpClient.java:558)
        at sun.net.www.http.HttpClient.<init>(HttpClient.java:242)
        at sun.net.www.http.HttpClient.New(HttpClient.java:339)
        at sun.net.www.http.HttpClient.New(HttpClient.java:357)
        at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:1220)
        at sun.net.www.protocol.http.HttpURLConnection.plainConnect0(HttpURLConnection.java:1156)
        at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:1050)
        at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:984)
        at org.codehaus.cargo.container.tomcat.internal.TomcatManager.invoke(TomcatManager.java:567)
        at org.codehaus.cargo.container.tomcat.internal.TomcatManager.list(TomcatManager.java:882)
        at org.codehaus.cargo.container.tomcat.internal.TomcatManager.getStatus(TomcatManager.java:895)
        at org.codehaus.cargo.container.tomcat.internal.AbstractTomcatManagerDeployer.redeploy(AbstractTomcatManagerDeployer.java:169)
        at hudson.plugins.deploy.CargoContainerAdapter.deploy(CargoContainerAdapter.java:81)
        at hudson.plugins.deploy.CargoContainerAdapter$DeployCallable.invoke(CargoContainerAdapter.java:167)
        at hudson.plugins.deploy.CargoContainerAdapter$DeployCallable.invoke(CargoContainerAdapter.java:1)
        at hudson.FilePath$FileCallableWrapper.call(FilePath.java:2719)
        at hudson.remoting.UserRequest.perform(UserRequest.java:120)
        at hudson.remoting.UserRequest.perform(UserRequest.java:48)
        at hudson.remoting.Request$2.run(Request.java:326)
        at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:68)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
        at java.lang.Thread.run(Thread.java:748)
java.net.ConnectException: Connection refused: connect
        at java.net.DualStackPlainSocketImpl.connect0(Native Method)
        at java.net.DualStackPlainSocketImpl.socketConnect(DualStackPlainSocketImpl.java:79)
        at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350)
        at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)
        at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)
        at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:172)
        at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
        at java.net.Socket.connect(Socket.java:589)
        at java.net.Socket.connect(Socket.java:538)
        at sun.net.NetworkClient.doConnect(NetworkClient.java:180)
        at sun.net.www.http.HttpClient.openServer(HttpClient.java:463)
        at sun.net.www.http.HttpClient.openServer(HttpClient.java:558)
        at sun.net.www.http.HttpClient.<init>(HttpClient.java:242)
        at sun.net.www.http.HttpClient.New(HttpClient.java:339)
        at sun.net.www.http.HttpClient.New(HttpClient.java:357)
        at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:1220)
        at sun.net.www.protocol.http.HttpURLConnection.plainConnect0(HttpURLConnection.java:1156)
        at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:1050)
        at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:984)
        at org.codehaus.cargo.container.tomcat.internal.TomcatManager.invoke(TomcatManager.java:567)
        at org.codehaus.cargo.container.tomcat.internal.TomcatManager.list(TomcatManager.java:882)
        at org.codehaus.cargo.container.tomcat.internal.TomcatManager.getStatus(TomcatManager.java:895)
        at org.codehaus.cargo.container.tomcat.internal.AbstractTomcatManagerDeployer.redeploy(AbstractTomcatManagerDeployer.java:169)
        at hudson.plugins.deploy.CargoContainerAdapter.deploy(CargoContainerAdapter.java:81)
        at hudson.plugins.deploy.CargoContainerAdapter$DeployCallable.invoke(CargoContainerAdapter.java:167)
        at hudson.plugins.deploy.CargoContainerAdapter$DeployCallable.invoke(CargoContainerAdapter.java:1)
        at hudson.FilePath$FileCallableWrapper.call(FilePath.java:2719)
        at hudson.remoting.UserRequest.perform(UserRequest.java:120)
        at hudson.remoting.UserRequest.perform(UserRequest.java:48)
        at hudson.remoting.Request$2.run(Request.java:326)
        at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:68)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
        at java.lang.Thread.run(Thread.java:748)
Build step 'Deploy war/ear to a container' marked build as failure
Finished: FAILURE
"
        at org.hamcrest.MatcherAssert.assertThat(MatcherAssert.java:20)
        at org.junit.Assert.assertThat(Assert.java:956)
        at org.junit.Assert.assertThat(Assert.java:923)
        at org.jvnet.hudson.test.JenkinsRule.assertLogContains(JenkinsRule.java:1215)
        at hudson.plugins.deploy.RemoteCallableTest.testCallableSerialization(RemoteCallableTest.java:72)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
        at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
        at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
        at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
        at org.jvnet.hudson.test.JenkinsRule$2.evaluate(JenkinsRule.java:547)
        at org.junit.rules.RunRules.evaluate(RunRules.java:20)
        at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
        at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
        at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
        at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
        at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
        at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
        at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
        at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
        at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
        at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:365)
        at org.apache.maven.surefire.junit4.JUnit4Provider.executeWithRerun(JUnit4Provider.java:272)
        at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:236)
        at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:159)
        at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:386)
        at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:323)
        at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:143)

Jesse Glick

unread,
Jul 23, 2019, 10:20:31 AM7/23/19
to Jenkins Dev

Robin Jansohn

unread,
Jul 23, 2019, 10:50:27 AM7/23/19
to Jenkins Developers
Thanks for having a look. I added the BuildWatcher and also changed the URL to "http://localhost" but it doesn't change anything in the result. Comparing the stacktraces I can see that in my case the exception is already thrown in "org.codehaus.cargo.container.
tomcat.internal.TomcatManager.invoke(TomcatManager.java:567)" calling "connection.connect();" while your linux build goes further and correctly throws the expected exception when reading the response calling "response = toString(connection.getInputStream(), MANAGER_CHARSET);".

So the question remains what could cause my system to throw a connection refused while others don't...

Robin Jansohn

unread,
Jul 23, 2019, 11:20:18 AM7/23/19
to Jenkins Developers
OK, now I understand it. It's expecting to reach a real server under example.com and that didn't work because my proxy wasn't used and refused the connection. That test case really isn't a good idea... I'll need to figure something out how to test this in a more portable way...

Robin Jansohn

unread,
Jul 24, 2019, 6:48:15 AM7/24/19
to Jenkins Developers
Fixed with https://github.com/jenkinsci/deploy-plugin/pull/39. Thanks again for pointing me in the right direction!
Reply all
Reply to author
Forward
0 new messages