cf logs --recent fails to honor HTTP_PROXY env since 6.2.0
Submitting a new issue in case my comment on previously closed ticket (https://github.com/cloudfoundry/cli/issues/127#issuecomment-49293686) gets unnoticed
$ HTTP_PROXY=http://127.0.0.1:3128 cf-v6.3.0.exe logs myapp --recent
Connecté, le dumping journaux récents pour application myapp en org [...]
RATÉ
Error dialing loggregator server: Get https://loggregator.run.pivotal.io:4443/recent?app=1c889575-8ec7-4b2d-bbf1-cad4dc81586b: dial tcp: GetAddrInfoW: No such host is known..
Please ask your Cloud Foundry Operator to check the platform configuration (loggregator endpoint is wss://loggregator.run.pivotal.io:4443).
$ HTTP_PROXY=http://127.0.0.1:3128 cf-6.2.0-c9d4aaa.exe logs myapp --recent
Connecté, le dumping journaux récents pour application myapp [...]
RATÉ
Get https://loggregator.run.pivotal.io:4443/recent?app=1c889575-8ec7-4b2d-bbf1-cad4dc81586b: dial tcp: GetAddrInfoW: No such host is known.
$ HTTP_PROXY=http://127.0.0.1:3128 cf-6.1.2-6a013ca.exe logs myapp --recent
Connected, dumping recent logs for app myapp [...]
2014-07-17T12:24:43.21+0200 [API] OUT Updated app with guid 1c889575-8ec7-4b2d-bbf1-cad4dc81586b ({"route"=>"86be2882-c2f7-42cf-a341-b3a62a52bf83"})
[...]
$ cf-v6.3.0.exe -v
c:\Program Files (x86)\CloudFoundry\cf-v6.3.0.exe version 6.3.0-053b818-2014-07-14T21:30:59+00:00
$ cf-6.1.2-6a013ca.exe -v
c:\Program Files (x86)\CloudFoundry\cf-6.1.2-6a013ca.exe version 6.1.2-6a013ca
$ cf-6.2.0-c9d4aaa.exe -v
c:\Program Files (x86)\CloudFoundry\cf-6.2.0-c9d4aaa.exe version 6.2.0-c9d4aaa-2014-06-19T22:04:01+00:00
I'm cumulating problems as my corporate proxy is also not properly handling Upgrade requests, resulting in lack of streamed logs when not using the -recent option. I guess this situation is not uncommon. Wasn't an http fallback used for the -recent option which has changed into use of websocket in 6.2.0 (lacking interpretation of HTTP_PROXY )?
We have created an issue in Pivotal Tracker to manage this. You can view the current status of your issue at: https://www.pivotaltracker.com/story/show/75343416.
@ajackson Is there already an API call for this in loggregatorlib? There must have been at one point right?
Yes loggregator_consumer has the code the honor the proxy. It just needs to be set / configured when using the library. Our tests for the proxy are currently green, can you confirm that the cli is configuring the proxy.
Okay, I've scheduled this story. We'll find out what broke it shortly.
@gberche-orange THe CLI team has addressed this issue. I'm closing the github issue. Please reopen if the problem persists.
Merci
Greg
@goehmen Thanks a lot for this fix. I confirm I can now properly use the cf logs --recent in 6.4.0 whereas it was failing in 6.3.0.
I'm getting the same error when I use the latest version of cli 6.11.2. Am I alone?
cheers, Yi