Cloudbees:App Engine部署因GAE SDK v1.8失败 [英] Cloudbees: App Engine Deployment failing with GAE SDK v1.8

查看:142
本文介绍了Cloudbees:App Engine部署因GAE SDK v1.8失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用GAE SDK 1.8从Cloudbees DEV @ cloud Jenkins实例部署到GAE时,出现以下错误:

  [ cloudbees-deployer]作为stuart.langridge@PROJECTNAME.com部署到Google App Engine 
[cloudbees-deployer]部署PROJECTNAME
[cloudbees-deployer]从workspace解析为/ scratch / jenkins / workspace / PROJECTNAME / PROJECTNAME
[PROJECTNAME] $ /scratch/hudson/pythons/python-2.7.2/bin/python /opt/google/gae_python_sdk/1.8.latest/appcfg.py --no_cookies --email = stuart.langridge @ PROJECTNAME.com --oauth2 --noauth_local_webserver ******** --skip_sdk_update_check -A PROJECTNAME -V beta更新/ scratch / jenkins / workspace / PROJECTNAME / PROJECTNAME
com.cloudbees.plugins.deployer.exceptions .DeployException:远程文件操作失败:/ scratch / jenkins / workspace / PROJECTNAME / PROJECTNAME at hudson.remoting.Channel@25891d0a:fb8fa364
at com.cloudbees.plugins.deployer.engines.Engine.process(Engine.java :166)
在com.cloudbees .plugins.deployer.engines.Engine.perform(Engine.java:100)
at com.cloudbees.plugins.deployer.DeployBuilder.perform(DeployBuilder.java:85)
at hudson.tasks.BuildStepMonitor (BuildStepMonitor.java:20)
at hudson.model.AbstractBuild $ AbstractBuildExecution.perform(AbstractBuild.java:791)
at hudson.model.Build $ BuildExecution.build(Build.java: 199)
at hudson.model.Build $ BuildExecution.doRun(Build.java:160)
at hudson.model.AbstractBuild $ AbstractBuildExecution.run(AbstractBuild.java:572)
at hudson .model.Run.execute(Run.java:1665)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
at hudson.model.ResourceController.execute(ResourceController.java:88 )
at hudson.model.Executor.run(Executor.java:246)
原因:hudson.util.IOException2:远程文件操作失败:/ scratch / jenkins / workspace / PROJECTNAME / PROJECTNAME at hudson .remoting.Channel @ 25891d0a:fb8fa364
at hudson.FilePath.act (FilePath.java:912)
at hudson.FilePath.act(FilePath.java:889)
at com.cloudbees.plugins.deployer.engines.Engine.process(Engine.java:160)
... 11 more
导致:java.io.IOException:无法运行程序/scratch/hudson/pythons/python-2.7.2/bin/python(在目录/ scratch / jenkins / workspace / PROJECTNAME):error = 2,No such file or directory
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1041)
at hudson.Proc $ LocalProc。< init> (Proc.java:244)
在hudson.Proc $ LocalProc。< init>(Proc.java:216)
在hudson.Launcher $ LocalLauncher.launch(Launcher.java:773)
at hudson.Launcher $ ProcStarter.start(Launcher.java:353)
at hudson.Launcher $ ProcStarter.join(Launcher.java:360)
at com.cloudbees.plugins.deployer.impl .google.PythonEngineImpl $ DeployActorImpl.invoke(PythonEngineImpl.java:333)
at com.cloudbees.plugins.deployer.impl.google.PythonEngineImpl $ DeployActorImpl.invoke(PythonEngineImpl.jav a:130)
at com.cloudbees.plugins.deployer.engines.Engine $ FingerprintingWrapper.invoke(Engine.java:252)
at com.cloudbees.plugins.deployer.engines.Engine $ FingerprintingWrapper。在hudson.FilePath中调用(Engine.java:240)
$ FileCallableWrapper.call(FilePath.java:2444)$ h $ $ $ $ $ $ $ $ $ $ $ $ $
在hudson.remoting.UserRequest.perform(UserRequest.java:48)
at hudson.remoting.Request $ 2.run(Request.java:326)
at hudson.remoting.InterceptingExecutorService $ 1.call(InterceptingExecutorService .java:72)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
在java.util.concurrent.ThreadPoolExecutor $ Worker.run(ThreadPoolExecutor.java:615)$ b $在java.lang.Thread.run(Thread.java:744)
导致:java.io. IOException:错误= 2,没有这样的文件或目录
在java.lang.UNIXProcess.fork < init>(UNIXProcess.java:135)
在java.lang.ProcessImpl.start(ProcessImpl.java:130)
在java.lang.UNIXProcess。在java.lang.ProcessBuilder.start(ProcessBuilder.java:1022)
... 18 more
构建步骤'Deploy applications'marked build as failure

支持App Engine SDK 1.8(v 1.7不是,根据 Cloudbees:App Engine部署失败),但是这个错误似乎是因为部署者找不到Python。我的配置设置为 default ;只有两个选项: default Python 2.7.2 ,并且在任一设置下都会出现同样的错误。 / p>

相关行似乎为:

无法运行程序/ scratch / hudson / pythons / python-2.7.2 / bin / python(在目录/ scratch / jenkins / workspace / PROJECTNAME中):error = 2,没有这样的文件或目录

据我所知,这不是我能影响的东西吗?



您可以尝试此作为临时解决方法,在构建步骤中添加一个shell脚本

  curl -s -o use-python https://repository-cloudbees.forge.cloudbees.com/distributions/ci-addons/python/use-python 
PYTHON_VERSION = 2.7.2。 ./use-python

