-
Notifications
You must be signed in to change notification settings - Fork 6.8k
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
Unable to setup stack behind proxy #865
Comments
Nowadays Docker image builds are performed by According to docker/buildx#170 (comment), these options need to be passed as build args. Compose does this automatically since v2.16.0 (docker/compose#10159) by reading your {
"proxies":
{
"default":
{
"httpProxy": "http://<ip-address>:<port>",
"httpsProxy": "https://<ip-address>:<port>",
"noProxy": "*.<domain>,127.0.0.0/8"
}
}
} Ref. https://docs.docker.com/network/proxy/#configure-the-docker-client |
I have configured and tried the client config as well and I still get the error. |
If I were you I would check what version of Compose ships with your Docker distribution. You mentioned that Compose was now part of Docker, and that its version is irrelevant. Both are wrong:
If the version is greater than 2.16.0, it's a Compose bug that needs to be reported upstream. docker-elk is only an application running on top of it. If the version is less than 2.16.0, an upgrade is required for the proxy client config to be supported. |
Understood, I guess I have never not have it update since its been included. I understand though that some may not be able to update their software. According to Docker Compose release notes I have the lastest version. Compose version:
So far I have the docker client config and docker daemon configured to use the proxy. |
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
@grizzlycode I did my little investigation in #868. It turns out that the proxy settings work as expected, so there is no bug in Compose. I configured a dummy proxy URL, and you can see HTTP requests failing inside containers at https://github.com/deviantony/docker-elk/actions/runs/5104016989/jobs/9174648224 You issue is different and not directly related to Compose. The message Could you please share the output of |
Per your request here is the ouput of docker pull. Output:
|
So after manually pulling down the elasticsearch image I tried error: |
Probably because the traffic that is supposed to stay internal to the elk local network is actually going over the proxy. See my example at #865 (comment) to exclude Docker's networks with the |
I have |
It's Anyway, without the complete picture I doubt I can help any further. The question is about the usage of Docker and of some corporate proxy which I have no knowledge of. In both cases, docker-elk is out of the picture. I also did some experiments locally, and both |
Ok so for my sitauton the config.json doesn't work. However, when I set the bash variables for |
Can you share your configuration? I'm in the same situation and I can't find a solution for using my proxy. |
I don't have access to that specific config currently. However, there are some components that need to be aware of a proxy if one is used in your environemnt. Such as:
This can be difficult to troubleshoot without local IT support assisting as each network is different. Beware some networks have two proxies one for either http/https or perhaps just uses one for both. Start with creating the proxy variables in Docker config and try to reach out to the internet. This can be done with any container that can reach out to the internet for testing purposes. If your other containers can reach the internet then your docker instance should be configured correctly. By setting at the Docker level that should allow any container to reach the internet now. However, I have had issues specfiically with Fleet where I still had to set the proxy in Kibana.yml for it to work. So always check documentation and look to the individual config files to ensure the proxy is defined there as well if applicable. |
Problem description
I'm trying to setup this stack behind a proxy. However, it fails due to timeout.
I have my docker daemon already configured to use the proxy and I use if for my other projects. However, it appears this is not considered when the stack gets built. Upon a cursory search it appears that additonal commands are required when a container is "built" like these are. I've tried various methods provided by the Docker docs , but I don't have a working solution.
Are there additional proxy commands or config changes that must be used to make this stack work behind a proxy?
If so, can you share them and possibly make a guide and an optional variable in the .env so if a person populates for instance
HTTP_PROXY=my.proxy.com:3128
it will utilize that in the build process? I can't be the first person that has tried to put this up behind a proxy.Extra information
Stack configuration
Docker setup
Container logs
The text was updated successfully, but these errors were encountered: