栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 软件开发 > 后端开发 > Java

Jenkins执行shell命令,提示Pseudo-terminal will not be allocated because stdin is not a terminal.

Java 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

Jenkins执行shell命令,提示Pseudo-terminal will not be allocated because stdin is not a terminal.

我在使用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.*** << remotessh 
/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就可以啦

ssh root@*** << remotessh

这么操作以后,Jenkins就可以在被ssh连接的机器上运行shell命令啦

转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/979122.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号