Cloudbees: App Engine Deployment failing with GAE SDK v1.8

半城伤御伤魂 提交于 2019-12-12 06:23:31

问题


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?


回答1:


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:


来源:https://stackoverflow.com/questions/21792187/cloudbees-app-engine-deployment-failing-with-gae-sdk-v1-8

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!