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

NoProxy in some self host environments #405

Open
patrick-men opened this issue Jan 24, 2024 · 1 comment
Open

NoProxy in some self host environments #405

patrick-men opened this issue Jan 24, 2024 · 1 comment

Comments

@patrick-men
Copy link

I've recently deployed SourceGraph with the Code Host GitHub. The environment where it was delpoyed uses injected proxies for the internal applications to reach the internet; this includes http, https and no_proxy. I had quite some issues for a while, having to track the traffic to see what went wrong.

Specifically, there was a problem in the repo-updater pod that caused other pods to fail as well; the error message found in the logs being: [...] error="invalid character '<' looking for beginning of value". Furthermore, the gitserver-0 pod failed once the repo-updater had been fixed.

Solution:
The problem in my case was that the proxy was routing internal traffic using the cluster internal DNS to the internet, which of course returned errors. In this specific case, an error page that returned HTML content, which caused the go code to fail.
When setting proxies for the pods, the gitserver-0 and repo-updater pods require a no_proxy/NO_PROXY envvar with the following values: localhost,sourcegraph-frontend-internal,gitserver-0.gitserver. This is assuming that your http/https proxies forward all other traffic elsewhere.

Given that this has caused quite a headache while fixing,this might be worth adding somewhere in your documentation, hopefully helping out other PoCs.

not sure if it's a similar issue, but at least the error message and the use of a proxy was identical in https://github.com/sourcegraph/sourcegraph/issues/2360

@patrick-men
Copy link
Author

patrick-men commented Jan 24, 2024

This also applies to the frontend pods if you want to use batch changes.
When using Code Insight, you need to add no_proxy to searcher-0.searcher as well

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant