Selenium Chrome nodes fail to stop the processes after execution - selenium

I'm using the SeleniumGrid in the most recent version 4.1.2 in a Kubernetes cluster.
In many cases (I would say in about half) when I execute a test through the grid, the node fails to kill the processes and does not go back to being idle. The container then keeps using one full CPU all the time until I kill it manually.
The log in the container is the following:
10:51:34.781 INFO [NodeServer$1.lambda$start$1] - Sending registration event...
10:51:35.680 INFO [NodeServer.lambda$createHandlers$2] - Node has been added
Starting ChromeDriver 98.0.4758.102 (273bf7ac8c909cde36982d27f66f3c70846a3718-refs/branch-heads/4758#{#1151}) on port 39592
Only local connections are allowed.
Please see https://chromedriver.chromium.org/security-considerations for suggestions on keeping ChromeDriver safe.
[1C6h4r6o1m2e9D1r2i3v.e9r8 7w]a[sS EsVtEaRrEt]e:d bsiuncdc(e)s sffauillleyd.:
Cannot assign requested address (99)
11:08:24.970 WARN [SeleniumSpanExporter$1.lambda$export$0] - {"traceId": "99100300a4e6b4fe2afe5891b50def09","eventTime": 1646129304968456597,"eventName": "No slot matched the requested capabilities. ","attributes"
11:08:44.672 INFO [OsProcess.destroy] - Unable to drain process streams. Ignoring but the exception being swallowed follows.
org.apache.commons.exec.ExecuteException: The stop timeout of 2000 ms was exceeded (Exit value: -559038737)
at org.apache.commons.exec.PumpStreamHandler.stopThread(PumpStreamHandler.java:295)
at org.apache.commons.exec.PumpStreamHandler.stop(PumpStreamHandler.java:180)
at org.openqa.selenium.os.OsProcess.destroy(OsProcess.java:135)
at org.openqa.selenium.os.CommandLine.destroy(CommandLine.java:152)
at org.openqa.selenium.remote.service.DriverService.stop(DriverService.java:281)
at org.openqa.selenium.grid.node.config.DriverServiceSessionFactory.apply(DriverServiceSessionFactory.java:183)
at org.openqa.selenium.grid.node.config.DriverServiceSessionFactory.apply(DriverServiceSessionFactory.java:65)
at org.openqa.selenium.grid.node.local.SessionSlot.apply(SessionSlot.java:143)
at org.openqa.selenium.grid.node.local.LocalNode.newSession(LocalNode.java:314)
at org.openqa.selenium.grid.node.NewNodeSession.execute(NewNodeSession.java:52)
at org.openqa.selenium.remote.http.Route$TemplatizedRoute.handle(Route.java:192)
at org.openqa.selenium.remote.http.Route.execute(Route.java:68)
at org.openqa.selenium.grid.security.RequiresSecretFilter.lambda$apply$0(RequiresSecretFilter.java:64)
at org.openqa.selenium.remote.tracing.SpanWrappedHttpHandler.execute(SpanWrappedHttpHandler.java:86)
at org.openqa.selenium.remote.http.Filter$1.execute(Filter.java:64)
at org.openqa.selenium.remote.http.Route$CombinedRoute.handle(Route.java:336)
at org.openqa.selenium.remote.http.Route.execute(Route.java:68)
at org.openqa.selenium.grid.node.Node.execute(Node.java:240)
at org.openqa.selenium.remote.http.Route$CombinedRoute.handle(Route.java:336)
at org.openqa.selenium.remote.http.Route.execute(Route.java:68)
at org.openqa.selenium.remote.AddWebDriverSpecHeaders.lambda$apply$0(AddWebDriverSpecHeaders.java:35)
at org.openqa.selenium.remote.ErrorFilter.lambda$apply$0(ErrorFilter.java:44)
at org.openqa.selenium.remote.http.Filter$1.execute(Filter.java:64)
at org.openqa.selenium.remote.ErrorFilter.lambda$apply$0(ErrorFilter.java:44)
at org.openqa.selenium.remote.http.Filter$1.execute(Filter.java:64)
at org.openqa.selenium.netty.server.SeleniumHandler.lambda$channelRead0$0(SeleniumHandler.java:44)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:829)
11:08:44.673 ERROR [OsProcess.destroy] - Unable to kill process Process[pid=75, exitValue=143]
11:08:44.675 WARN [SeleniumSpanExporter$1.lambda$export$0] - {"traceId": "99100300a4e6b4fe2afe5891b50def09","eventTime": 1646129316638154262,"eventName": "exception","attributes": {"driver.url": "http:\u002f\u002f
Here's an excerpt from the Kubernetes manifest:
- name: selenium-node-chrome
image: selenium/node-chrome:latest
...
env:
- name: TZ
value: Europe/Berlin
- name: START_XVFB
value: "false"
- name: SE_NODE_OVERRIDE_MAX_SESSIONS
value: "true"
- name: SE_NODE_MAX_SESSIONS
value: "1"
envFrom:
- configMapRef:
name: selenium-event-bus-config
...
volumeMounts:
- name: dshm
mountPath: /dev/shm
...
volumes:
- name: dshm
emptyDir:
medium: Memory
The selenium-event-bus-config contains the following vars:
data:
SE_EVENT_BUS_HOST: selenium-hub
SE_EVENT_BUS_PUBLISH_PORT: "4442"
SE_EVENT_BUS_SUBSCRIBE_PORT: "4443"
Did I misconfigure anything? Has anyone any idea how I can fix this?

If you don't need to use Xvfb you can remove it from your code and your problem will be resolved.
Apparently the issue resolves when removing the START_XVFB parameter. With a node with only the timezone config I did not yet have the problem.
For the workaround you can try to change your driver for example to Chromedriver. You can read about the differences between them here.
See also this similar problem.

Related

Karate - screenshot method throws a 'failed to get reply' exception

I'm using Karate 1.1.0 and running tests that combine both driver and robot instances. The tests are passing locally, but fail intermittently when executed through Jenkins with the following error:
js failed:
>>>>
01: delay(20000).screenshot()
<<<<
org.graalvm.polyglot.PolyglotException: failed to get reply for: [id: 2052, sessionId: D9DA8BB2B46A340A64D04C96EDFC9231, method: Page.captureScreenshot]
- com.intuit.karate.driver.DevToolsDriver.sendAndWait(DevToolsDriver.java:161)
- com.intuit.karate.driver.DevToolsMessage.send(DevToolsMessage.java:213)
- com.intuit.karate.driver.DevToolsMessage.send(DevToolsMessage.java:209)
- com.intuit.karate.driver.DevToolsDriver.screenshot(DevToolsDriver.java:823)
- com.intuit.karate.driver.DevToolsDriver.screenshot(DevToolsDriver.java:801)
- com.intuit.karate.driver.Driver.screenshot(Driver.java:119)
- <js>.:program(Unnamed:1)
In this particular example screenshot() call is 'ambiguous', but I've also tried it like so driver.screenshot(), which didn't make a difference:
js failed:
>>>>
01: driver.screenshot()
<<<<
org.graalvm.polyglot.PolyglotException: failed to get reply for: [id: 1832, sessionId: F7B7D4210527DE4B28FD2B85ACF66638, method: Page.captureScreenshot]
- com.intuit.karate.driver.DevToolsDriver.sendAndWait(DevToolsDriver.java:161)
- com.intuit.karate.driver.DevToolsMessage.send(DevToolsMessage.java:213)
- com.intuit.karate.driver.DevToolsMessage.send(DevToolsMessage.java:209)
- com.intuit.karate.driver.DevToolsDriver.screenshot(DevToolsDriver.java:823)
- com.intuit.karate.driver.DevToolsDriver.screenshot(DevToolsDriver.java:801)
- com.intuit.karate.driver.Driver.screenshot(Driver.java:119)
- <js>.:program(Unnamed:1)
Chrome is not running in headless mode and in some runs screenshots get captured successfully. Some other things I tried are:
changed the window size (addOptions: ['--window-size=1920,1080']);
used screenshotFull();
increased timeout (timeout: 90000);
increased Java heap space.
Any help will be greatly appreciated.

yarn application accepted but not running cloudera despite resource allocation

I am using a Cloudera quickstart VM 5.13.0.0 to run Spark applications in yarn-client mode. I have allocated 10GB and 3 cores to my Cloudera VM. When I submit the application, the application is ACCEPTED but never moves on to RUNNING. When I try to look for logs using yarn logs -applicationId I do not see anything. Its absolutely blank.
I have looked up this issue on:
here
here
here
here
here
here
here
I have practically meddled with all the configs that these links see a problem with. I still do not have an answer to my problem which on the face of it looks like the ones in the links above. Here are the config parameters of my cloudera cluster:
mapreduce.map.memory.mb 128M
mapreduce.reduce.memory.mb 128M
mapreduce.job.heap.memory-mb.ratio 0.8
yarn.nodemanager.resource.memory-mb 1900M
yarn.nodemanager.resource.percentage-physical-cpu-limit 100
yarn.nodemanager.resource.cpu-vcores 1
yarn.scheduler.minimum-allocation-mb 1M
yarn.scheduler.increment-allocation-mb 100M
yarn.scheduler.maximum-allocation-mb 1600M
yarn.scheduler.minimum-allocation-vcores 1
yarn.scheduler.increment-allocation-vcores 1
yarn.scheduler.maximum-allocation-vcores 2
yarn.scheduler.fair.continuous-scheduling-enabled unchecked
mapreduce.am.max-attempts 1
yarn.resourcemanager.am.max-retries, yarn.resourcemanager.am.max-attempts 1
yarn.app.mapreduce.am.resource.mb 1G
yarn.app.mapreduce.am.resource.cpu-vcores 1
ApplicationMaster Java Maximum Heap Size 512M
yarn.resourcemanager.scheduler.class org.apache.hadoop.yarn.server.resourcemanager.scheduler.fair.FairScheduler
yarn.scheduler.fair.user-as-default-queue unchecked
yarn.scheduler.fair.preemption unchecked
yarn.scheduler.fair.preemption.cluster-utilization-threshold 0.8
yarn.scheduler.fair.sizebasedweight unchecked
Fair Scheduler Allocations (deployed) {"defaultFairSharePreemptionThreshold":null,"defaultFairSharePreemptionTimeout":null,"defaultMinSharePreemptionTimeout":null,"defaultQueueSchedulingPolicy":"drf","queueMaxAMShareDefault":-1.0,"queueMaxAppsDefault":null,"queuePlacementRules":[{"create":true,"name":"specified","queue":null,"rules":null},{"create":null,"name":"nestedUserQueue","queue":null,"rules":[{"create":true,"name":"default","queue":"users","rules":null}]},{"create":null,"name":"default","queue":null,"rules":null}],"queues":[{"aclAdministerApps":null,"aclSubmitApps":null,"allowPreemptionFrom":null,"fairSharePreemptionThreshold":null,"fairSharePreemptionTimeout":null,"minSharePreemptionTimeout":null,"name":"root","queues":[{"aclAdministerApps":null,"aclSubmitApps":null,"allowPreemptionFrom":null,"fairSharePreemptionThreshold":null,"fairSharePreemptionTimeout":null,"minSharePreemptionTimeout":null,"name":"default","queues":[],"schedulablePropertiesList":[{"impalaDefaultQueryMemLimit":null,"impalaDefaultQueryOptions":null,"impalaMaxMemory":null,"impalaMaxQueuedQueries":null,"impalaMaxRunningQueries":null,"impalaQueueTimeout":null,"maxAMShare":-1.0,"maxChildResources":null,"maxResources":null,"maxRunningApps":null,"minResources":null,"scheduleName":"default","weight":1.0}],"schedulingPolicy":"drf","type":null},{"aclAdministerApps":null,"aclSubmitApps":null,"allowPreemptionFrom":null,"fairSharePreemptionThreshold":null,"fairSharePreemptionTimeout":null,"minSharePreemptionTimeout":null,"name":"users","queues":[],"schedulablePropertiesList":[{"impalaDefaultQueryMemLimit":null,"impalaDefaultQueryOptions":null,"impalaMaxMemory":null,"impalaMaxQueuedQueries":null,"impalaMaxRunningQueries":null,"impalaQueueTimeout":null,"maxAMShare":-1.0,"maxChildResources":null,"maxResources":null,"maxRunningApps":null,"minResources":null,"scheduleName":"default","weight":1.0}],"schedulingPolicy":"drf","type":"parent"}],"schedulablePropertiesList":[{"impalaDefaultQueryMemLimit":null,"impalaDefaultQueryOptions":null,"impalaMaxMemory":null,"impalaMaxQueuedQueries":null,"impalaMaxRunningQueries":null,"impalaQueueTimeout":null,"maxAMShare":null,"maxChildResources":null,"maxResources":null,"maxRunningApps":null,"minResources":null,"scheduleName":"default","weight":1.0}],"schedulingPolicy":"drf","type":null}],"userMaxAppsDefault":1,"users":[]}
Here is what the queue description looks like when the application is still in ACCEPTED state:
Likewise, here is the record from the Yarn RM UI (Note that the resources are allocated (memory/cpu) and Running Containers shows 1 container running):
Here is the Application Summary:
Here are the application logs (empty):
And, lastly, here is what the driver sees:
enter code here19/12/26 00:16:42 INFO Client:
client token: N/A
diagnostics: Application application_1577297544619_0002 failed 1 times due to AM Container for appattempt_1577297544619_0002_000001 exited with exitCode: 10
For more detailed output, check application tracking page:http://quickstart.cloudera:8088/proxy/application_1577297544619_0002/Then, click on links to logs of each attempt.
Diagnostics: Exception from container-launch.
Container id: container_1577297544619_0002_01_000001
Exit code: 10
Stack trace: ExitCodeException exitCode=10:
at org.apache.hadoop.util.Shell.runCommand(Shell.java:604)
at org.apache.hadoop.util.Shell.run(Shell.java:507)
at org.apache.hadoop.util.Shell$ShellCommandExecutor.execute(Shell.java:789)
at org.apache.hadoop.yarn.server.nodemanager.DefaultContainerExecutor.launchContainer(DefaultContainerExecutor.java:213)
at org.apache.hadoop.yarn.server.nodemanager.containermanager.launcher.ContainerLaunch.call(ContainerLaunch.java:302)
at org.apache.hadoop.yarn.server.nodemanager.containermanager.launcher.ContainerLaunch.call(ContainerLaunch.java:82)
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)
Container exited with a non-zero exit code 10
Failing this attempt. Failing the application.
ApplicationMaster host: N/A
ApplicationMaster RPC port: -1
queue: root.default
start time: 1577299469533
final status: FAILED
tracking URL: http://quickstart.cloudera:8088/cluster/app/application_1577297544619_0002
user: shepanch
19/12/26 00:16:42 ERROR SparkContext: Error initializing SparkContext.
org.apache.spark.SparkException: Yarn application has already ended! It might have been killed or unable to launch application master.
at org.apache.spark.scheduler.cluster.YarnClientSchedulerBackend.waitForApplication(YarnClientSchedulerBackend.scala:85)
at org.apache.spark.scheduler.cluster.YarnClientSchedulerBackend.start(YarnClientSchedulerBackend.scala:62)
at org.apache.spark.scheduler.TaskSchedulerImpl.start(TaskSchedulerImpl.scala:165)
at org.apache.spark.SparkContext.<init>(SparkContext.scala:512)
at org.apache.spark.SparkContext$.getOrCreate(SparkContext.scala:2511)
at org.apache.spark.sql.SparkSession$Builder$$anonfun$6.apply(SparkSession.scala:909)
at org.apache.spark.sql.SparkSession$Builder$$anonfun$6.apply(SparkSession.scala:901)
at scala.Option.getOrElse(Option.scala:121)
at org.apache.spark.sql.SparkSession$Builder.getOrCreate(SparkSession.scala:901)
at cloudera.jobs.ClouderaSampleJob$.delayedEndpoint$cloudera$jobs$ClouderaSampleJob$1(ClouderaSampleJob.scala:17)
at cloudera.jobs.ClouderaSampleJob$delayedInit$body.apply(ClouderaSampleJob.scala:6)
at scala.Function0$class.apply$mcV$sp(Function0.scala:34)
at scala.runtime.AbstractFunction0.apply$mcV$sp(AbstractFunction0.scala:12)
at scala.App$$anonfun$main$1.apply(App.scala:76)
at scala.App$$anonfun$main$1.apply(App.scala:76)
at scala.collection.immutable.List.foreach(List.scala:392)
at scala.collection.generic.TraversableForwarder$class.foreach(TraversableForwarder.scala:35)
at scala.App$class.main(App.scala:76)
at cloudera.jobs.ClouderaSampleJob$.main(ClouderaSampleJob.scala:6)
at cloudera.jobs.ClouderaSampleJob.main(ClouderaSampleJob.scala)
Is there anything that can be done to solve this issue?
After all the research and apart from the reasons mentioned in the links I have mentioned in the question, I found that this can happen due to various reasons:
when you have different versions of spark in the client (driver) and the cluster. Once you ensure that both bundle the same version of spark, it runs fine.
you might need to mention the property spark.driver.host. Make sure the IP passed in here can be pinged from the guest VM.

Polymer web-component-tester / selenium is stalling

We are trying to run the web-component-tester however it keeps stalling on the Selenium step.
When I run wct -l chrome --verbose
I get the following
hook: prepare
hook: prepare:selenium
hook done: prepare:selenium
Starting Selenium server for local browsers
11:47:46.357 INFO - Launching a standalone server
Setting system property webdriver.chrome.driver to C:\Users\<user>\AppData\Roaming\npm\node_modules\web-component-tester\node_modules\wct-local\node_modules\selenium-standalone\.selenium\chromedriver\2.13-x64-chromedriver
Setting system property webdriver.ie.driver to C:\Users\<user>\AppData\Roaming\npm\node_modules\web-component-tester\node_modules\wct-local\node_modules\selenium-standalone\.selenium\iedriver\2.44.0-x64-IEDriverServer.exe
11:47:46.809 INFO - Java: Oracle Corporation 25.31-b07
11:47:46.809 INFO - OS: Windows 7 6.1 x86
11:47:46.872 INFO - v2.44.0, with Core v2.44.0. Built from revision 76d78cf
11:47:47.669 INFO - RemoteWebDriver instances should connect to: http://127.0.0.1:11655/wd/hub
11:47:47.669 INFO - Version Jetty/5.1.x
11:47:47.685 INFO - Started HttpContext[/selenium-server,/selenium-server]
11:47:47.919 INFO - Started org.openqa.jetty.jetty.servlet.ServletHandler#3c1e69
11:47:47.919 INFO - Started HttpContext[/wd,/wd]
11:47:47.919 INFO - Started HttpContext[/selenium-server/driver,/selenium-server/driver]
11:47:47.919 INFO - Started HttpContext[/,/]
11:47:47.935 INFO - Started SocketListener on 0.0.0.0:11655
11:47:47.935 INFO - Started org.openqa.jetty.jetty.Server#11bc7ed
Then after a few minutes of stalling it follows up with
hook done: prepare with error: [Error: Unable to connect to selenium]
Error: Unable to connect to selenium
Running these same tests from the browser works without a problem.
While it has hanged, we can still connect via browser to http://127.0.0.1:11655/wd/hub
I've tried Googling but not a lot of luck.
What are the things that could go wrong or how can I debug this further?
One of the node modules doesn't use the Internet Explorer proxy values.
In your environment variables, create a new one
Name : no_proxy
Value : localhost, 127.0.0.1
Don't forget to restart your shell session after applying
I had the same issue and was due to the proxy setting of my org. When i went out of my org's network and connected through internet, i was able to run the tests through selenium. I have not yet able to find a way through the proxy settings as of now. I was running on mac. You might need to try through normal internet setup and check.

Apache Giraph cannot run on CDH4.4.0

I try to run latest version of apache giraph examples, describe on the quickstart page (http://giraph.apache.org/quick_start.html). I use CDH 4.4.0 (Cloudera distribution of Hadoop)
I have built Giraph with the dependecies updated to CDH 4.4.0. Everything went ok
When I run the examples I got following output
-bash-4.1$ hadoop jar /usr/local/giraph/giraph-examples/target/giraph-examples-1.1.0- SNAPSHOT-for-hadoop-2.0.0-cdh4.4.0-jar-with-dependencies.jar
org.apache.giraph.GiraphRunner
org.apache.giraph.examples.SimpleShortestPathsComputation
-vif org.apache.giraph.io.formats.JsonLongDoubleFloatDoubleVertexInputFormat
-vip /user/hdfs/input/tiny_graph.txt
-vof org.apache.giraph.io.formats.IdWithValueTextOutputFormat
-op /user/hdfs/output/shortestpaths -w 1
13/10/02 18:31:58 INFO utils.ConfigurationUtils: No edge input format specified. Ensure your InputFormat does not require one.
13/10/02 18:31:58 INFO utils.ConfigurationUtils: No edge output format specified. Ensure your OutputFormat does not require one.
13/10/02 18:31:58 INFO job.GiraphJob: run: Since checkpointing is disabled (default), do not allow any task retries (setting mapred.map.max.attempts = 0, old value = 4)
13/10/02 18:31:58 WARN mapred.JobClient: Use GenericOptionsParser for parsing the arguments. Applications should implement Tool for the same.
13/10/02 18:32:00 INFO job.GiraphJob: run: Tracking URL: http://hadoop57:50030/jobdetails.jsp?jobid=job_201310021452_0015
13/10/02 18:32:22 INFO mapred.JobClient: Running job: job_201310021452_0015
13/10/02 18:32:22 INFO mapred.JobClient: Job complete: job_201310021452_0015
13/10/02 18:32:22 INFO mapred.JobClient: Counters: 6
13/10/02 18:32:22 INFO mapred.JobClient: Job Counters
13/10/02 18:32:22 INFO mapred.JobClient: Failed map tasks=1
13/10/02 18:32:22 INFO mapred.JobClient: Launched map tasks=2
13/10/02 18:32:22 INFO mapred.JobClient: Total time spent by all maps in occupied slots (ms)=29054
13/10/02 18:32:22 INFO mapred.JobClient: Total time spent by all reduces in occupied slots (ms)=0
13/10/02 18:32:22 INFO mapred.JobClient: Total time spent by all maps waiting after reserving slots (ms)=0
13/10/02 18:32:22 INFO mapred.JobClient: Total time spent by all reduces waiting after reserving slots (ms)=0
and the job log shows exception:
java.lang.IllegalStateException: run: Caught an unrecoverable exception
java.io.FileNotFoundException: File
_bsp/_defaultZkManagerDir/job_201310021452_0015/_zkServer does not exist.
at org.apache.giraph.graph.GraphMapper.run(GraphMapper.java:101)
at org.apache.hadoop.mapred.MapTask.runNewMapper(MapTask.java:672)
at org.apache.hadoop.mapred.MapTask.run(MapTask.java:330)
at org.apache.hadoop.mapred.Child$4.run(Child.java:268)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAs(Subject.java:396)
at
org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1408)
at org.apache.hadoop.mapred.Child.main(Child.java:262)
Caused by: java.lang.RuntimeException: java.io.FileNotFoundException: File
_bsp/_defaultZkManagerDir/job_201310021452_0015/_zkServer does not exist.
at org.apache.giraph.zk.ZooKeeperManager.onlineZooKeeperServers(ZooKeeperManager.java:792)
at org.apache.giraph.graph.GraphTaskManager.startZooKeeperManager(GraphTaskManager.java
The file _bsp/_defaultZkManagerDir/job_201310021452_0015/_zkServer sometimes gets created and sometimes not.
Could you please give any hints where to start hunting for this issue.
BR
Konrad
Looks like Giraph is starting it's own zookeeper session. Just try passing the following as a VM argument to the GiraphRunner.
-Dgiraph.zkList=<zookeeper server address>:<port>
e.g.
-Dgiraph.zkList=localhost:2181
Your command will look something like this:
-bash-4.1$ hadoop jar /usr/local/giraph/giraph-examples/target/giraph-examples-1.1.0- SNAPSHOT-for-hadoop-2.0.0-cdh4.4.0-jar-with-dependencies.jar
org.apache.giraph.GiraphRunner
org.apache.giraph.examples.SimpleShortestPathsComputation
-Dgiraph.zkList=localhost:2181
-vif org.apache.giraph.io.formats.JsonLongDoubleFloatDoubleVertexInputFormat
-vip /user/hdfs/input/tiny_graph.txt
-vof org.apache.giraph.io.formats.IdWithValueTextOutputFormat
-op /user/hdfs/output/shortestpaths -w 1
Best luck..!!

Jenkins and Seleniumhq configuration

I'm trying to set up a simple Selenium test in Jenkins. My OS is Debian GNU/Linux 6.0.7 (squeeze), desktop version (64-bit). I uninstalled the supplied browser iceweasel and intalled Firefox with aptitude. The firefox version is "20.0". I also have Google Chrome installed. I can run Firefox by writing "firefox" in a terminal window.
Jenkins is installed with aptitude.
So, I have installed a plugin in Jenkins called Seleniumhq. These are my settings:
I then receive an error in the Jenkins console when I try to build:
Started by user anonymous
Building in workspace /var/lib/jenkins/workspace/selenium2
java -jar /var/lib/jenkins/selenium-server-standalone-2.0b2.jar -trustAllSSLCertificates -htmlSuite *firefox http://site.com /var/lib/jenkins/jobs/Selenium1/suites/suite1.html /var/lib/jenkins/jobs/Selenium1/logs/selenium.html
[selenium2] $ java -jar /var/lib/jenkins/selenium-server-standalone-2.0b2.jar - trustAllSSLCertificates -htmlSuite *firefox http://site.com /var/lib/jenkins/jobs/Selenium1/suites/suite1.html /var/lib/jenkins/jobs/Selenium1/logs/selenium.html
13:32:18.507 INFO - Java: Sun Microsystems Inc. 14.0-b16
13:32:18.508 INFO - OS: Linux 2.6.32-5-amd64 amd64
13:32:18.512 INFO - v2.0 [b2], with Core v2.0 [b2]
13:32:18.604 INFO - RemoteWebDriver instances should connect to: http://127.0.0.1:4444/wd/hub
13:32:18.605 INFO - Version Jetty/5.1.x
13:32:18.606 INFO - Started HttpContext[/selenium-server/driver,/selenium-server/driver]
13:32:18.606 INFO - Started HttpContext[/selenium-server,/selenium-server]
13:32:18.607 INFO - Started HttpContext[/,/]
13:32:18.616 INFO - Started org.openqa.jetty.jetty.servlet.ServletHandler#488e32e7
13:32:18.616 INFO - Started HttpContext[/wd,/wd]
13:32:18.621 INFO - Started SocketListener on 0.0.0.0:4444
13:32:18.621 INFO - Started org.openqa.jetty.jetty.Server#5a5e5a50
HTML suite exception seen:
java.lang.RuntimeException: java.lang.RuntimeException: Firefox 3 could not be found in the path!
Please add the directory containing ''firefox-bin' or 'firefox'' to your PATH environment
variable, or explicitly specify a path to Firefox 3 like this:
*firefox3/blah/blah/firefox-bin
at org.openqa.selenium.server.browserlaunchers.BrowserLauncherFactory.createBrowserLauncher(Bro wserLauncherFactory.java:160)
at org.openqa.selenium.server.browserlaunchers.BrowserLauncherFactory.getBrowserLauncher(Browse rLauncherFactory.java:99)
at org.openqa.selenium.server.htmlrunner.HTMLLauncher.getBrowserLauncher(HTMLLauncher.java:58)
at org.openqa.selenium.server.htmlrunner.HTMLLauncher.runHTMLSuite(HTMLLauncher.java:114)
at org.openqa.selenium.server.htmlrunner.HTMLLauncher.runHTMLSuite(HTMLLauncher.java:166)
at org.openqa.selenium.server.SeleniumServer.runHtmlSuite(SeleniumServer.java:557)
at org.openqa.selenium.server.SeleniumServer.boot(SeleniumServer.java:250)
at org.openqa.selenium.server.SeleniumServer.main(SeleniumServer.java:210)
Caused by: java.lang.RuntimeException: Firefox 3 could not be found in the path!
Please add the directory containing ''firefox-bin' or 'firefox'' to your PATH environment
variable, or explicitly specify a path to Firefox 3 like this:
*firefox3/blah/blah/firefox-bin
at org.openqa.selenium.browserlaunchers.locators.Firefox2or3Locator.findBrowserLocationOrFail(Firefox2or3Locator.java:26)
at org.openqa.selenium.server.browserlaunchers.BrowserInstallationCache.locateBrowserInstallation(BrowserInstallationCache.java:27)
at org.openqa.selenium.server.browserlaunchers.FirefoxLauncher.<init>(FirefoxLauncher.java:52)
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:532)
at org.openqa.selenium.server.browserlaunchers.BrowserLauncherFactory.createBrowserLauncher(BrowserLauncherFactory.java:153)
... 7 more
Finished: SUCCESS
I also tried to put this in the browser field:
*firefox/usr/bin/firefox
I think firefox is installed there (i ran "locate firefox").
That config renders another error msg:
...
HTML suite exception seen:
java.lang.RuntimeException: Browser not supported: *firefox/usr/bin/firefox
Supported browsers include:
*firefox
*mock
*firefoxproxy
*pifirefox
*chrome
*iexploreproxy
*iexplore
*firefox3
*safariproxy
*googlechrome
*konqueror
*firefox2
*safari
*piiexplore
*firefoxchrome
*opera
*iehta
*custom
....
Does anybody have ideas about how to fix this?
Thanks!
Edit
I changed the browser settings to this:
*firefox /opt/firefox/firefox (with a space between)
Now it seems FIrefox can be found, but I receive another error:
Started by user anonymous
Building in workspace /var/lib/jenkins/workspace/selenium2
java -jar /var/lib/jenkins/selenium-server-standalone-2.0b2.jar -trustAllSSLCertificates -htmlSuite *firefox /opt/firefox/firefox http://site.com /var/lib/jenkins/jobs/selenium2/suites/suite1.html /var/lib/jenkins/jobs/selenium2/logs/selenium.html
[selenium2] $ java -jar /var/lib/jenkins/selenium-server-standalone-2.0b2.jar - trustAllSSLCertificates -htmlSuite "*firefox /opt/firefox/firefox" http://site.com /var/lib/jenkins/jobs/selenium2/suites/suite1.html /var/lib/jenkins/jobs/selenium2/logs/selenium.html
10:51:15.567 INFO - Java: Sun Microsystems Inc. 14.0-b16
10:51:15.569 INFO - OS: Linux 2.6.32-5-amd64 amd64
10:51:15.572 INFO - v2.0 [b2], with Core v2.0 [b2]
10:51:15.668 INFO - RemoteWebDriver instances should connect to: http: //127.0.0.1:4444/wd/hub
10:51:15.669 INFO - Version Jetty/5.1.x
10:51:15.669 INFO - Started HttpContext[/selenium-server/driver,/selenium-server/driver]
10:51:15.670 INFO - Started HttpContext[/selenium-server,/selenium-server]
10:51:15.670 INFO - Started HttpContext[/,/]
10:51:15.680 INFO - Started org.openqa.jetty.jetty.servlet.ServletHandler#3da99561
10:51:15.680 INFO - Started HttpContext[/wd,/wd]
10:51:15.685 INFO - Started SocketListener on 0.0.0.0:4444
10:51:15.685 INFO - Started org.openqa.jetty.jetty.Server#182d9c06
10:51:15.743 INFO - Preparing Firefox profile...
HTML suite exception seen:
java.lang.NullPointerException
at org.openqa.selenium.os.CommandLine.destroy(CommandLine.java:259)
at org.openqa.selenium.server.browserlaunchers.FirefoxChromeLauncher.populateCustomProfileDirec tory(FirefoxChromeLauncher.java:117)
at org.openqa.selenium.server.browserlaunchers.FirefoxChromeLauncher.launch(FirefoxChromeLauncher.java:84)
at org.openqa.selenium.server.browserlaunchers.FirefoxChromeLauncher.launchHTMLSuite(FirefoxChromeLauncher.java:406)
at org.openqa.selenium.server.browserlaunchers.FirefoxLauncher.launchHTMLSuite(FirefoxLauncher.java:106)
at org.openqa.selenium.server.htmlrunner.HTMLLauncher.runHTMLSuite(HTMLLauncher.java:121)
at org.openqa.selenium.server.htmlrunner.HTMLLauncher.runHTMLSuite(HTMLLauncher.java:166)
at org.openqa.selenium.server.SeleniumServer.runHtmlSuite(SeleniumServer.java:557)
at org.openqa.selenium.server.SeleniumServer.boot(SeleniumServer.java:250)
at org.openqa.selenium.server.SeleniumServer.main(SeleniumServer.java:210)
10:51:35.789 INFO - Shutting down...
Finished: SUCCESS
Well, I found a good tutorial that turned out to be useful. One important thing is to start a virtual X window on a server where Selenium can start the browser in to run your tests (Xvfb). And in Jenkins the server should be entered just like "*firefox".
http://alex.nederlof.com/blog/2012/11/19/installing-selenium-with-jenkins-on-ubuntu/
You should try to run the commandline from a shell and see what happen. It's certainly a problem linked to the default profile used by the firefox instanciated by selenium.
In my case the problem was that firefox was starting by displaying the tabs that could be restored.
You can also try to create a specific profile :
firefox -p
or
firefox -ProfileManager
then use this dedicated profile using command line parameter :
-firefoxProfileTemplate /home/userXXX/.mozilla/firefox/ljhyckqd.Selenium
java.lang.RuntimeException: Browser not supported: *firefox/usr/bin/firefox
Wrong syntax. try *firefox or *firefox [insert directory]