bx cf logs gives “Error dialing traffic controller server” when switching region

怎甘沉沦 提交于 2019-12-12 03:26:01

问题


I need a script to collect logs which must switch between regions via a bx login -a. I'm using the bluemix cli so that I can login using an apikey.

But when I switch regions the bx cf logs app_name goes haywire.

[Ops]$ bx cf logs AppName
Invoking 'cf logs AppName'...

FAILED
Error dialing traffic controller server: websocket: bad handshake.
Please ask your Cloud Foundry Operator to check the platform configuration (traffic controller is wss://doppler.eu-gb.bluemix.net:443).


[Ops]$ bx api
API endpoint: https://api.ng.bluemix.net (API version: 2.54.0)

See how my api is ng but the doppler is the UK's eu-gb. If I run cf logs in UK region it does work fine.

Versions:

[Ops]$ bx --version
bx version 0.5.4+ae22935-2017-05-18T03:55:55+00:00

[Ops]$ bx update
Checking for updates...
No update required. Your CLI is already up-to-date.

[Ops]$ bx cf --version
Invoking 'cf --version'...

cf version 6.18.0+b22884b9c-2017-02-27

I found this and reckon at least related but note it's fixed in CF 6.26 and the embedded in bx version is 6.18.

Any workaround? Logout/Login with -a doesn't help me. I don't want to use cf directly due to my requirement to login via apikey.


回答1:


Bluemix CLI embedded a CF CLI with version 6.18, 'bx app logs' actually invokes 'cf logs' as you can see from the messages. This embedded CF CLI needs to be upgraded.

A workaround is to just copy the cf cli binary to /usr/local/Bluemix/cfcli



来源:https://stackoverflow.com/questions/44630333/bx-cf-logs-gives-error-dialing-traffic-controller-server-when-switching-region

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!