我的php程序为什么不能够在cloudfoundry中启动??

wangqingming1989 2013-08-16 09:49:54
大家好,
我是一个新接触cloudfoundry的程序员,我们用
https://github.com/cloudfoundry/vcap 的开源软件 安装了个vcap 环境,现在测试java_web应用已经正常了,可是我的php应用问是不正常。不能够启动。
我的php应用非常简单,仅仅是echo 出了一个版本号。

<?php echo 'version 1'; ?>


我尝试push 我的php 应用。
vmc push test3
Instances> 1

1: php
2: other
Framework> php

1: php
2: other
Runtime> php

1: 64M
2: 128M
3: 256M
4: 512M
5: 1G
Memory Limit> 128M

Creating test3... OK

1: test3.vcap.me
2: none
Domain> test3.vcap.me

Updating test3... OK

Create services for application?> n

Save configuration?> n

Uploading test3... OK
Starting test3... OK



0/1 instances: 1 down
0/1 instances: 1 down
Application failed to start.

我尝试获取到日志,发现也失败了。

vmc logs test3
Getting logs for test3 #0... FAILED
CFoundry::AppFileError: 306: Error retrieving file 'logs'
For more information, see ~/.vmc/crash


sudo vi ~/.vmc/crash
[sudo] password for sysroot:
Time of crash:
Fri Aug 16 09:39:59 +0800 2013

CFoundry::AppFileError: 306: Error retrieving file 'logs'

<<<
REQUEST: GET http://api.vcap.me/apps/test3/instances/0/files/logs
REQUEST_HEADERS:
Authorization : bearer eyJhbGciOiJIUzI1NiJ9.eyJleHAiOjEzNzcwNTY2MjQsInVzZXJfbmFtZSI6ImNsb3VkQGNsb3VkLmNvbSIsInNjb3BlIjpbImNsb3VkX2NvbnRyb2xsZXIucmVhZCIsImNsb3VkX2NvbnRyb2xsZXIud3JpdGUiLCJvcGVuaWQiLCJwYXNzd29yZC53cml0ZSJdLCJlbWFpbCI6ImNsb3VkQGNsb3VkLmNvbSIsImF1ZCI6WyJvcGVuaWQiLCJjbG91ZF9jb250cm9sbGVyIiwicGFzc3dvcmQiXSwianRpIjoiNTJjMThkNDItZTZiMC00ZTQyLTlmZmItNmI2OGI4NzA1Yjc4IiwidXNlcl9pZCI6ImY3MmFjY2ZhLTJlYTgtNGQxZi04NTUxLWU0NjBiODY1MDFhMyIsImNsaWVudF9pZCI6InZtYyJ9.IGsxKC61CPuV7sv8w3nlAMoB2evP3N0w0GqjPQmqVTc
Content-Length : 0
RESPONSE: [500]
RESPONSE_HEADERS:
cache-control : no-cache
connection : keep-alive
content-type : application/json; charset=utf-8
date : Fri, 16 Aug 2013 01:39:59 GMT
keep-alive : timeout=20
server : nginx
transfer-encoding : chunked
x-ua-compatible : IE=Edge,chrome=1
RESPONSE_BODY:
{
"code": 306,
"description": "Error retrieving file '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:20
mothership-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应用一切正常。
vmc apps
Getting applications... OK

name status usage runtime url
test running 1 x 512M java test.vcap.me
test3 0% 1 x 128M php test3.vcap.me



vmc logs test
Getting logs for test #0... OK

Reading logs/stderr.log... OK
Aug 15, 2013 6:02:42 PM org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on http-52370
Aug 15, 2013 6:02:42 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 419 ms
Aug 15, 2013 6:02:42 PM org.apache.catalina.realm.JAASRealm setContainer
INFO: Set JAAS app name Catalina
Aug 15, 2013 6:02:42 PM org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
Aug 15, 2013 6:02:42 PM org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/6.0.35
Aug 15, 2013 6:02:42 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory ROOT
Aug 15, 2013 6:02:42 PM org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on http-52370
Aug 15, 2013 6:02:42 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 201 ms



Reading logs/stdout.log... OK
...全文
2563 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复

547

社区成员

发帖
与我相关
我的任务
社区描述
Cloud Foundry是业界第一个开源PaaS云平台,它支持多种框架、语言、运行时环境、云平台及应用服务,使开发人员能够在几秒钟内进行应用程序的部署和扩展,无需担心任何基础架构的问题。
社区管理员
  • Cloud Foundry社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