【问题标题】:Can't start 'Matching Configurations' on running/connected Selenium Grid Node无法在运行/连接的 Selenium Grid 节点上启动“匹配配置”
【发布时间】:2017-08-17 03:16:16
【问题描述】:

我实际上有两个相关的问题。我无法在连接到在 Jenkins 下运行的网格服务器的 Selenium 网格节点(在“节点匹配配置”下列出)上启动“匹配配置”。我也无法找到任何包含相关信息的错误日志。

  1. 无法在运行/连接的 Selenium Grid 节点上启动“匹配配置”
  2. 执行此操作时写入的日志在哪里

症状:

  • 单击“匹配配置”之一旁边的“开始”按钮后,页面会快速刷新,您在“运行配置”下看不到任何条目。

设置/故障排除

  • 运行网格控制台 v.3.5.0
  • 运行 Jenkins slave.war 3.1.0
  • 已打开适当的防火墙规则以建立连接
  • 网格代理节点连接到 selenium 网格服务器
  • 代理节点使用 java web start .jnlp 文件启动。
  • .jnlp 文件显示已连接
  • 您会在匹配的配置下看到已连接的代理节点
  • 我可以在 Selenium Grid 服务器上启动“匹配配置”

在代理节点上的日志 (C:\jenkins\remoting\logs) 中,我在“匹配配置”启动失败后看到的最后一个条目显示了成功消息,这显然是不相关的 - (我实际上不真的看到任何错误)。

2017 年 8 月 16 日晚上 10:31:08 org.jenkinsci.remoting.engine.JnlpAgentEndpointResolver 解析 信息:远程服务器接受以下协议:[JNLP4-connect, JNLP-connect, Ping, JNLP2-connect]

在 selenium Grid 控制台中我看到:

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

任何明显的建议或有用的错误数据的位置将不胜感激。

谢谢!

【问题讨论】:

    标签: jenkins configuration matching selenium-grid


    【解决方案1】:

    疑难解答

    我发现了问题所在。仅使用 .jnlp 文件将 Selenium 代理节点连接到 Selenium Grid Master 是不够的。

    解决方案

    我还必须在每个代理上启动 selenium 独立服务器。

    实施

    我在 windows 代理上创建了一个 windows 批处理文件,它做了两件事。

    1. 它启动了 .jnlp 连接
    2. 它启动了 selenium 独立服务器(jar 文件)

    观察

    节点上匹配配置的启动与您单击启动时所做的相同,它只是刷新并且配置未列在“运行配置”下。但是,如果您转到 Hub 管理 UI 和“网格 Web 控制台”,您会看到已启用浏览器的连接代理。此外,当您在 Visual Studio 中本地运行测试并将它们指向网格时,代理实际上会运行测试。

    也许现在的问题只是 UI 问题,将得到解决。最终,现在代理已连接并可以运行分布式测试。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2016-12-09
      • 2016-08-26
      • 2013-04-08
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多