最近部署新项目时遇到一个问题,就是在编写完项目的启动脚本后,项目打包,启动都能正常启动,但是在jekin的启动的控制台输入一直报个错误,就是下面这行错误:
ERROR: Exception when publishing, exception message [Exec timed out or was interrupted after 12,000 ms]
Build step 'Send files or execute commands over SSH' changed build result to UNSTABLE
Finished: UNSTABLE
项目都能正常的访问了,为什么jekins还来个警告呢,搜了下这个问题,有些人说是因为磁盘的内存原因,jekins发出的警告,所以去看了下内存,完全没有问题啊,结果看到这篇文章
jenkins执行脚本不退出
Since you are executing a script from a non-TTY environment; The Jenkins is not able to get the exit properly, out of your script.
意思是:因为你是从一个非tty环境执行脚本;Jenkins不能正常从你的脚本中退出。
所以就去勾选了Exec in pty,然后就去构建项目,jekins,启动没有问题了,但是项目还是没有起来,然后我又自闭了。
最后看到博客中的这句话,抱着试试的态度,然后加上了,然后启动起来了,项目正常访问,jekins显示正常了
外国网友后面还加了sleep 1:`nohup sh ggf10service.sh & sleep 1`,
最后感谢博主@山鬼谣me