0

I actually have two issues which are related. I can't start the 'matching configurations' on the Selenium Grid nodes (listed under 'nodes matching configurations') connected to the Grid server running under Jenkins. I am also not able to locate any error logs with relevant information.

  1. Can't start 'Matching Configurations' on running/connected Selenium Grid Node
  2. Where are the logs written to when performing this action

Symptoms:

  • After clicking the 'start' button beside one of the 'matching configurations', the page just refreshes quickly and you don't see any entries under 'running configurations'.

Setup/Troubleshooting

  • Running Grid Console v.3.5.0
  • Running Jenkins slave.war 3.1.0
  • Appropriate firewall rules are open to make the connections
  • The grid agent node is connected to the selenium grid server
  • Agent node is start using the java web start .jnlp file.
  • The .jnlp file shows connected
  • You see the connected agent node under matching configurations
  • I can start the 'matching configurations' on the Selenium Grid server

in the logs (C:\jenkins\remoting\logs) on the agent node the last entry I see after a failed start of the 'matching configurations' shows success messages, that are obviously unrelated - (I actually don't see any errors really).

Aug 16, 2017 10:31:08 PM org.jenkinsci.remoting.engine.JnlpAgentEndpointResolver resolve INFO: Remoting server accepts the following protocols: [JNLP4-connect, JNLP-connect, Ping, JNLP2-connect]

And in the selenium Grid console I see:

Starting Selenium Grid
[Jenkins] $ "C:\Program Files (x86)\Jenkins\jre\bin\java" -cp "C:\Program 
Files (x86)\Jenkins\war\WEB-INF\lib\remoting-3.10.jar" 
hudson.remoting.Launcher -cp "C:\Program Files 
(x86)\Jenkins\plugins\selenium\WEB-INF\lib\selenium-server-standalone-
3.5.0.jar;C:\Program Files (x86)\Jenkins\plugins\selenium\WEB-
INF\lib\htmlunit-driver-standalone-2.20.jar" -connectTo localhost:7138
Starting Selenium Grid
channel started
Aug 16, 2017 10:23:13 PM hudson.plugins.selenium.HubLauncher call
OFF: Grid hub starting with log level INFO
Aug 16, 2017 10:23:13 PM hudson.plugins.selenium.HubLauncher call
OFF: Grid Hub preparing to start on port 4444
2017-08-16 22:23:14.131:INFO::pool-1-thread-1 for channel id=167: Logging             
initialized @1842ms to org.seleniumhq.jetty9.util.log.StdErrLog
Aug 16, 2017 10:23:14 PM org.openqa.grid.web.Hub initServer
INFO: Will listen on 4444
2017-08-16 22:23:14.193:INFO:osjs.Server:pool-1-thread-1 for channel id=167: 
jetty-9.4.5.v20170502
2017-08-16 22:23:14.225:INFO:osjs.session:pool-1-thread-1 for channel 
id=167: DefaultSessionIdManager workerName=node0
2017-08-16 22:23:14.225:INFO:osjs.session:pool-1-thread-1 for channel 
id=167: No SessionScavenger set, using defaults
2017-08-16 22:23:14.225:INFO:osjs.session:pool-1-thread-1 for channel 
id=167: Scavenging every 600000ms
2017-08-16 22:23:14.225:INFO:osjsh.ContextHandler:pool-1-thread-1 for 
channel id=167: Started 
o.s.j.s.ServletContextHandler@1962b49{/,null,AVAILABLE}
2017-08-16 22:23:14.240:INFO:osjs.AbstractConnector:pool-1-thread-1 for 
channel id=167: Started ServerConnector@b7382c{HTTP/1.1,[http/1.1]}
{0.0.0.0:4444}
2017-08-16 22:23:14.240:INFO:osjs.Server:pool-1-thread-1 for channel id=167: 
Started @1960ms
Aug 16, 2017 10:23:14 PM hudson.plugins.selenium.HubLauncher call
OFF: Grid Hub started on port 4444 with args: -maxSession 5 -timeout 300 -
browserTimeout 0 -host [my-jenkins-server]
Aug 16, 2017 10:23:17 PM org.openqa.grid.internal.Registry add
INFO: Registered a node http://[my-jenkins-server]:4445
Aug 16, 2017 10:23:54 PM org.openqa.grid.internal.Registry removeIfPresent
WARNING: Cleaning up stale test sessions on the unregistered node 
http://[my-jenkins-server]:4445
channel stopped

Any obvious suggestions or locations of helpful error data would be greatly appreciated.

Thanks!

GIZNAJ
  • 501
  • 5
  • 23

1 Answers1

0

Troubleshooting

I figured out what the problem was. Just connecting the Selenium Agent Node to the Selenium Grid Master by using the .jnlp file is not enough.

Solution

I also had to start the selenium standalone server on the each of the agents.

Implementation

I created a windows batch file on the windows agents that did 2 things.

  1. It started the .jnlp connection
  2. It started the selenium standalone server (jar file)

Observations

The starting of the matching configurations on the Nodes does the same thing where when you click start, it just refreshes and the configuration is NOT listed under "Running configurations". However, if you go to the Hub Management UI and also the "Grid Web Console" you see the connected agents with the browsers that are enabled. Also, when you run the tests locally in Visual Studio and point them to the Grid, the agents actually do run the tests.

Maybe the issue now is just a UI issue and will be addressed. Ultimately now the agents are connected and can run distributed tests.

Community
  • 1
  • 1
GIZNAJ
  • 501
  • 5
  • 23