Jenkins问题集

 

 

Error1: Hostname error

Nov 03, 2016 11:19:15 AMjavax.jmdns.impl.HostInfo newHostInfo

WARNING: Could not intialize the hostnetwork interface on nullbecause of an error:test212vm22:test212vm22

java.net.UnknownHostException: test212vm22:test212vm22

       at java.net.InetAddress.getLocalHost(InetAddress.java:1473)

       at javax.jmdns.impl.HostInfo.newHostInfo(HostInfo.java:75)

       at javax.jmdns.impl.JmDNSImpl.<init>(JmDNSImpl.java:407)

       at javax.jmdns.JmDNS.create(JmDNS.java:60)

       at hudson.DNSMultiCast$1.call(DNSMultiCast.java:32)

       atjenkins.util.ContextResettingExecutorService$2.call(ContextResettingExecutorService.java:46)

       at java.util.concurrent.FutureTask.run(FutureTask.java:262)

       atjava.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)

       atjava.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)

       at java.lang.Thread.run(Thread.java:744)

Caused by: java.net.UnknownHostException:test212vm22

       at java.net.Inet4AddressImpl.lookupAllHostAddr(Native Method)

       at java.net.InetAddress$1.lookupAllHostAddr(InetAddress.java:901)

       at java.net.InetAddress.getAddressesFromNameService(InetAddress.java:1293)

       at java.net.InetAddress.getLocalHost(InetAddress.java:1469)

       ... 9 more

 

Nov 03, 2016 11:19:20 AMhudson.model.UpdateSite updateData

 

solution:

在/etc/hosts文件中添加test212vm22

 

Error2: email send error

Sending email for trigger: Always

Sending email to: zengliang@xunlei.com

Error sending to the following INVALIDaddresses: zengliang@xunlei.com

 

solution:

系统设置-> Extended E-mail Notification -> 高级 -> UseSMTP Authentication中添加邮件及其密码

 

 

Error3: browser can’t open published html report

 

Opening Robot Framework report failed

 

Verify that you have JavaScript enabled inyour browser.

Make sure you are using a modern enoughbrowser. Firefox 3.5, IE 8, or equivalent is required, newer browsers arerecommended.

Check are there messages in your browser'sJavaScript error log. Please report the problem if you suspect you haveencountered a bug.

 

solution:

 java-Dhudson.model.DirectoryBrowserSupport.CSP= -jar jenkins.war

 

 

Error4:ssh-credentials plugin doesn’t work in source code management plugin

配置项目时,设置“源码管理"时,设置完”   Repository URL“之后,发现”Credentials“无法选择,下拉菜单无响应

 

solution:

git plugin版本为3.0.0版本,依赖的ssh-credentials(version:1.12) ,而Jenkins1.651.3版本默认的ssh-credentials插件版本较低,下载最新ssh-credentials版本,并安装

 

 

Error5:install plugin failed

手动安装插件时,出现如下错误

Solution:

尝试手动解压hpi插件,如果失败,说明hpi文件异常,需重新下载再安装

 

Error5:Submit code to Gitlab, but doesn’t trigger to build

Solution:

除了在git plugin中配置触发器,还需做如下动作:

1.      安装Gitlab Hook Plugin

2.      在Gitlab上配置web hook (Project –> Settings --> WebHooks), webhook格式如下:

http://your-jenkins-server/git/notifyCommit?url=<URLof the Git repositoryfor the Gitlabproject>

例如:

http://10.10.50.122:8080/git/notifyCommit?url=git@wx-gitlab.xunlei.cn:autotest/autotest.git

3.      还需打开如下Poll SCM配置,但不需填写任何内容

 

 

Error6: Jenkins kill spawned process

在Jenkins中使用脚本启动OSS,发现过很短时间,所有的worker都已停止,研究了一下发现,jenkins会杀死脚本的衍生进程。

Solution:

在脚本前面添加上BUILD_ID=XXXXX,即可如下:

BUILD_ID=demo

...

 

sleep 3

processCnt=$(ps -ef|grep /bin/oss_ |grep -v grep |wc -l)

echo $processCnt

if [ $processCnt -ne 16 ]; then

   exit -1

else

   exit 0

fi

 

 

Error7: any commad in shell failed, the script failed

例如:grep失败了,整个脚本就失败了,根本无法运行到if语句,很坑爹

       pkgmd5=$(md5sum -b $pkg|awk '{print $1}')$pkg

       isEmpty=$(grep "$pkgmd5" at_done.txt)

       if [ -n “isEmpty” ] ; then

           echo $pkgmd5 >> donepkg.txt

       else

           latestPkg=$pkg

       fi

 

Solution

       pkgmd5=$(md5sum -b $pkg|awk '{print $1}')$pkg

       #isEmpty=$(grep "$pkgmd5" at_done.txt)

       if grep "$pkgmd5" at_done.txt; then

           echo $pkgmd5 >> donepkg.txt

       else

           latestPkg=$pkg

       fi

 

 

Error8: git clone timeout after 10 minutes

Solution

“源码管理” –> “git”  –> “Add”  –>  “Advanced clone behaviours”

 

Error9: Opening Robot Framework Report Failed

http://blog.csdn.net/huashao0602/article/details/53925492

nohup java -Dhudson.model.DirectoryBrowserSupport.CSP= -jar jenkins.war &


  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值