# I am unable to connect a second manager node to my Swarm when using an http proxy

**URL:** https://community.replicated.com/t/i-am-unable-to-connect-a-second-manager-node-to-my-swarm-when-using-an-http-proxy/257
**Category:** Supporting your customers
**Created:** [January 2, 2019, 8:32pm UTC](https://community.replicated.com/t/i-am-unable-to-connect-a-second-manager-node-to-my-swarm-when-using-an-http-proxy/257 "2019-01-02T20:32:57Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![ethanm](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.replicated.com/ethanm/32/11_2.png) [@ethanm](https://community.replicated.com/u/ethanm)
#### Post date: [January 2, 2019, 8:32pm UTC](https://community.replicated.com/t/i-am-unable-to-connect-a-second-manager-node-to-my-swarm-when-using-an-http-proxy/257/1 "2019-01-02T20:32:57Z")

</div>

When I try to connect a second manager node to my Docker Swarm when using an HTTP proxy I get the following error:

```
Does this machine require a proxy to access the Internet? (y/N) y
Enter desired HTTP proxy address: http://10.128.0.3:3128
The installer will use the proxy at 'http://10.128.0.3:3128'
Joining the swarm
Error response from daemon: manager stopped: can't initialize raft node: rpc error: code = Unavailable desc = grpc: the connection is unavailable
Failed to join the swarm cluster.
It may be possible to re-run this installer with the flags -swarm-advertise-addr and -swarm-listen-addr to resolve the problem.
```

---

<div class="post-metadata">

### Author: ![ethanm](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.replicated.com/ethanm/32/11_2.png) [@ethanm](https://community.replicated.com/u/ethanm)
#### Post date: [January 2, 2019, 9:06pm UTC](https://community.replicated.com/t/i-am-unable-to-connect-a-second-manager-node-to-my-swarm-when-using-an-http-proxy/257/2 "2019-01-02T21:06:06Z")

</div>

Docker must be configured not to use the HTTP proxy for all managers when connecting via internal IP addresses. To fix this you must add the advertise addresses of all Swarm managers to each manager’s NO\_PROXY variable.

The [/swarm-init and /swarm-join scripts](https://help.replicated.com/docs/swarm/customer-installations/installing/) scripts can be run with the `additional-no-proxy` flag set to a comma-delimited list of all manager IP addresses in the Swarm.

For example:

```auto
curl -sSL https://get.replicated.com/swarm-init | sudo bash -s \
    http-proxy=http://10.128.0.3:3128 \
    additional-no-proxy=10.128.0.39,10.128.0.6

```

and

```auto
curl -sSL https://get.replicated.com/swarm-join | sudo bash -s \
    swarm-master-address=10.128.0.39:2377 \
    swarm-token=[redacted] \
    daemon-registry-address=10.128.0.39:9874 \
    ca=[redacted] \
    http-proxy=http://10.128.0.3:3128 \
    additional_no_proxy=10.128.0.39,10.128.0.6,127.0.0.1,172.17.0.1,localhost

```

Additional managers can be added later by manually editing the Docker NO\_PROXY environment variable and restarting the Docker service.

You can change this by editing the file `/etc/systemd/system/docker.service.d/http-proxy.conf`. You will then need to reload the systemd service configuration (`systemctl daemon-reload`) and restart the Docker service (systemctl restart docker). More information can be found [here](https://docs.docker.com/config/daemon/systemd/#httphttps-proxy) on configuring the Docker service.

---

<div class="post-metadata">

### Author: ![grant](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.replicated.com/grant/32/9_2.png) [@grant](https://community.replicated.com/u/grant)
#### Post date: [March 22, 2022, 9:02pm UTC](https://community.replicated.com/t/i-am-unable-to-connect-a-second-manager-node-to-my-swarm-when-using-an-http-proxy/257/3 "2022-03-22T21:02:12Z")

</div>


