Https problem: ProxySchemeUnknown

To setup https I have added second nginx server to docker-compose.yml. The configuration was straight forward and I can access the UI and post from SDK over https. Last step is to change system.url-prefix to https. Unfortunately here I get following error in sentry_onpremise_web_1 (I guess this error is also visible in all containers based on sentry-onpremise-local Images) . For me it looks like the internal_project_key.dsn_private doesn’t get updated. I have tried to run docker-compose run --rm web upgrade but it stops with the same error massage. I haven’t tried to rebuild the image yet.

08:34:12 [INFO] sentry.plugins.github: apps-not-configured
Traceback (most recent call last):
File “/usr/local/bin/sentry”, line 8, in
sys.exit(main())
File “/usr/local/lib/python2.7/site-packages/sentry/runner/init.py”, line 166, in main
cli(prog_name=get_prog(), obj={}, max_content_width=100)
File “/usr/local/lib/python2.7/site-packages/click/core.py”, line 722, in call
return self.main(*args, **kwargs)
File “/usr/local/lib/python2.7/site-packages/click/core.py”, line 697, in main
rv = self.invoke(ctx)
File “/usr/local/lib/python2.7/site-packages/click/core.py”, line 1066, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/usr/local/lib/python2.7/site-packages/click/core.py”, line 1066, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/usr/local/lib/python2.7/site-packages/click/core.py”, line 895, in invoke
return ctx.invoke(self.callback, **ctx.params)
File “/usr/local/lib/python2.7/site-packages/click/core.py”, line 535, in invoke
return callback(*args, **kwargs)
File “/usr/local/lib/python2.7/site-packages/click/decorators.py”, line 17, in new_func
return f(get_current_context(), *args, **kwargs)
File “/usr/local/lib/python2.7/site-packages/sentry/runner/decorators.py”, line 68, in inner
return ctx.invoke(f, *args, **kwargs)
File “/usr/local/lib/python2.7/site-packages/click/core.py”, line 535, in invoke
return callback(*args, **kwargs)
File “/usr/local/lib/python2.7/site-packages/click/decorators.py”, line 17, in new_func
return f(get_current_context(), *args, **kwargs)
File “/usr/local/lib/python2.7/site-packages/sentry/runner/decorators.py”, line 29, in inner
configure()
File “/usr/local/lib/python2.7/site-packages/sentry/runner/init.py”, line 129, in configure
configure(ctx, py, yaml, skip_service_validation)
File “/usr/local/lib/python2.7/site-packages/sentry/runner/settings.py”, line 158, in configure
skip_service_validation=skip_service_validation,
File “/usr/local/lib/python2.7/site-packages/sentry/runner/initializer.py”, line 326, in initialize_app
configure_sdk()
File “/usr/local/lib/python2.7/site-packages/sentry/utils/sdk.py”, line 129, in configure_sdk
get_options(dsn=internal_project_key.dsn_private, **sdk_options)
File “/usr/local/lib/python2.7/site-packages/sentry_sdk/transport.py”, line 374, in make_transport
return transport_cls(options)
File “/usr/local/lib/python2.7/site-packages/sentry_sdk/transport.py”, line 138, in init
ca_certs=options[“ca_certs”],
File “/usr/local/lib/python2.7/site-packages/sentry_sdk/transport.py”, line 293, in _make_pool
return urllib3.ProxyManager(proxy, **opts)
File “/usr/local/lib/python2.7/site-packages/urllib3/poolmanager.py”, line 404, in init
raise ProxySchemeUnknown(proxy.scheme)
urllib3.exceptions.ProxySchemeUnknown: Not supported proxy scheme http_proxy=http

Have you enabled relevant settings in your config: https://github.com/getsentry/onpremise/blob/c2120aafc94e34ee33420d0afb7f3c1641fbe514/sentry/sentry.conf.example.py#L184-L196

Yes, I have these options enabled

Oh, looking closely to the error, I think your http_proxy env variable is not set properly. Can you do echo $http_proxy and see what it says? If it outputs http, there’s your problem.

Bullseye! I had http_proxy configured in ~/.docker/config.json and by setting it there it got passed to all containers. After removing it and starting containers again it worked without a hiccup.
Thanks for solving it for me! :+1:

1 Like