Having issues getting to the recent logs of an application. CF_TRACE=true does not provide an helpful information.
I have no issues with
This seems to be tailing the logs fine but when i try to access recent logs it errors out.
$ cf logs fb-user --recent
Connected, dumping recent logs for app fb-user in org social / space dev as <user>...
FAILED
websocket: bad handshake
I enabled cf trace. But it does not provide very helpful information either:
$ CF_TRACE=true cf logs fb-user --recent
VERSION:
6.1.0-homebrew
REQUEST: [2014-10-21T15:47:00-04:00]
GET /v2/spaces/635b4998-59ae-4982-b51e-e844335fb447/apps?q=name%3Afb-user&inline-relations-depth=1 HTTP/1.1
Host: api.cf.<domain>.com
Accept: application/json
Authorization: [PRIVATE DATA HIDDEN]
Content-Type: application/json
User-Agent: go-cli 6.1.0-homebrew / darwin
RESPONSE: [2014-10-21T15:47:00-04:00]
HTTP/1.1 200 OK
Content-Length: 4865
Connection: keep-alive
Content-Type: application/json;charset=utf-8
Date: Tue, 21 Oct 2014 19:47:01 GMT
Server: nginx
X-Cf-Requestid: 1722b733-6943-4397-58aa-0e4b7e7c222e
X-Content-Type-Options: nosniff
X-Vcap-Request-Id: 51e33e6a-a7fe-488a-5fb0-6a16bceb219e::b123458d-5111-43f7-8c37-e6063bc8da83
{
"total_results": 1,
"total_pages": 1,
"prev_url": null,
"next_url": null,
"resources": [
{
"metadata": {
"guid": "9906bdd8-f0a8-4037-a29c-6f2b00d56195",
"url": "/v2/apps/9906bdd8-f0a8-4037-a29c-6f2b00d56195",
"created_at": "2014-10-21T17:42:12+00:00",
"updated_at": "2014-10-21T17:43:17+00:00"
},
"entity": {
"name": "fb-user",
"production": false,
"space_guid": "635b4998-59ae-4982-b51e-e844335fb447",
"stack_guid": "bb41d432-2c27-4fcb-a9c6-7fb2eafaa46e",
"buildpack": null,
"detected_buildpack": "java-buildpack=v2.5-https://github.com/cloudfoundry/java-buildpack.git#840500e open-jdk-jre=1.8.0_25 spring-auto-reconfiguration=1.5.0_RELEASE tomcat-access-logging-support=2.3.0_RELEASE tomcat-instance=8.0.14 tomcat-lifecycle-support=2.3.0_RELEASE tom...",
"environment_json": {
},
"memory": 512,
"instances": 10,
"disk_quota": 1024,
"state": "STARTED",
"version": "821f2804-0c83-44ec-9f09-e2600fcb4572",
"command": null,
"console": false,
"debug": null,
"staging_task_id": "5dece2d14c8c4409abdb07c22ecbcc72",
"package_state": "STAGED",
"health_check_timeout": null,
"staging_failed_reason": null,
"docker_image": null,
"package_updated_at": "2014-10-21T17:10:49+00:00",
"detected_start_command": "JAVA_HOME=$PWD/.java-buildpack/open_jdk_jre JAVA_OPTS=\"-Djava.io.tmpdir=$TMPDIR -XX:OnOutOfMemoryError=$PWD/.java-buildpack/open_jdk_jre/bin/killjava.sh -Xmx382293K -Xms382293K -XX:MaxMetaspaceSize=64M -XX:MetaspaceSize=64M -Xss995K -Daccess.logging.enabled=false -Dhttp.port=$PORT\" $PWD/.java-buildpack/tomcat/bin/catalina.sh run",
"space_url": "/v2/spaces/635b4998-59ae-4982-b51e-e844335fb447",
"space": {
"metadata": {
"guid": "635b4998-59ae-4982-b51e-e844335fb447",
"url": "/v2/spaces/635b4998-59ae-4982-b51e-e844335fb447",
"created_at": "2014-10-18T21:40:09+00:00",
"updated_at": null
},
"entity": {
"name": "dev",
"organization_guid": "ca62f4a4-30bf-4b8b-8111-4d596337dcb6",
"space_quota_definition_guid": null,
"organization_url": "/v2/organizations/ca62f4a4-30bf-4b8b-8111-4d596337dcb6",
"developers_url": "/v2/spaces/635b4998-59ae-4982-b51e-e844335fb447/developers",
"managers_url": "/v2/spaces/635b4998-59ae-4982-b51e-e844335fb447/managers",
"auditors_url": "/v2/spaces/635b4998-59ae-4982-b51e-e844335fb447/auditors",
"apps_url": "/v2/spaces/635b4998-59ae-4982-b51e-e844335fb447/apps",
"routes_url": "/v2/spaces/635b4998-59ae-4982-b51e-e844335fb447/routes",
"domains_url": "/v2/spaces/635b4998-59ae-4982-b51e-e844335fb447/domains",
"service_instances_url": "/v2/spaces/635b4998-59ae-4982-b51e-e844335fb447/service_instances",
"app_events_url": "/v2/spaces/635b4998-59ae-4982-b51e-e844335fb447/app_events",
"events_url": "/v2/spaces/635b4998-59ae-4982-b51e-e844335fb447/events",
"security_groups_url": "/v2/spaces/635b4998-59ae-4982-b51e-e844335fb447/security_groups"
}
},
"stack_url": "/v2/stacks/bb41d432-2c27-4fcb-a9c6-7fb2eafaa46e",
"stack": {
"metadata": {
"guid": "bb41d432-2c27-4fcb-a9c6-7fb2eafaa46e",
"url": "/v2/stacks/bb41d432-2c27-4fcb-a9c6-7fb2eafaa46e",
"created_at": "2014-10-18T05:35:32+00:00",
"updated_at": null
},
"entity": {
"name": "lucid64",
"description": "Ubuntu 10.04 on x86-64"
}
},
"events_url": "/v2/apps/9906bdd8-f0a8-4037-a29c-6f2b00d56195/events",
"service_bindings_url": "/v2/apps/9906bdd8-f0a8-4037-a29c-6f2b00d56195/service_bindings",
"service_bindings": [
],
"routes_url": "/v2/apps/9906bdd8-f0a8-4037-a29c-6f2b00d56195/routes",
"routes": [
{
"metadata": {
"guid": "32ed4006-dbc8-4aad-af5a-4825d2595798",
"url": "/v2/routes/32ed4006-dbc8-4aad-af5a-4825d2595798",
"created_at": "2014-10-18T21:46:12+00:00",
"updated_at": null
},
"entity": {
"host": "fbuser",
"domain_guid": "b20ae471-c9f5-49e1-ab88-df5832e9d621",
"space_guid": "635b4998-59ae-4982-b51e-e844335fb447",
"domain_url": "/v2/domains/b20ae471-c9f5-49e1-ab88-df5832e9d621",
"space_url": "/v2/spaces/635b4998-59ae-4982-b51e-e844335fb447",
"apps_url": "/v2/routes/32ed4006-dbc8-4aad-af5a-4825d2595798/apps"
}
}
]
}
}
]
}
Connected, dumping recent logs for app fb-user in org social / space dev as <user>...
FAILED
websocket: bad handshake
FAILED
websocket: bad handshake
Any leads on how to debug the issue will be ver helpful...