首页 > 解决方案 > Jenkins - Timed out connecting to Chrome

问题描述

Odd one here that I have not seen before. I decided to load a local instance of Jenkins on my Win 10 Laptop. The service is up and running and everything is building fine but when it tries to open chrome, I see the below in the log. I can execute it from Visual Studio and Command Line with no issues.

Research has mentioned lowering the chromedriver version so I tried with no luck. I have only run jenkins in master/agent config so maybe this has to do with jenkins being run on local host?

Starting ChromeDriver 77.0.3865.40 (f484704e052e0b556f8030b65b953dce96503217- 
refs/branch-heads/3865@{#442}) on port 7797
Only local connections are allowed.
Please protect ports used by ChromeDriver and related test frameworks to 
prevent access by malicious code.
[1571096148.894][WARNING]: Timed out connecting to Chrome, retrying...

Additional things I have tried.... Creating a new user with all permissions to the jenkins dir Running the service as the new user

标签: seleniumjenkins

解决方案


好的,我放弃了作为服务运行。我将 Jenkins.war 文件复制到了我想要的目录中。在这种情况下, D:\Jenkins 然后我执行:

D:\Jenkins>Java -jar Jenkins.war

这重新加载了 Jenkins 安装。我添加了 msbuild/tfs 插件,现在我从命令行运行 jenkins,而不是作为服务运行。现在一切正常。

只是一种解决方法,但它可能会帮助其他人。


推荐阅读