问题描述
大家好,我是一个新接触cloudfoundry的程序员,我们用https://github.com/cloudfoundry/vcap的开源软件安装了个vcap环境,现在测试java_web应用已经正常了,可是我的php应用问是不正常。不能够启动。我的php应用非常简单,仅仅是echo出了一个版本号。<?phpecho'version1';?>我尝试push我的php应用。vmcpushtest3Instances>11:php2:otherFramework>php1:php2:otherRuntime>php1:64M2:128M3:256M4:512M5:1GMemoryLimit>128MCreatingtest3...OK1:test3.vcap.me2:noneDomain>test3.vcap.meUpdatingtest3...OKCreateservicesforapplication?>nSaveconfiguration?>nUploadingtest3...OKStartingtest3...OK0/1instances:1down0/1instances:1downApplicationfailedtostart.我尝试获取到日志,发现也失败了。vmclogstest3Gettinglogsfortest3#0...FAILEDCFoundry::AppFileError:306:Errorretrievingfile'logs'Formoreinformation,see~/.vmc/crashsudovi~/.vmc/crash[sudo]passwordforsysroot:Timeofcrash:FriAug1609:39:59+08002013CFoundry::AppFileError:306:Errorretrievingfile'logs'<<<REQUEST:GEThttp://api.vcap.me/apps/test3/instances/0/files/logsREQUEST_HEADERS:Authorization:bearereyJhbGciOiJIUzI1NiJ9.eyJleHAiOjEzNzcwNTY2MjQsInVzZXJfbmFtZSI6ImNsb3VkQGNsb3VkLmNvbSIsInNjb3BlIjpbImNsb3VkX2NvbnRyb2xsZXIucmVhZCIsImNsb3VkX2NvbnRyb2xsZXIud3JpdGUiLCJvcGVuaWQiLCJwYXNzd29yZC53cml0ZSJdLCJlbWFpbCI6ImNsb3VkQGNsb3VkLmNvbSIsImF1ZCI6WyJvcGVuaWQiLCJjbG91ZF9jb250cm9sbGVyIiwicGFzc3dvcmQiXSwianRpIjoiNTJjMThkNDItZTZiMC00ZTQyLTlmZmItNmI2OGI4NzA1Yjc4IiwidXNlcl9pZCI6ImY3MmFjY2ZhLTJlYTgtNGQxZi04NTUxLWU0NjBiODY1MDFhMyIsImNsaWVudF9pZCI6InZtYyJ9.IGsxKC61CPuV7sv8w3nlAMoB2evP3N0w0GqjPQmqVTcContent-Length:0RESPONSE:[500]RESPONSE_HEADERS:cache-control:no-cacheconnection:keep-alivecontent-type:application/json;charset=utf-8date:Fri,16Aug201301:39:59GMTkeep-alive:timeout=20server:nginxtransfer-encoding:chunkedx-ua-compatible:IE=Edge,chrome=1RESPONSE_BODY:{"code":306,"description":"Errorretrievingfile'logs'"}>>>cfoundry-0.5.2/lib/cfoundry/baseclient.rb:156:in`handle_error_response'cfoundry-0.5.2/lib/cfoundry/baseclient.rb:135:in`handle_response'cfoundry-0.5.2/lib/cfoundry/baseclient.rb:85:in`request'cfoundry-0.5.2/lib/cfoundry/baseclient.rb:62:in`get'cfoundry-0.5.2/lib/cfoundry/v1/base.rb:40:in`files'cfoundry-0.5.2/lib/cfoundry/v1/app.rb:353:in`files'vmc-0.5.0/lib/vmc/cli/app/logs.rb:57:in`show_instance_logs'interact-0.5.2/lib/interact/progress.rb:98:in`with_progress'vmc-0.5.0/lib/vmc/cli/app/logs.rb:56:in`show_instance_logs'vmc-0.5.0/lib/vmc/cli/app/logs.rb:31:in`logs'vmc-0.5.0/lib/vmc/spacing.rb:40:in`spaced'vmc-0.5.0/lib/vmc/spacing.rb:38:in`each'vmc-0.5.0/lib/vmc/spacing.rb:38:in`spaced'vmc-0.5.0/lib/vmc/cli/app/logs.rb:30:in`logs'mothership-0.5.1/lib/mothership/base.rb:66:in`send'mothership-0.5.1/lib/mothership/base.rb:66:in`run'mothership-0.5.1/lib/mothership/command.rb:72:in`invoke'manifests-vmc-plugin-0.6.2/lib/manifests-vmc-plugin/plugin.rb:40:in`call'manifests-vmc-plugin-0.6.2/lib/manifests-vmc-plugin/plugin.rb:40:in`wrap_with_optional_name'manifests-vmc-plugin-0.6.2/lib/manifests-vmc-plugin/plugin.rb:20mothership-0.5.1/lib/mothership/command.rb:82:in`instance_exec'mothership-0.5.1/lib/mothership/command.rb:82:in`invoke'mothership-0.5.1/lib/mothership/command.rb:86:in`instance_exec'mothership-0.5.1/lib/mothership/command.rb:86:in`invoke'mothership-0.5.1/lib/mothership/base.rb:55:in`execute'vmc-0.5.0/lib/vmc/cli.rb:150:in`execute'vmc-0.5.0/lib/vmc/cli.rb:161:in`save_token_if_it_changes'而我的java_web应用一切正常。vmcappsGettingapplications...OKnamestatususageruntimeurltestrunning1x512Mjavatest.vcap.metest30%1x128Mphptest3.vcap.mevmclogstestGettinglogsfortest#0...OKReadinglogs/stderr.log...OKAug15,20136:02:42PMorg.apache.coyote.http11.Http11ProtocolinitINFO:InitializingCoyoteHTTP/1.1onhttp-52370Aug15,20136:02:42PMorg.apache.catalina.startup.CatalinaloadINFO:Initializationprocessedin419msAug15,20136:02:42PMorg.apache.catalina.realm.JAASRealmsetContainerINFO:SetJAASappnameCatalinaAug15,20136:02:42PMorg.apache.catalina.core.StandardServicestartINFO:StartingserviceCatalinaAug15,20136:02:42PMorg.apache.catalina.core.StandardEnginestartINFO:StartingServletEngine:ApacheTomcat/6.0.35Aug15,20136:02:42PMorg.apache.catalina.startup.HostConfigdeployDirectoryINFO:DeployingwebapplicationdirectoryROOTAug15,20136:02:42PMorg.apache.coyote.http11.Http11ProtocolstartINFO:StartingCoyoteHTTP/1.1onhttp-52370Aug15,20136:02:42PMorg.apache.catalina.startup.CatalinastartINFO:Serverstartupin201msReadinglogs/stdout.log...OK