An error occurred: Cannot write to '/opt/apache-jmeter-5.2.1/bin/jmeterRes/Report1' as folder is not

问题描述:构建Jenkins时报如下错误:

Started by user admin
Running as SYSTEM
Building in workspace /root/.jenkins/workspace/Jenkins调Jmeter(Jenkins可查看报告)
[Jenkins调Jmeter(Jenkins可查看报告)] $ /bin/sh -xe /tmp/jenkins3590030547148852689.sh
+ cd /opt/apache-jmeter-5.2.1/bin
+ ./jmeter.sh -n -t /opt/apache-jmeter-5.2.1/bin/jmeterRes/getBaiDu.jmx -l baidu1.jtl -e -o /opt/apache-jmeter-5.2.1/bin/jmeterRes/Report1
An error occurred: Cannot write to '/opt/apache-jmeter-5.2.1/bin/jmeterRes/Report1' as folder is not empty
Build step 'Execute shell' marked build as failure
[htmlpublisher] Archiving HTML reports...
[htmlpublisher] Archiving at PROJECT level /opt/apache-jmeter-5.2.1/ant_demo/resultLog/html to /root/.jenkins/jobs/Jenkins调Jmeter(Jenkins可查看报告)/htmlreports/HTML_20Report
Finished: FAILURE

原因:这是Jenkins的一个bug,查看build的配置参数${BUILD_NUMBER} 没有生效,之前构建生成有.jtl文件,导致再次构建报文件已存在

解决办法:将/opt/apache-jmeter-5.2.1/bin目录下的.jtl文件全部删掉,再次构建,发现构建成功

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值