简体   繁体   English

Jenkins - 错误 Chrome 无法启动:异常退出

[英]Jenkins - ERROR Chrome failed to start: exited abnormally

Ubuntu - Jenkins and GIT in Ubuntu, Java project using selenium Ubuntu - Ubuntu 中的 Jenkins 和 GIT,使用 selenium 的 Java 项目

Trying to run GIT project in Jenkins(Jenkins with Agent node).尝试在 Jenkins(带有代理节点的 Jenkins)中运行 GIT 项目。

Error in Jenkins詹金斯的错误

unknown error: Chrome failed to start: exited abnormally
  (unknown error: DevToolsActivePort file doesn't exist)
  (The process started from chrome location /usr/bin/google-chrome is no longer running, so ChromeDriver is assuming that Chrome has crashed.)
  (Driver info: chromedriver=2.41.578700 (2f1ed5f9343c13f73144538f15c00b370eda6706),platform=Linux 4.15.0-39-generic x86_64) (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 254 milliseconds
Build info: version: '3.11.0', revision: 'e59cfb3', time: '2018-03-11T20:26:55.152Z'
System info: host: 'WebTest-VM', ip: '127.0.1.1', os.name: 'Linux', os.arch: 'amd64', os.version: '4.15.0-39-generic', java.version: '1.8.0_191'
Driver info: driver.version: ChromeDriver

Note: Same java + Selenium project able to open chrome browser in local machine注意:相同的 java + Selenium 项目能够在本地机器上打开 chrome 浏览器

System.setProperty("webdriver.chrome.driver", "/home/webtest/Downloads/chromedriver");
WebDriver driver = new ChromeDriver();

Try adding JenkinsFile to your project and commit to git尝试将JenkinsFile添加到您的项目并提交到 git

在此处输入图片说明

Your JenkinsFile could have following syntax:您的JenkinsFile可能具有以下语法:

pipeline {

    agent any
    tools {
        maven 'maven_3_5_0' 
    }
    stages {

         stage('Checkout Code from Git') {
               steps {
        git 'https://github.com/xxxxxxx/your-project.git'
    }}

    stage('compile stage') {
             steps {
                bat "mvn clean compile"
        }
    }

         stage('testing stage') {
             steps {
                bat "mvn test"
        }
    }

  }

}

On Windows Server 2012, just download the chromedriver suitable for your Chrome version.在 Windows Server 2012 上,只需下载适合您的 Chrome 版本的 chromedriver。 Put that driver in common place for all users.将该驱动程序放在所有用户的公共位置。 In Drive C:\\Tools\\Chromedriver for example.例如在驱动器C:\\Tools\\Chromedriver中。 Then in your Jenkins instance, just update the env variables with the path to that driver.然后在您的 Jenkins 实例中,只需使用该驱动程序的路径更新 env 变量。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 WebDriverError错误:Chrome无法启动:异常退出 - WebDriverError error: Chrome failed to start: exited abnormally Python:Selenium-消息:未知错误:Chrome无法启动:异常退出 - Python : Selenium - Message: unknown error: Chrome failed to start: exited abnormally 未知错误:Chrome 无法启动:异常退出。 Chrome 未在 selenium webdriver 中打开 - unknown error: Chrome failed to start: exited abnormally. Chrome isn't opening in selenium webdriver 出现未知错误:Chrome 无法启动:异常退出。 (未知错误:DevToolsActivePort 文件不存在) - Getting unknown error: Chrome failed to start: exited abnormally. (unknown error: DevToolsActivePort file doesn't exist) Selenium 网格:DevToolsActivePort 文件不存在(未知错误:Chrome 无法启动:异常退出) - Selenium Grid: DevToolsActivePort file doesn't exist (unknown error: Chrome failed to start: exited abnormally) 使用chromedriver 2.20和Selenium Server 2.48.2,测试失败,并显示错误“ Chrome无法启动:异常退出” - Using chromedriver 2.20 and selenium server 2.48.2, test fails with error “Chrome failed to start: exited abnormally” selenium.common.exceptions.WebDriverException:消息:未知错误:Chrome 无法启动:Chromedriver 2.26 异常退出错误 Selenium - selenium.common.exceptions.WebDriverException: Message: unknown error: Chrome failed to start: exited abnormally error with Chromedriver 2.26 Selenium 线程“pool-1-thread-115” org.openqa.selenium.WebDriverException 中的异常:未知错误:Chrome 无法启动:使用 Selenium 异常退出 - Exception in thread “pool-1-thread-115” org.openqa.selenium.WebDriverException: unknown error: Chrome failed to start: exited abnormally with Selenium 无法通过詹金斯打开Chrome浏览器-未知错误:Chrome无法启动:崩溃 - Not able to open the Chrome Browser through jenkins — unknown error: Chrome failed to start: crashed Tshark:子进程异常退出 - Tshark : child process exited abnormally
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM