[ERROR] Result: { execute timeout }异常解决

简介: 记一次AlibabaCloudToolKit插件使用过程中云助手执行脚本时,脚本超时的异常的解决方案.

阿里云ToolKit插件使用异常记录

ToolKit插件配置如下

AlibabaCloudToolKitConfig

RUN运行返回异常结果:

[ERROR] Target Deploy ECS: { 172.18.*.* / 47.107.*.* }
[ERROR] Command: { sh /home/service.sh service-* }
[ERROR] Result: { execute timeout }
[ERROR] Finished at: null

根据插件返回的异常内容分析得知是我们的service.sh脚本执行超时。

脚本内容如下
AlibabaCloudToolKit_

经检查脚本内并无可能造成死循环的可能。

服务器本地手动运行脚本测试如下

AlibabaCloudToolKit_

脚本运行正常,服务正常启动。
但是脚本返回结果时输出了nohup: redirecting stderr to stdout后并未直接退至新的命令行。由此我们怀疑是nohub命令执行的问题,那么我们修改nohub命令进行尝试。

原命令

nohup java -jar service.jar >service.log  &

修改后

nohup java -jar service.jar >service.log  2>&1 &

再次运行AlibabCloudToolKit插件

AlibabaCloudToolKit_

至此问题解决/::D

目录
相关文章
|
10月前
|
Web App开发 前端开发
【前端异常】Unchecked runtime.lastError: Could not establish connection. Receiving end does not exist.
【前端异常】Unchecked runtime.lastError: Could not establish connection. Receiving end does not exist.
578 0
|
9月前
Failed to execute script ‘xxx‘ due to unhandled exception:No module named ‘ctypes‘
Failed to execute script ‘xxx‘ due to unhandled exception:No module named ‘ctypes‘
292 0
|
XML SQL 数据库
Error getting generated key or setting result to parameter object.必须执行该语句才能获得结果。
Error getting generated key or setting result to parameter object.必须执行该语句才能获得结果。
2622 47
|
10月前
|
XML 关系型数据库 MySQL
【MySQL异常】ExecutorException: Error getting generated key or setting result to parameter object
【MySQL异常】ExecutorException: Error getting generated key or setting result to parameter object
266 0
|
3月前
|
druid Java
Error attempting to get column ‘createTime‘ from result set的异常
Error attempting to get column ‘createTime‘ from result set的异常
232 0
Java.sql.SQLException: Illegal operation on empty result set.
Java.sql.SQLException: Illegal operation on empty result set.
192 0
|
SQL 关系型数据库 MySQL
MySQL - Expected one result (or null) to be returned by selectOne(), but found: 2
MySQL - Expected one result (or null) to be returned by selectOne(), but found: 2
558 0
|
SQL 关系型数据库 MySQL
Dolphinscheduler执行MySQL任务时报错execute sql error java.lang.RuntimeException: send mail failed!
Dolphinscheduler执行MySQL任务时报错execute sql error java.lang.RuntimeException: send mail failed!
Dolphinscheduler执行MySQL任务时报错execute sql error java.lang.RuntimeException: send mail failed!
|
Java Apache
log4j:ERROR setFile(null,true) call failed.
log4j:ERROR setFile(null,true) call failed.java.io.FileNotFoundException: /opt/logs/log.log (没有那个文件或目录) at java.
3315 0