Jenkins - Unexpected executor death - jenkins

I see all my executors frequently changing to Dead state in one of my Jenkins slave machine(Windows 2008 R2 SP2).
Jenkins ver. 1.651.3
I have restarted Jenkins server as well as the service.
error logs-
Unexpected executor death
java.io.IOException: Failed to create a temporary file in /var/lib/jenkins/jobs/ABCD/jobs/EFGH/jobs/Build
at hudson.util.AtomicFileWriter.<init>(AtomicFileWriter.java:68)
at hudson.util.AtomicFileWriter.<init>(AtomicFileWriter.java:55)
at hudson.util.TextFile.write(TextFile.java:118)
at hudson.model.Job.saveNextBuildNumber(Job.java:293)
at hudson.model.Job.assignBuildNumber(Job.java:351)
at hudson.model.Run.<init>(Run.java:284)
at hudson.model.AbstractBuild.<init>(AbstractBuild.java:167)
at hudson.model.Build.<init>(Build.java:92)
at hudson.model.FreeStyleBuild.<init>(FreeStyleBuild.java:34)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
at jenkins.model.lazy.LazyBuildMixIn.newBuild(LazyBuildMixIn.java:175)
at hudson.model.AbstractProject.newBuild(AbstractProject.java:1018)
at hudson.model.AbstractProject.createExecutable(AbstractProject.java:1209)
at hudson.model.AbstractProject.createExecutable(AbstractProject.java:144)
at hudson.model.Executor$1.call(Executor.java:364)
at hudson.model.Executor$1.call(Executor.java:346)
at hudson.model.Queue._withLock(Queue.java:1365)
at hudson.model.Queue.withLock(Queue.java:1230)
at hudson.model.Executor.run(Executor.java:346)
Caused by: java.io.IOException: Permission denied
at java.io.UnixFileSystem.createFileExclusively(Native Method)
at java.io.File.createNewFile(File.java:1006)
at java.io.File.createTempFile(File.java:1989)
at hudson.util.AtomicFileWriter.<init>(AtomicFileWriter.java:66)
... 21 more
I see this error log in my slave machine
INFO: File download attempt 1
Oct 17, 2017 10:32:00 AM com.microsoft.tfs.core.clients.versioncontrol.VersionControlClient downloadFileToStreams
INFO: File download attempt 1
Oct 17, 2017 10:32:00 AM com.microsoft.tfs.core.ws.runtime.client.SOAPService executeSOAPRequestInternal
INFO: SOAP method='UpdateLocalVersion', status=200, content-length=367, server-wait=402 ms, parse=0 ms, total=402 ms, throughput=913 B/s, gzip
Oct 17, 2017 10:32:00 AM com.microsoft.tfs.core.clients.versioncontrol.VersionControlClient downloadFileToStreams
INFO: File download attempt 1
Oct 17, 2017 10:32:00 AM com.microsoft.tfs.core.clients.versioncontrol.VersionControlClient downloadFileToStreams
INFO: File download attempt 1
Oct 17, 2017 10:32:00 AM com.microsoft.tfs.core.clients.versioncontrol.VersionControlClient downloadFileToStreams
INFO: File download attempt 1

Can you please check the owner of the path /var/lib/jenkins/jobs/ABCD/jobs/EFGH/jobs/Build ? By any chance if it is created manually, you will get permission denied error if the owner is not Jenkins. Also check for free disk space on server as well as agent and try rebooting the slave agent. It has helped it at times.

How long are the real job names for ABCD and EFGH?
I've run into the 260 character maximum path length with Jenkins on Windows 2008 R2 before.

The path in:
java.io.IOException: Failed to create a temporary file in /var/lib/jenkins/jobs/ABCD/jobs/EFGH/jobs/Build
with the three /jobs in it seems strange to me. In Jenkins it normally should rather be:
+- /var/lib/jenkins/jobs
+- ABCD
| +- builds
| | +- ...
| +- ...
+- EFGH
| +- builds
| | +- ...
| +- ...
+- Build
+- builds
| +- ...
+- ...
Maybe there's some misconfiguration concerning paths and Jenkins tries a mkdir /var/lib/jenkins/jobs/ABCD/jobs/EFGH/jobs/Build and the Jenkins user or the user under which the job runs doesn't have permissions to do that.
See also File permissions and attributes:
| w | ... | The directory's contents can be modified (create new files or folders; [...]); requires the execute permission to be also set, otherwise this permission has no effect. |

