The Wayback Machine - https://web.archive.org/web/20211230111453/https://github.com/StackStorm/st2/issues/5137
Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

should check both 'http_proxy' and 'HTTP_PROXY' when get proxy info from environment variables #5137

Open
wfgydbu opened this issue Feb 5, 2021 · 5 comments

Comments

@wfgydbu
Copy link

@wfgydbu wfgydbu commented Feb 5, 2021

SUMMARY

I just faced an embarrassed problem that command st2 action list keeps return 503.

I tried st2 --debug action list and the result in line HTTP_PROXY(uppercase) was empty. This mislead me that the proxy info was set(which is not).

I finally found that the root cause is a lowercase http_proxy env variable was set in the system.

So I think it maybe more friendly to check both 'http_proxy' and 'HTTP_PROXY' to get proxy info when using st2 command with --debug option.

related code:

print('HTTP_PROXY: %s' % (os.environ.get('HTTP_PROXY', '')))

STACKSTORM VERSION

3.3

OS, environment, install method

centos 7.6, custom install

Steps to reproduce the problem

  1. set lowercase proxy environment variable, eg. export http_proxy='127.0.0.1:8888'
  2. run st2 --debug action list

Expected Results

proxy info should be printed

Actual Results

proxy info did not show, value of HTTP_PROXY is empty.

Thanks!

@wfgydbu wfgydbu changed the title should check both 'http_proxy' and 'HTTP_PROXY' when get proxy var from environment variables should check both 'http_proxy' and 'HTTP_PROXY' when get proxy info from environment variables Feb 5, 2021
@armab
Copy link
Member

@armab armab commented Feb 5, 2021

Thanks @wfgydbu, that's a valid bug report and a good find.

So I think it maybe more friendly to check both 'http_proxy' and 'HTTP_PROXY' to get proxy info when using st2 command with --debug option.

Agree 👍 We'd welcome code contributions to improve this.

@wfgydbu
Copy link
Author

@wfgydbu wfgydbu commented Feb 5, 2021

Thanks, @armab.

I will be very happy to make this contribution as my first PR for st2.

Feel free to assign it to me. :)

@S-T-A-R-L-O-R-D
Copy link

@S-T-A-R-L-O-R-D S-T-A-R-L-O-R-D commented Aug 28, 2021

I am working on it.

@S-T-A-R-L-O-R-D
Copy link

@S-T-A-R-L-O-R-D S-T-A-R-L-O-R-D commented Aug 29, 2021

is this issue still open, or @wfgydbu resolved it?

S-T-A-R-L-O-R-D pushed a commit to S-T-A-R-L-O-R-D/st2 that referenced this issue Aug 29, 2021
@wfgydbu
Copy link
Author

@wfgydbu wfgydbu commented Sep 14, 2021

@S-T-A-R-L-O-R-D Hello, being stuck in other things, feel free to submit a pr, thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment