Cloudfoundry sercices 2014-9-24
可以看到上传broker以后在集群中正常运行
name requested state instances memory disk urls
PDTC started 2/2 1G 1G pdtc.henan.test
service-broker started 1/1 256M 1G service-broker.henan.test
logservicebroker started 1/1 1G 1G logservicebroker.henan.test
t3 started 2/2 1G 1G t3.henan.test
root@wo:~# cf create-service-brokerlog-sev-broker sb 123456 http://logservicebroker.henan.test
Creating service broker log-sev-broker asadmin...
FAILED
Server error, status code: 500, error code:10001, message: The service broker API could not be reached: http://logservicebroker.henan.test/v2/catalog
但是在进行broker注册的时候,返回The service broker API couldnot be reached的错误
然后试着curl这个应用看是不是broker这个app有问题
curl logservicebroker.henan.test
<html><head><title>ApacheTomcat/7.0.55 - Error report</title><style><!--H1{font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:22px;}H2 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:16px;}H3{font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:14px;}BODY {font-family:Tahoma,Arial,sans-serif;color:black;background-color:white;}B {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;} P{font-family:Tahoma,Arial,sans-serif;background:white;color:black;font-size:12px;}A{color : black;}A.name {color : black;}HR {color :#525D76;}--></style> </head><body><h1>HTTP Status404 - </h1><HR size="1"noshade="noshade"><p><b>type</b> Statusreport</p><p><b>message</b><u></u></p><p><b>description</b><u>The requested resource is not available.</u></p><HRsize="1" noshade="noshade"><h3>ApacheTomcat/7.0.55</h3></body></html>
返回正常的结果,排除app的问题
接着换一个pass集群,在自己搭建的api.ye.test集群中试验,发现可以正常使用
cf curl /v2/service_plans -X 'GET'
{
"total_results": 2,
"total_pages": 1,
"prev_url": null,
"next_url": null,
"resources": [
{
"metadata": {
"guid": "6d0e980c-64d3-444c-8ee8-ebd9ebb3fbca",
"url": "/v2/service_plans/6d0e980c-64d3-444c-8ee8-ebd9ebb3fbca",
"created_at": "2014-09-24T08:12:14+00:00",
"updated_at": "2014-09-24T08:36:18+00:00"
},
"entity": {
"name": "LogServerPlan",
"free": true,
"description": "This is a default log collecter serverplan. All services are createdequally.",
"service_guid":"e962c32e-040c-4b31-bad1-1ab3f7345bf4",
"extra": "{}",
"unique_id": "logserver-plan",
"public": true,
"service_url": "/v2/services/e962c32e-040c-4b31-bad1-1ab3f7345bf4",
"service_instances_url":"/v2/service_plans/6d0e980c-64d3-444c-8ee8-ebd9ebb3fbca/service_instances"
}
},
{
"metadata": {
"guid": "c9a675f4-c405-4664-9b39-f29649135813",
"url":"/v2/service_plans/c9a675f4-c405-4664-9b39-f29649135813",
"created_at": "2014-09-24T08:12:14+00:00",
"updated_at": null
},
"entity": {
"name": "LogServerPlan2",
"free": true,
"description": "This is a another log collecter serverplan.",
"service_guid":"e962c32e-040c-4b31-bad1-1ab3f7345bf4",
"extra": "{\"displayName\":\"Veryfunny!\"}",
"unique_id": "logserver-plan2",
"public": false,
"service_url":"/v2/services/e962c32e-040c-4b31-bad1-1ab3f7345bf4",
"service_instances_url":"/v2/service_plans/c9a675f4-c405-4664-9b39-f29649135813/service_instances"
}
}
]
}
cf m
Getting services from marketplace in org sun/ space test as admin...
OK
service plans description
LogServer LogServerPlan LogServerInstances
进而得出结论其中The service broker API couldnot be reached 集群的某个组件除了问题。