In my situation, this happened because the server was very low on space. Click on "Build Executor Status" from the dashboard and see if there is low disk space or 0 swap space. Try to free up some space. Then restart the Jenkins server / service and try again.

Related

Cannot run rancher UI using docker

I user command line docker run -d --restart=unless-stopped \ -p 80:80 -p 443:443 \ --privileged \ rancher/rancher:latest
The container still run but I cannot access Rancher UI
8e95a158842c rancher/rancher:latest "entrypoint.sh" 45 minutes ago Up 7 seconds 0.0.0.0:80->80/tcp, :::80->80/tcp, 0.0.0.0:443->443/tcp, :::443->443/tcp relaxed_chandrasekhar
Then t run docker logs 8e95a158842c
2021-11-04 22:25:56.455037 W | pkg/fileutil: check file permission: directory "management-state/etcd" exist, but the permission is "drwxr-xr-x". The recommended permission is "-rwx------" to prevent possible unprivileged access to the data.
2021-11-04 22:25:56.543162 I | etcdserver: restarting member 8e9e05c52164694d in cluster cdf818194e3a8c32 at commit index 1839
raft2021/11/04 22:25:56 INFO: 8e9e05c52164694d switched to configuration voters=()
raft2021/11/04 22:25:56 INFO: 8e9e05c52164694d became follower at term 17
raft2021/11/04 22:25:56 INFO: newRaft 8e9e05c52164694d [peers: [], term: 17, commit: 1839, applied: 0, lastindex: 1839, lastterm: 17]
2021-11-04 22:25:56.547839 W | auth: simple token is not cryptographically signed
2021-11-04 22:25:56.573956 I | etcdserver: starting server... [version: 3.4.15, cluster version: to_be_decided]
2021-11-04 22:25:56.580742 I | embed: listening for peers on 127.0.0.1:2380
raft2021/11/04 22:25:56 INFO: 8e9e05c52164694d switched to configuration voters=(10276657743932975437)
2021-11-04 22:25:56.582873 I | etcdserver/membership: added member 8e9e05c52164694d [http://localhost:2380] to cluster cdf818194e3a8c32
2021-11-04 22:25:56.583346 N | etcdserver/membership: set the initial cluster version to 3.4
2021-11-04 22:25:56.583568 I | etcdserver/api: enabled capabilities for version 3.4
raft2021/11/04 22:26:02 INFO: 8e9e05c52164694d is starting a new election at term 17
raft2021/11/04 22:26:02 INFO: 8e9e05c52164694d became candidate at term 18
raft2021/11/04 22:26:02 INFO: 8e9e05c52164694d received MsgVoteResp from 8e9e05c52164694d at term 18
raft2021/11/04 22:26:02 INFO: 8e9e05c52164694d became leader at term 18
raft2021/11/04 22:26:02 INFO: raft.node: 8e9e05c52164694d elected leader 8e9e05c52164694d at term 18
2021-11-04 22:26:02.051592 I | etcdserver: published {Name:default ClientURLs:[http://localhost:2379]} to cluster cdf818194e3a8c32
2021-11-04 22:26:02.052775 I | embed: ready to serve client requests
2021-11-04 22:26:02.059541 N | embed: serving insecure client requests on 127.0.0.1:2379, this is strongly discouraged!
2021/11/04 22:26:02 [INFO] Waiting for server to become available: Get "https://127.0.0.1:6443/version?timeout=15m0s": dial tcp 127.0.0.1:6443: connect: connection refused
2021/11/04 22:26:04 [INFO] Waiting for server to become available: the server is currently unable to handle the request
2021/11/04 22:26:16 [INFO] Running in single server mode, will not peer connections
2021-11-04 22:26:17.724466 W | etcdserver: read-only range request "key:\"/registry/apiextensions.k8s.io/customresourcedefinitions/\" range_end:\"/registry/apiextensions.k8s.io/customresourcedefinitions0\" " with result "range_response_count:92 size:445717" took too long (109.807669ms) to execute
2021/11/04 22:26:18 [INFO] Applying CRD features.management.cattle.io
2021/11/04 22:26:22 [INFO] Applying CRD navlinks.ui.cattle.io
2021/11/04 22:26:22 [INFO] Applying CRD clusters.management.cattle.io
2021/11/04 22:26:22 [INFO] Applying CRD apiservices.management.cattle.io
2021/11/04 22:26:23 [INFO] Applying CRD clusterregistrationtokens.management.cattle.io
2021/11/04 22:26:23 [INFO] Applying CRD settings.management.cattle.io
2021/11/04 22:26:24 [INFO] Applying CRD preferences.management.cattle.io
2021/11/04 22:26:24 [INFO] Applying CRD features.management.cattle.io
2021/11/04 22:26:25 [INFO] Applying CRD clusterrepos.catalog.cattle.io
2021/11/04 22:26:26 [INFO] Applying CRD operations.catalog.cattle.io
2021/11/04 22:26:31 [INFO] Applying CRD apps.catalog.cattle.io
2021-11-04 22:26:33.250474 W | etcdserver: read-only range request "key:\"/registry/apiextensions.k8s.io/customresourcedefinitions/\" range_end:\"/registry/apiextensions.k8s.io/customresourcedefinitions0\" " with result "range_response_count:92 size:445717" took too long (139.120063ms) to execute
2021/11/04 22:26:45 [INFO] Applying CRD fleetworkspaces.management.cattle.io
2021-11-04 22:26:47.449199 W | etcdserver: read-only range request "key:\"/registry/apiextensions.k8s.io/customresourcedefinitions/\" range_end:\"/registry/apiextensions.k8s.io/customresourcedefinitions0\" " with result "range_response_count:92 size:445717" took too long (321.346575ms) to execute
2021-11-04 22:26:52.656294 W | etcdserver: request "header:<ID:7587858304790119201 > txn:<compare:<target:MOD key:\"/registry/configmaps/kube-system/k3s\" mod_revision:1632 > success:<request_put:<key:\"/registry/configmaps/kube-system/k3s\" value_size:456 >> failure:<request_range:<key:\"/registry/configmaps/kube-system/k3s\" > >>" with result "size:16" took too long (107.766444ms) to execute
2021-11-04 22:27:03.165794 W | etcdserver: read-only range request "key:\"/registry/configmaps/kube-system/k3s\" " with result "range_response_count:1 size:515" took too long (138.87999ms) to execute
2021-11-04 22:27:03.182578 W | etcdserver: read-only range request "key:\"/registry/serviceaccounts/\" range_end:\"/registry/serviceaccounts0\" " with result "range_response_count:36 size:10156" took too long (196.135777ms) to execute
2021-11-04 22:27:21.345406 W | etcdserver: read-only range request "key:\"/registry/flowschemas/exempt\" " with result "range_response_count:1 size:879" took too long (241.774296ms) to execute
2021-11-04 22:27:21.633929 W | etcdserver: read-only range request "key:\"/registry/namespaces/kube-system\" " with result "range_response_count:1 size:340" took too long (248.96888ms) to execute
2021-11-04 22:27:30.019952 W | etcdserver: read-only range request "key:\"/registry/rolebindings/\" range_end:\"/registry/rolebindings0\" count_only:true " with result "range_response_count:0 size:7" took too long (102.695372ms) to execute
When I install rancher on my laptop everything is normal but when I try on my VPS this error appeared
How can I fix it?
Facing the same issue with the rancher/rancher:latest image as well. This works for me though rancher/rancher:v2.4-head
docker pull rancher/rancher:v2.4-head

DataflowRunner exits with "No files to stage has been found."

I want to run the WordCount java example from https://beam.apache.org/get-started/quickstart-java/, but somehow I get an error that no files to stage have been found by the ClasspathScanningResourcesDetector. I run the example exactly as described on the website:
mvn compile exec:java -Dexec.mainClass=org.apache.beam.examples.WordCount \
-Dexec.args="--runner=DataflowRunner --project=<your-gcp-project> \
--gcpTempLocation=gs://<your-gcs-bucket>/tmp \
--inputFile=gs://apache-beam-samples/shakespeare/* --output=gs://<your-gcs-bucket>/counts" \
-Pdataflow-runner
, which yields
Caused by: java.lang.reflect.InvocationTargetException
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at org.apache.beam.sdk.util.InstanceBuilder.buildFromMethod(InstanceBuilder.java:214)
... 5 more
Caused by: java.lang.IllegalArgumentException: No files to stage has been found.
at org.apache.beam.runners.dataflow.DataflowRunner.fromOptions(DataflowRunner.java:281)
... 10 more
I am using the latest beam version
<beam.version>2.19.0</beam.version>
Do you know how to fix this?
EDIT:
This is a bug in 2.19.0. It works in 2.18.0
EDIT:
I am using Redhat OpenJDK 8 on Windows
EDIT:
Also, some unit test are failing from the standard wordcount example
DebuggingWordCountTest fails with
org.apache.beam.sdk.Pipeline$PipelineExecutionException: java.io.FileNotFoundException: No files matched spec: /Users/<redacted>/AppData/Local/Temp/junit7907687962995108435/junit2682353785908929665.tmp
at org.apache.beam.sdk.Pipeline.run(Pipeline.java:321)
at org.apache.beam.sdk.Pipeline.run(Pipeline.java:301)
When you are running the dataflow it will try to find and upload the
dependencies.
I assume you are getting error "No files to stage has
been found" due some classpath issue.
Try to use the --filesToStage
option to manually provide the jars or classes to stage
Also Provided sample logs which successfully copied 114 files to stage so you can compare with your complete logs to understand the issue.
Mar 08, 2020 7:37:41 PM org.apache.beam.runners.dataflow.options.DataflowPipelineOptions$StagingLocationFactory create
INFO: No stagingLocation provided, falling back to gcpTempLocation
Mar 08, 2020 7:37:42 PM org.apache.beam.runners.dataflow.DataflowRunner fromOptions
INFO: PipelineOptions.filesToStage was not specified. Defaulting to files from the classpath: will stage 114 files. Enable logging at DEBUG level to see which files will be staged.
Mar 08, 2020 7:37:43 PM org.apache.beam.runners.dataflow.DataflowRunner run
INFO: Executing pipeline on the Dataflow Service, which will have billing implications related to Google Compute Engine usage and other Google Cloud Services.
Mar 08, 2020 7:37:43 PM org.apache.beam.runners.dataflow.util.PackageUtil stageClasspathElements
INFO: Uploading 114 files from PipelineOptions.filesToStage to staging location to prepare for execution.
Mar 08, 2020 7:37:48 PM org.apache.beam.runners.dataflow.util.PackageUtil stageClasspathElements
INFO: Staging files complete: 114 files cached, 0 files newly uploaded
You can try the below commands to generate the source code required and run the pipeline freshly to stage dependencies.
mvn archetype:generate \
-DarchetypeGroupId=org.apache.beam \
-DarchetypeArtifactId=beam-sdks-java-maven-archetypes-examples \
-DarchetypeVersion=2.8.0 \
-DgroupId=org.example \
-DartifactId=first-dataflow \
-Dversion="0.1" \
-Dpackage=org.apache.beam.examples \
-DinteractiveMode=false
Also you can try it in qwiklabs for free:
https://google.qwiklabs.com/focuses/7974?parent=catalog

Jenkins build faild on slave node with `java.io.EOFException`

The stacktrace is below:
Evacuated stdout
Starting Selenium nodes on ci2
March 18, 2019 11:04:00 AM org.jenkinsci.remoting.util.AnonymousClassWarnings warn
WARN: Attempt to (de-)serialize anonymous class org.jenkinsci.plugins.gitclient.Git$1; see: https://jenkins.io/redirect/serialization-of-anonymous-classes/
March 18, 2019 11:04:03 AM org.jenkinsci.remoting.util.AnonymousClassWarnings warn
WARN: Attempt to (de-)serialize anonymous class org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler$1; see: https://jenkins.io/redirect/serialization-of-anonymous-classes/
Slave JVM has not reported exit code. Is it still running?
[03/18/19 11:04:06] Launch failed - cleaning up connection
ERROR: Connection terminated
java.io.EOFException
at java.io.ObjectInputStream$PeekInputStream.readFully(ObjectInputStream.java:2681)
at java.io.ObjectInputStream$BlockDataInputStream.readShort(ObjectInputStream.java:3156)
at java.io.ObjectInputStream.readStreamHeader(ObjectInputStream.java:862)
at java.io.ObjectInputStream.<init>(ObjectInputStream.java:358)
at hudson.remoting.ObjectInputStreamEx.<init>(ObjectInputStreamEx.java:49)
at hudson.remoting.Command.readFrom(Command.java:140)
at hudson.remoting.Command.readFrom(Command.java:126)
at hudson.remoting.AbstractSynchronousByteArrayCommandTransport.read(AbstractSynchronousByteArrayCommandTransport.java:36)
at hudson.remoting.SynchronousCommandTransport$ReaderThread.run(SynchronousCommandTransport.java:63)
Caused: java.io.IOException: Unexpected termination of the channel
at hudson.remoting.SynchronousCommandTransport$ReaderThread.run(SynchronousCommandTransport.java:77)
[03/18/19 11:04:06] [SSH] Connection closed。
I use JDK8 and jenkins 2.164.1 on Ubuntu 16.04.6
How to fix this?
This issue has been bugging us as well. There seems to be a temporary work around, not a solution. Just set the remote root directory of the slave node configuration on jenkins server to a new path, and remoting will take care of the rest.. but, the issue seem to reoccur now and then. We don't know the root cause yet. Any word is more than welcome.

JMeter Maven Plugin - remote test machine cannot be configured

I keep getting this errors (error code bellow) when I run jmeter tests through jenkins on remote slave machines :
[INFO] -------------------------------------------------------
[INFO] P E R F O R M A N C E T E S T S
[INFO] -------------------------------------------------------
[INFO]
[INFO]
[info]
[debug] JMeter is called with the following command line arguments: -n -t C:\Performance_Framework\Project\src\test\jmeter\Example.jmx -l C:\Performance_Framework\Project\target\jmeter\results\Example.jtl -d C:\Performance_Framework\Project\target\jmeter -L DEBUG -j C:\Performance_Framework\CMS\target\jmeter\logs\Example.jmx.log -r -R 10.0.20.100,10.0.20.101 -X -Djava.rmi.server.hostname 10.0.20.200 -Dsun.net.http.allowRestrictedHeaders true
[info] Executing test: Example.jmx
[info] Creating summariser <summary>
[info] Created the tree successfully using C:\Performance_Framework\Project\src\test\jmeter\Example.jmx
[info] Configuring remote engine: 10.0.20.100
[info] error unmarshalling return; nested exception is:
[info] java.lang.ClassNotFoundException: org.apache.jmeter.engine.RemoteJMeterEngineImpl_Stub (no security manager: RMI class loader disabled)
[info] Failed to configure 10.0.20.100
[info] Configuring remote engine: 10.0.20.101
[info] error unmarshalling return; nested exception is:
[info] java.lang.ClassNotFoundException: org.apache.jmeter.engine.RemoteJMeterEngineImpl_Stub (no security manager: RMI class loader disabled)
[info] Failed to configure 10.0.20.101
[info] Stopping remote engines
[info] Remote engines have been stopped
[info] Error in NonGUIDriver java.lang.RuntimeException: Following remote engines could not be configured:[10.0.20.100, 10.0.20.101]
[info] Completed Test: Example.jmx
Now my current POM settings for the machines:
<configuration>
--------------------------------
<propertiesSystem>
<java.rmi.server.hostname>10.0.20.200</java.rmi.server.hostname>
</propertiesSystem>
<remoteConfig>
<startServersBeforeTests>true</startServersBeforeTests>
<serverList>10.0.20.100,10.0.20.101</serverList>
<stopServersAfterTests>true</stopServersAfterTests>
</remoteConfig>
</configuration>
If I run the tests from JMETER GUI everything is ok, remote host start and execute the tests successfully.
I think that everything is set correctly, jmeter-server.bat is started before tests run on each slave.
Also there's something that I don't understand from this sentence on from jmeter maven plugin wiki :
runremote command being send to JMeter which will start up any remote
servers you have defined in your jmeter.properties when your first
test starts.
Which jmeter.properties file, of the project ?If yes, then i don't know how that could be defined as always the target folder is cleaned on every test run, that resulting jmeter properties file is derived.
Later Edit: I even created the jmeter.properties file and added in src/test/jmeter dir and defined there the remote hosts, but still nothing.
So what do you suggest guys?
I resolved somehow the issue with the connection by editing the jmeter-server file by adding also the java.rmi.server.hostname.
But what I don't like is the test execution time, it's horrible , even with one thread which is supposed to be be finished in less than 1-2 sec but it's still showing that is trying to receive shutdown message.
[INFO] -------------------------------------------------------
[INFO] P E R F O R M A N C E T E S T S
[INFO] -------------------------------------------------------
[INFO]
[INFO]
[info]
[debug] JMeter is called with the following command line arguments: -n -t C:\Performance_Framework\CMS\src\test\jmeter\Example.jmx -l C:\Performance_Framework\CMS\target\jmeter\results\Example.jtl -d C:\Performance_Framework\CMS\target\jmeter -L DEBUG -q C:\Performance_Framework\CMS\src\test\jmeter\jmeter.properties -j C:\Performance_Framework\CMS\target\jmeter\logs\Example.jmx.log -r -X -Djava.rmi.server.hostname 10.0.20.200 -Dsun.net.http.allowRestrictedHeaders true
[info] Executing test: SearchForModule.jmx
[info] Creating summariser <summary>
[info] Created the tree successfully using C:\Performance_Framework\CMS\src\test\jmeter\SearchForModule.jmx
[info] Configuring remote engine: 10.0.20.100
[info] Configuring remote engine: 10.0.20.101
[info] Starting remote engines
[info] Starting the test # Thu Jul 30 13:48:23 BST 2015 (1438260503717)
[info] Remote engines have been started
[info] Waiting for possible shutdown message on port 4445
Is something that is wrong on jenkins side, tomcat webapp?
First thing you need to fix are the server addresses:
https://github.com/jmeter-maven-plugin/jmeter-maven-plugin/wiki/Remote-Server-Configuration
10.0.x.100,10.0.x.101 are not correct IP addresses. This is what you can see in your error log.

Issue integrating Selenium test suite using jenkins

I am trying to integrate Jenkins with Selenium. I have prepared the following command:
java -jar "D:\CI\TWCP\Selenium plugins\selenium-server-standalone-2.32.0.jar" -htmlSuite *firefox "http://www.google.co.in" "C:\Users\....\Desktop\Test suites\GoogleTestSuite.html" "C:\Users\.....\Desktop\results.html" -firefoxProfileTemplate "C:\....\Mozilla\Firefox\Profiles\s980v5zn.default"
When I execute the command in the command line, it works Perfectly fine. Then I called the same command through Jenkins and I got the following error:
Started by user anonymous
Building in workspace D:\CI\Jenkins\jobs\Google Test\workspace
[workspace] $ cmd /c call C:\Windows\TEMP\hudson600399625489206831.bat
D:\CI\Jenkins\jobs\Google Test\workspace>java -jar "D:\CI\TWCP\Selenium plugins\selenium-server-standalone-2.32.0.jar" -htmlSuite *firefox "http://www.google.co.in" "C:\Users\N_chandanKumar\Desktop\Test suites\GoogleTestSuite.html" "C:\Users\N_chandanKumar\Desktop\results.html" -firefoxProfileTemplate "C:\Users\N_chandanKumar\AppData\Roaming\Mozilla\Firefox\Profiles\s980v5zn.default"
Apr 24, 2013 10:54:07 AM org.openqa.grid.selenium.GridLauncher main
INFO: Launching a standalone server
10:54:08.647 INFO - Java: Sun Microsystems Inc. 1.6.0-b105
10:54:08.647 INFO - OS: Windows Vista 6.1 x86
10:54:08.662 INFO - v2.32.0, with Core v2.32.0. Built from revision 6c40c18
10:54:08.756 INFO - RemoteWebDriver instances should connect to: http://127.0.0.1:4444/wd/hub
10:54:08.756 INFO - Version Jetty/5.1.x
10:54:08.756 INFO - Started HttpContext[/selenium-server/driver,/selenium-server/driver]
10:54:08.756 INFO - Started HttpContext[/selenium-server,/selenium-server]
10:54:08.756 INFO - Started HttpContext[/,/]
10:54:08.787 INFO - Started org.openqa.jetty.jetty.servlet.ServletHandler#13c1b02
10:54:08.787 INFO - Started HttpContext[/wd,/wd]
10:54:08.787 INFO - Started SocketListener on 0.0.0.0:4444
10:54:08.787 INFO - Started org.openqa.jetty.jetty.Server#7ced01
jar:file:/D:/CI/TWCP/Selenium%20plugins/selenium-server-standalone-2.32.0.jar!/customProfileDirCUSTFFCHROME
10:54:09.941 INFO - Preparing Firefox profile...
10:54:12.041 INFO - Launching Firefox...
10:54:14.242 INFO - Checking Resource aliases
10:54:37.079 INFO - Checking Resource aliases
10:54:37.079 INFO - Received posted results
GoogleTestCase.html
GoogleTestCase</td></tr>
</tbody></table>
10:54:37.297 INFO - Killing Firefox...
Tests failed, see result file for details: C:\Users\N_chandanKumar\Desktop\results.html
10:54:37.921 INFO - Shutting down...
10:54:37.921 INFO - Stopping Acceptor ServerSocket[addr=0.0.0.0/0.0.0.0,port=0,localport=4444]
D:\CI\Jenkins\jobs\Google Test\workspace>exit 1
Build step 'Execute Windows batch command' marked build as failure
Finished: FAILURE
result.html shows failure with below log
info: Starting test /selenium-server/tests/GoogleTestCase.html
info: Executing: |setTimeout | 1000000 | |
info: Executing: |openAndWait | http://www.google.co.in/ | |
info: Executing: |setTimeout | 1000000 | |
info: Executing: |pause | 20000 | |
info: Executing: |verifyTextPresent | India | |
warn: currentTest.recordFailure: false
info: Executing: |assertTitle | Google | |
error: Actual value &apos;Error Message&apos; did not match &apos;Google&apos;
warn: currentTest.recordFailure: Actual value &apos;Error Message&apos; did not match &apos;Google&apos;
If I run the same code adding debug tag i.e.
java -jar "D:\CI\TWCP\Selenium plugins\selenium-server-standalone-2.32.0.jar" -htmlSuite *firefox "http://www.google.co.in" "C:\Users\....\Desktop\Test suites\GoogleTestSuite.html" "C:\Users\....\Desktop\results.html" -firefoxProfileTemplate "C:\Users\.....\AppData\Roaming\Mozilla\Firefox\Profiles\s980v5zn.default" -debug
I get the following logs at the end
GoogleTestCase.html
GoogleTestCase</td></tr>
</tbody></table>
10:58:56.737 DEBUG - Handled by org.openqa.selenium.server.htmlrunner.SeleniumHTMLRunnerResultsHandler#14b7453
10:58:56.737 DEBUG - RESPONSE:
HTTP/1.1 200 OK
Date: Wed, 24 Apr 2013 05:28:56 GMT
Server: Jetty/5.1.x (Windows Vista/6.1 x86 java/1.6.0
Cache-Control: no-cache
Pragma: no-cache
Expires: Thu, 01 Jan 1970 00:00:00 GMT
Content-Type: text/html
Transfer-Encoding: chunked
10:58:57.002 INFO - Killing Firefox...
10:58:57.018 DEBUG - java.net.SocketException: Connection reset
10:58:57.018 DEBUG - java.net.SocketException: Connection reset
10:58:57.018 DEBUG - java.net.SocketException: Connection reset
10:58:57.018 DEBUG - java.net.SocketException: Connection reset
10:58:57.033 DEBUG - java.net.SocketException: Connection reset
10:58:57.033 DEBUG - java.net.SocketException: Connection reset
Tests failed, see result file for details: C:\Users\N_chandanKumar\Desktop\results.html
D:\CI\Jenkins\jobs\Google Test\workspace>exit 1
Build step 'Execute Windows batch command' marked build as failure
Finished: FAILURE
I have jenkins 1.509 and seleniumHQ2.32.0
Not able to make out how I am getting "java.net.SocketException: Connection reset" Any help in this regard will be appreciated.
Thanks & Regards,
cK
To check on the issue I ran the jenkins server in Interactive mode. The setting can be seen when you go to services.msc -> Jenkins process -> properties-> click on logon tab and you can select Local system account and tick "Allow service to interact with desktop".
This made jenkins to run the selenium test interactively instead of running in background.
There I could observe browser failing to open the website. This was tackled by following settings services.msc -> Jenkins process -> properties-> click on logon tab --> Select this account and give the account using which you have logged into this system.

Resources