1.问题1:java.io.FileNotFoundException: /root/.jenkins/workspace/Videoyi_AutoTest_Maven/config-log4j\log4j.xml (No such file or directory)

该问题是由于代码是在windows下编写和编译的,使用的都是\\来实现目录结构的,结果到linux下的时候,linux不能识别\\,所以需要将代码的\\修改为/。

2、问题:Linux下执行时,调用的是windows下的chroomedriver导致不能启动浏览器。

该问题待调查

java.lang.IllegalStateException: The driver is not executable: /root/.jenkins/workspace/Videoyi_AutoTest_Maven/browserDriver/chromedriver.exe

at com.google.common.base.Preconditions.checkState(Preconditions.java:199)

at org.openqa.selenium.remote.service.DriverService.checkExecutable(DriverService.java:125)

at org.openqa.selenium.remote.service.DriverService.findExecutable(DriverService.java:116)

at org.openqa.selenium.chrome.ChromeDriverService.access$000(ChromeDriverService.java:32)

at org.openqa.selenium.chrome.ChromeDriverService$Builder.findDefaultExecutable(ChromeDriverService.java:137)

报以上错误的时候,下载了一个Linux下的Chrome浏览器,然后就OK了不报错了。

https://blog.csdn.net/chenlix/article/details/72526205

3、然后安装完chromedriver后,还是报错。

接下来报的是业务方面的错误了

[2018-05-25 10:35:12:498] [ai.qa.autotest.ui.framework.webdriverfactory.ChromeBrowserDriver] [INFO] [46] [----- ?????Linux??.-----]

[2018-05-25 10:35:12:568] [ai.qa.autotest.ui.framework.webdriverfactory.ChromeBrowserDriver] [ERROR] [77] [java.lang.IllegalStateException: The driver is not executable: /root/.jenkins/workspace/Videoyi_AutoTest_Maven/browserDriver/chromedriver]

该错误的解决方案是,找到chromedriver的可执行文件然后给他加上执行的权限。

4、好不容易能进入到函数的运行体了,但是中文输出出来都是乱码或者问号,所以继续调查这个问题。

/root/.jenkins/workspace/Videoyi_AutoTest_Maven/browserDriver/chromedriver: error while loading shared libraries: libgconf-2.so.4: cannot open shared object file: No such file or directory

������ 25, 2018 11:03:15 ������ org.openqa.selenium.os.UnixProcess checkForError

������: org.apache.commons.exec.ExecuteException: Process exited with an error: 127 (Exit value: 127)

