Home > other >  Why don't I PHP application can start in cloudfoundry??
Why don't I PHP application can start in cloudfoundry??

Time:10-06

Hi,
I am a new contact cloudfoundry programmers, we use the
https://github.com/cloudfoundry/vcap of open source software installed a vcap environment, testing java_web application is now normal, but I ask your PHP applications is abnormal, can't start,
My PHP application is very simple, just echo a version number,

<? PHP echo 'version 1'; ?>


I try to push my PHP applications,
VMC push test3
Instances> 1

1: PHP
2: other
Framework> PHP

1: PHP
2: other
Runtime> PHP

1:64 m
2:128 m
3:256 m
4:512 m
5:1 g
The Memory Limit>
128 m
Creating test3... OK

1: test3. Vcap. Me
2: none
Domain> Test3. Vcap. Me

Updating test3... OK

The Create services for application?> N

Save the configuration?> N

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



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

I try to get to the log, found that also failed,

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


Sudo vi ~/. VMC/crash
/sudo password for sysroot:
The Time of the crash:
Fri Aug 16 09:39:59 + 0800 2013

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

<
REQUEST: GET http://api.vcap.me/apps/test3/instances/0/files/logs
REQUEST_HEADERS:
Authorization : bearer eyJhbGciOiJIUzI1NiJ9.eyJleHAiOjEzNzcwNTY2MjQsInVzZXJfbmFtZSI6ImNsb3VkQGNsb3VkLmNvbSIsInNjb3BlIjpbImNsb3VkX2NvbnRyb2xsZXIucmVhZCIsImNsb3VkX2NvbnRyb2xsZXIud3JpdGUiLCJvcGVuaWQiLCJwYXNzd29yZC53cml0ZSJdLCJlbWFpbCI6ImNsb3VkQGNsb3VkLmNvbSIsImF1ZCI6WyJvcGVuaWQiLCJjbG91ZF9jb250cm9sbGVyIiwicGFzc3dvcmQiXSwianRpIjoiNTJjMThkNDItZTZiMC00ZTQyLTlmZmItNmI2OGI4NzA1Yjc4IiwidXNlcl9pZCI6ImY3MmFjY2ZhLTJlYTgtNGQxZi04NTUxLWU0NjBiODY1MDFhMyIsImNsaWVudF9pZCI6InZtYyJ9.IGsxKC61CPuV7sv8w3nlAMoB2evP3N0w0GqjPQmqVTc
The Content - Length: 0
RESPONSE: [500]
RESPONSE_HEADERS:
Cache-control: no - cache
Connection: keep alive -
The 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" : "the Error retrieving the 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. The 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. The rb: 57: in ` show_instance_logs'
Interact - 0.5.2/lib/interact/progress. The rb: 98: in ` with_progress '
VMC - 0.5.0/lib/VMC/cli/app/logs. The rb: 56: in ` show_instance_logs'
VMC - 0.5.0/lib/VMC/cli/app/logs. The rb: 31: in ` logs'
VMC - 0.5.0/lib/VMC/spacing. The rb: 40: in ` spaced '
VMC - 0.5.0/lib/VMC/spacing. The rb: 38: ` in each '
VMC - 0.5.0/lib/VMC/spacing. The rb: 38: in ` spaced '
VMC - 0.5.0/lib/VMC/cli/app/logs. The rb: 30: in ` logs'
Mothership - 0.5.1/lib/mothership/base. The rb: 66: in ` send '
Mothership - 0.5.1/lib/mothership/base. The rb: 66: in ` run '
Mothership - 0.5.1/lib/mothership/command. The rb: 72: in ` invoke '
Manifests - VMC - plugin - 0.6.2/lib/manifests - VMC - the plugin/plugin. Rb: 40: in ` call '
Manifests - VMC - plugin - 0.6.2/lib/manifests - VMC - the plugin/plugin. Rb: 40: in ` wrap_with_optional_name '
Manifests - VMC - plugin - 0.6.2/lib/manifests - VMC - the plugin/plugin. Rb: 20
Mothership - 0.5.1/lib/mothership/command. The rb: 82: in ` instance_exec '
Mothership - 0.5.1/lib/mothership/command. The rb: 82: in ` invoke '
Mothership - 0.5.1/lib/mothership/command. The rb: 86: in ` instance_exec '
Mothership - 0.5.1/lib/mothership/command. The rb: 86: in ` invoke '
Mothership - 0.5.1/lib/mothership/base. The 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'


And I have had normal java_web application,
VMC apps
Getting applications... OK

Name the status the usage the runtime url
The test running 1 x 512 m Java test vcap. Me
Test3 0% 1 x 128 m PHP test3 vcap. Me



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

Reading logs/stderr. The log... OK
Aug 15, 2013 6:02:42 PM org. Apache. Coyote. Http11. Http11Protocol init
INFO: the Initializing Coyote to 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 the JAAS app name Catalina
Aug 15, 2013 6:02:42 PM org. Apache. Catalina. Core. StandardService start
INFO: Starting the service Catalina
nullnullnullnullnullnullnullnullnullnullnullnull
  • Related