我在使用Jenkins远程执行Jmeter脚本的时候,报了这么一个错误
首先看看我的脚本
ssh root@10.***(手动打码) nohup nmon -f -m /jmeter/equ_8_shanyan/s3/down -c 320 -s 2 > a.log 2>&1 &
ssh root@10.***
/opt/jmeter/apache-jmeter-5.4.3/bin/jmeter -n -t /jmeter/script/equ_8_shanyan/double/down_s3.jmx -Jthread.downnum=23 -Jloop.num=1200000 -Jdura.num=600 -l /jmeter/report/equ_8_shanyan/s3/down_report/180/180down.jtl -e -o /jmeter/report/equ_8_shanyan/s3/down_report/180/ >> /jmeter/report/equ_8_shanyan/s3/down_report/log/180down.log
开始构建后报了个错误
Started by user admin
Running as SYSTEM
Building on master in workspace /root/.jenkins/workspace/s3_up_30
[s3_up_30] $ /bin/sh -xe /opt/app/jenkins/temp/jenkins2406914613948759500.sh
/opt/app/jenkins/temp/jenkins2406914613948759500.sh: line 4: warning: here-document at line 3 delimited by end-of-file (wanted `remotessh')
+ ssh root@10.***(手动打码)
+ ssh root@10.*** nohup nmon -f -m /jmeter/equ_8_shanyan/s3/up -c 320 -s 2
Pseudo-terminal will not be allocated because stdin is not a terminal.
Warning: Nashorn engine is planned to be removed from a future JDK release
上面这是提示的错误,我们可以看到 Pseudo-terminal will not be allocated because stdin is not a terminal.
其实他的意思就是说想要在被Jenkins所ssh链接的地址上进行操作,我们只需要按照第四行提示的 /opt/app/jenkins/temp/jenkins4288957416165822375.sh: line 4: warning: here-document at line 3 delimited by end-of-file (wanted `remotessh')在ssh root@***后边加一个 << remotessh就可以啦文章来源:https://www.toymoban.com/news/detail-507146.html
ssh root@*** << remotessh
这么操作以后,Jenkins就可以在被ssh连接的机器上运行shell命令啦文章来源地址https://www.toymoban.com/news/detail-507146.html
到了这里,关于Jenkins执行shell命令,提示Pseudo-terminal will not be allocated because stdin is not a terminal.的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!