[2018-05-25 11:03:15:590] [ai.qa.autotest.ui.framework.webdriverfactory.ChromeBrowserDriver] [ERROR] [77] [org.openqa.selenium.remote.UnreachableBrowserException: Could not start a new session. Possible causes are invalid address of the remote server or browser start-up failure.

Build info: version: '2.52.0', revision: '4c2593cfc3689a7fcd7be52549167e5ccc93ad28', time: '2016-02-11 11:22:43'

解决方案如下:

https://blog.csdn.net/dumeifang/article/details/2963223

乱码问题:

http://lee2013.iteye.com/blog/2108612

还是未解决乱码的问题。

居然天神奇了,我按照这个又把这些都改回到初始的状态,结果是正常的中文码了,可是我删了啊。。不知道下次重启会不会是乱码呢。

http://lee2013.iteye.com/blog/2108612

5、编译的时候报错,导致chromeBrowserDriver无法启动。

/root/.jenkins/workspace/Videoyi_AutoTest_Maven/browserDriver/chromedriver: error while loading shared libraries: libgconf-2.so.4: cannot open shared object file: No such file or directory

参考的解决方案:

https://www.cnblogs.com/Anker/p/3209876.html

https://www.cnblogs.com/amboyna/archive/2008/02/06/1065322.html

那就表示系統不知道xxx.so 放在哪個目錄下。

這個時候就要在/etc/ld.so.conf中加入xxx.so所在的目錄。

一般而言,有很多so檔會在/usr/local/lib這個目錄下,所以在/etc/ld.so.conf中加入/usr/local/lib這一行,可以解決此問題。

將/etc/ld.so.conf存檔後,還要執行「/sbin/ldconfig –v」來更新一下才會生效。

https://stackoverflow.com/questions/37624225/shared-libraries-libgconf-2-so-4-is-missing

居然说是这个帮忙了,本来想自己下载个

libgconf-2.so.4然后再安装到linux下,结果发现这个网址上有攻略。

down vote

Please ask yumfor the file, libgconf-2.so.4 : $ yum provides */libgconf-2.so.4Install GConf2 : # yum install GConf2

Packages http://mirror.centos.org/centos/6.8/os/ ... and updateshttp://mirror.centos.org/centos/6.8/updates/

The chromedriver depends on the same packages/ files as GConf2, and then some. Please see for yourself : $ ldd chromedriver , where 'chromedriver' is the unzipped executable.

6、好不容易把chromeDriver的libconfig问题解决了,但是又报了新的错误。

原因可能是:chrome和chromedriver的版本不匹配。

原因分析:是由于chrome版本过低导致的

解决办法:重新下一个比 29.0.1545.0版本高的chrome就可以了

Chrome的版本:

ChromeDriver的版本:

当前使用的是2.29版本,所以会报错。

然后下载2.36版本,并上传后,并修改他的可执行权限,静待效果。

https://npm.taobao.org/mirrors/chromedriver

Chrome和ChromeDriver的对照表:

https://blog.csdn.net/huilan_same/article/details/51896672

Linux下配置chromeDriver:

ln -s /usr/local/share/chromedriver /usr/local/bin/chromedriver

ln -s /usr/local/share/chromedriver /usr/bin/chromedriver

jenkins linux编译c,【Linux】【Jenkins】代码编译和执行过程中的问题汇总相关推荐

  1. linux脚本执行过程中被挂起,Linux学习笔记(八)——脚本执行的过程控制

    一.脚本执行过程中的控制 之前的内容中,运行编写好的脚本时都是在命令行上直接确定运行的,并且运行的脚本是实时的,这并不是脚本唯一的运行方式,下面的内容是脚本的其他运行方式.例如在Linux系统中如何控 ...

  2. python 利用pyinstaller 编译.exe文件过程中编写完的.exe文件执行过程中闪退

    问题描述: python 利用pyinstaller 编译.exe文件过程中编写完的.exe文件执行过程中闪退,并提示no module named 'pyproj.datadir' 解决方法: 闪退 ...

  3. linux下 /etc/profile、~/.bash_profile ~/.profile的执行过程

    关于登录linux时,/etc/profile.~/.bash_profile等几个文件的执行过程. 在登录Linux时要执行文件的过程如下: 在刚登录Linux时,首先启动 /etc/profile ...

  4. 老牛知点所以然-Linux(Ubuntu)配置安卓开发环境及过程中常见问题解决

    文章目录 Linux安装JDK,配置JDK环境变量 安装SDK和gradle 安装AndroidStudio AndroidStudio创建模拟器报错 安装FireFox 建立Firefox桌面快捷方 ...

  5. linux怎么查看一个bam文件,生信分析过程中这些常见文件的格式以及查看方式你都知道吗?...

    原标题:生信分析过程中这些常见文件的格式以及查看方式你都知道吗? 生信分析过程中,会与很多不同格式的文件打交道,除了原始测序数据 fastq 之外,还需要准备基因组文件 fasta 格式和基因注释文件 ...

  6. Linux命令执行过程中的配置文件信息

    命令执行过程 前面讲到过使用 alias 可以建立别名,比如创建了一个 ls 的别名,其实 ls 有少的指令,那么到底是哪一个会被选中执行呢?基本上,指令运行顺序可以这样看: 以相对.绝对路径执行命令 ...

  7. linux时间界面返回,Android开发教程:游戏过程中按Home键后返回游戏界面

    症状:游戏过程中,按下Home键返回手机主菜单,再点击游戏图标试图返回游戏的时候屏幕黑的一片! 以前一直没在意只有结束线程在运行游戏,今天觉得改仔细琢磨一下这个问题了! 首先第一件事:打印Logo看看 ...

  8. linux shell语法检查或者查看shell脚本执行过程的参数介绍及两种使用方法

    shell语法检查或者查看shell脚本执行过程的参数介绍及两种使用方法 一.常用参数概述: set -x 与 set +x 在liunx脚本中可用set -x就可有详细的日志输出,省的老是要echo ...

  9. DRM驱动代码分析:开机过程中显示驱动做了什么

    前言: 有些信息是在网上查资料后总结的,没有去追代码验证.如果有说得不对的地方,欢迎提出指正.感谢! 手机启动的大致流程 1.长按开机键 2.执行存储在ROM里(应该是某一个固定地址或是预定义的地址) ...

最新文章

  1. C# Trim 的使用
  2. 苹果回应中情局攻击事件:许多漏洞已经得到解决
  3. html5、canvas绘制本地时钟
  4. drm linux 内核,Linux内核DRM实现分析——基于i915
  5. android 关机 流程_Android系统关机的全流程解析
  6. Redis集群理论知识
  7. 捍卫者usb管理控制系统_捍卫Java
  8. linux服务与进程管理sup,linux下进程管理工具-supervisord
  9. 推荐系统知识梳理——WideDeep
  10. 2021年高考呼和浩特市二中成绩查询,呼和浩特市第二中学,是一所百强中学,2020年高考用实力来证明!...
  11. Futter基础第21篇: 实现普通对话框、列表对话框、单选对话框、Toast提示
  12. Android代码中更改TextView颜色
  13. 普元EOS:执行自定义命名sql查询(无参,有参)
  14. OPPO R17在哪里打开usb调试模式的完美流程
  15. 2022.4月份科研记录【日记】
  16. Unity Failed to resolve project template:Failed to decompress
  17. python 绘制ROC曲线
  18. 一条sql是如何执行的
  19. 伪类link,visited,hover,focus,active
  20. 淘宝服饰精品案例分析

热门文章

  1. 基于TableStore/MaxCompute的数据采集分析系统介绍
  2. 深入浅出 Spring 架构设计
  3. python 判断是否有余数_判断多个坐标是否在同一条直线上|Python练习系列[13]
  4. 嵌入式linux段错误,在嵌入式Linux上使用C Std Lib时出现异常的段错误
  5. python 生成器_Python生成器中的GeneratorExit
  6. java实现删除指定指定目录下面指定某种类型的文件
  7. Git 工作区恢复暂存区操作总览
  8. Mybatis Generator 配置详解
  9. Oracle给表和字段添加注释
  10. SQL入门试炼创建表