0
votes

When using Cloud Foundry with api version 2.0.0, and cf-cli 6.26, the command cf logs <APPNAME> -v produces the following error:

REQUEST: [2017-05-19T13:28:35+01:00]
POST /oauth/token HTTP/1.1
Host: 
Accept: application/json
Connection: close
Content-Type: application/x-www-form-urlencoded
User-Agent: cf/6.26.0+9c9a261.2017-04-06 (go1.7.5; amd64 linux)
[PRIVATE DATA HIDDEN]

WEBSOCKET ERROR: [2017-05-19T13:28:35+01:00]
Post /oauth/token: unsupported protocol scheme "". Retrying...
1

1 Answers

0
votes

Either upgrade the Cloud Foundry installation, or downgrade the CLI (version 6.21.1 works for me).

Cloud Foundry changed the configuration of the endpoints used for logging at some point. https://www.pivotaltracker.com/n/projects/966314/stories/135557875

Version 6.26 of cf-cli expects doppler_logging_endpoint to be set, whereas v2.0.0 of the API only sends loggregator_endpoint. Thus the Websocket Request is sent to "", which results in the response being nonsense, generating this error.