cli icon indicating copy to clipboard operation
cli copied to clipboard

cf logs --recent fails to honor HTTP_PROXY env since 6.2.0

Open gberche-orange opened this issue 12 years ago • 7 comments

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 )?

gberche-orange avatar Jul 21 '14 10:07 gberche-orange

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.

cf-gitbot avatar Jul 21 '14 10:07 cf-gitbot

@ajackson Is there already an API call for this in loggregatorlib? There must have been at one point right?

lcddave avatar Jul 21 '14 22:07 lcddave

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.

ajackson avatar Jul 21 '14 22:07 ajackson

Okay, I've scheduled this story. We'll find out what broke it shortly.

lcddave avatar Jul 21 '14 23:07 lcddave

@gberche-orange THe CLI team has addressed this issue. I'm closing the github issue. Please reopen if the problem persists.

Merci

Greg

goehmen avatar Aug 07 '14 22:08 goehmen

@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.

gberche-orange avatar Aug 25 '14 17:08 gberche-orange

I'm getting the same error when I use the latest version of cli 6.11.2. Am I alone?

cheers, Yi

Joyce-yi avatar May 19 '15 07:05 Joyce-yi