rm -rf /scratch/hudson/pythons/python-2.7.2
mkdir -p /scratch/hudson/pythons/python-2.7.2

ln -s /scratch/jenkins/python/python-2.7.2-x86_64/* /scratch/hudson/pythons/python-2.7.2:


When deploying to GAE from Cloudbees DEV@cloud Jenkins instances using GAE SDK 1.8, I get the following error:

[cloudbees-deployer] Deploying as stuart.langridge@PROJECTNAME.com to Google App Engine
[cloudbees-deployer] Deploying PROJECTNAME
[cloudbees-deployer]   Resolved from workspace as /scratch/jenkins/workspace/PROJECTNAME/PROJECTNAME
[PROJECTNAME] $ /scratch/hudson/pythons/python-2.7.2/bin/python /opt/google/gae_python_sdk/1.8.latest/appcfg.py --no_cookies --email=stuart.langridge@PROJECTNAME.com --oauth2 --noauth_local_webserver ******** --skip_sdk_update_check -A PROJECTNAME -V beta update /scratch/jenkins/workspace/PROJECTNAME/PROJECTNAME
com.cloudbees.plugins.deployer.exceptions.DeployException: remote file operation failed: /scratch/jenkins/workspace/PROJECTNAME/PROJECTNAME at hudson.remoting.Channel@25891d0a:fb8fa364
    at com.cloudbees.plugins.deployer.engines.Engine.process(Engine.java:166)
    at com.cloudbees.plugins.deployer.engines.Engine.perform(Engine.java:100)
    at com.cloudbees.plugins.deployer.DeployBuilder.perform(DeployBuilder.java:85)
    at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
    at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:791)
    at hudson.model.Build$BuildExecution.build(Build.java:199)
    at hudson.model.Build$BuildExecution.doRun(Build.java:160)
    at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:572)
    at hudson.model.Run.execute(Run.java:1665)
    at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
    at hudson.model.ResourceController.execute(ResourceController.java:88)
    at hudson.model.Executor.run(Executor.java:246)
Caused by: hudson.util.IOException2: remote file operation failed: /scratch/jenkins/workspace/PROJECTNAME/PROJECTNAME at hudson.remoting.Channel@25891d0a:fb8fa364
    at hudson.FilePath.act(FilePath.java:912)
    at hudson.FilePath.act(FilePath.java:889)
    at com.cloudbees.plugins.deployer.engines.Engine.process(Engine.java:160)
    ... 11 more
Caused by: java.io.IOException: Cannot run program "/scratch/hudson/pythons/python-2.7.2/bin/python" (in directory "/scratch/jenkins/workspace/PROJECTNAME"): error=2, No such file or directory
    at java.lang.ProcessBuilder.start(ProcessBuilder.java:1041)
    at hudson.Proc$LocalProc.<init>(Proc.java:244)
    at hudson.Proc$LocalProc.<init>(Proc.java:216)
    at hudson.Launcher$LocalLauncher.launch(Launcher.java:773)
    at hudson.Launcher$ProcStarter.start(Launcher.java:353)
    at hudson.Launcher$ProcStarter.join(Launcher.java:360)
    at com.cloudbees.plugins.deployer.impl.google.PythonEngineImpl$DeployActorImpl.invoke(PythonEngineImpl.java:333)
    at com.cloudbees.plugins.deployer.impl.google.PythonEngineImpl$DeployActorImpl.invoke(PythonEngineImpl.java:130)
    at com.cloudbees.plugins.deployer.engines.Engine$FingerprintingWrapper.invoke(Engine.java:252)
    at com.cloudbees.plugins.deployer.engines.Engine$FingerprintingWrapper.invoke(Engine.java:240)
    at hudson.FilePath$FileCallableWrapper.call(FilePath.java:2444)
    at hudson.remoting.UserRequest.perform(UserRequest.java:118)
    at hudson.remoting.UserRequest.perform(UserRequest.java:48)
    at hudson.remoting.Request$2.run(Request.java:326)
    at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72)
    at java.util.concurrent.FutureTask.run(FutureTask.java:262)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    at java.lang.Thread.run(Thread.java:744)
Caused by: java.io.IOException: error=2, No such file or directory
    at java.lang.UNIXProcess.forkAndExec(Native Method)
    at java.lang.UNIXProcess.<init>(UNIXProcess.java:135)
    at java.lang.ProcessImpl.start(ProcessImpl.java:130)
    at java.lang.ProcessBuilder.start(ProcessBuilder.java:1022)
    ... 18 more
Build step 'Deploy applications' marked build as failure

App Engine SDK 1.8 is supported (v 1.7 is not, as per Cloudbees: App Engine Deployment failing), but this error seems to be because the deployer can't find Python. I have my configuration set to default; there are only two options, default and Python 2.7.2, and I get the same failure with either setting.

The relevant line seems to be:

Cannot run program "/scratch/hudson/pythons/python-2.7.2/bin/python" (in directory "/scratch/jenkins/workspace/PROJECTNAME"): error=2, No such file or directory

which is, as far as I can tell, not something that I can affect?

解决方案

There is a problem with pluralisation.

You can try this as temporary workaround adding a shell script in the build steps

curl -s -o use-python https://repository-cloudbees.forge.cloudbees.com/distributions/ci-addons/python/use-python
PYTHON_VERSION=2.7.2 . ./use-python

rm -rf /scratch/hudson/pythons/python-2.7.2
mkdir -p /scratch/hudson/pythons/python-2.7.2

ln -s  /scratch/jenkins/python/python-2.7.2-x86_64/* /scratch/hudson/pythons/python-2.7.2:

这篇关于Cloudbees:App Engine部署因GAE SDK v1.8失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