# Can't reach Discourse after changing network adapter

**URL:** https://meta.discourse.org/t/cant-reach-discourse-after-changing-network-adapter/141216
**Category:** Support
**Created:** [February 10, 2020, 7:49pm UTC](https://meta.discourse.org/t/cant-reach-discourse-after-changing-network-adapter/141216 "2020-02-10T19:49:58Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![RBoy](https://avatars.discourse-cdn.com/v4/letter/r/2bfe46/32.png) [@RBoy](https://meta.discourse.org/u/RBoy)
#### Post date: [February 10, 2020, 7:49pm UTC](https://meta.discourse.org/t/cant-reach-discourse-after-changing-network-adapter/141216/1 "2020-02-10T19:49:58Z")

</div>

I recently changed the network adapter and now discourse is not working. I’ve tried to rebuild discourse but it still doesn’t respond to https requests. I can see the ruby processes up and running.

I think it may have something to do with the mac address. After rebuilding discourse I see this line:

```plaintext
> /usr/bin/docker run --shm-size=512m -d --restart=always -e LANG=en_US.UTF-8 -e RAILS_ENV=production -e UNICORN_WORKERS=5 -e UNICORN_SIDEKIQS=1 -e RUBY_GLOBAL_METHOD_CACHE_SIZE=131072 -e RUBY_GC_HEAP_GROWTH_MAX_SLOTS=40000 -e RUBY_GC_HEAP_INIT_SLOTS=400000 -e RUBY_GC_HEAP_OLDOBJECT_LIMIT_FACTOR=1.5 -e DISCOURSE_DB_SOCKET=/var/run/postgresql -e DISCOURSE_DB_HOST= -e DISCOURSE_DB_PORT= -e LETSENCRYPT_DIR=/shared/letsencrypt -e DISCOURSE_HOSTNAME=XXX -e DISCOURSE_DEVELOPER_EMAILS=XXX -e DISCOURSE_SMTP_ADDRESS=XXX -e DISCOURSE_SMTP_PORT=587 -e DISCOURSE_SMTP_USER_NAME=XXX -e DISCOURSE_SMTP_PASSWORD=XXX -e LETSENCRYPT_ACCOUNT_EMAIL=XXX -e DISCOURSE_MAXMIND_LICENSE_KEY=XXX -h XXX-app -e DOCKER_HOST_IP=172.17.0.1 --name app -t -p 80:80 -p 443:443 -v /var/discourse/shared/standalone:/shared -v /var/discourse/shared/standalone/log/var-log:/var/log - **-mac-address 02:3b:06:XX:XX:XX** local_discourse/app /sbin/boot

```

However there is no adapter with the mac address starting wtih `02:3b`, I see three adapters in the system `vethec9f10b` starting with `6e:a2`, `ens160` starting wtih `00:0c` and `docker0` starting with `02:42:eb:XX:XX:XX`

I’m guessing this is an old mac address from before the network adapter was changed, if so how do I tell discourse of use the correct mac address? This looks like the docker network adapter mac address but it seems to have changed.

---

<div class="post-metadata">

### Author: ![supermathie](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/supermathie/32/507518_2.png) [@supermathie](https://meta.discourse.org/u/supermathie)
#### Post date: [February 10, 2020, 9:14pm UTC](https://meta.discourse.org/t/cant-reach-discourse-after-changing-network-adapter/141216/3 "2020-02-10T21:14:11Z")

</div>

> [@RBoy](#):
>
> However there is no adapter with the mac address starting wtih `02:3b`

When using docker you have an additional virtual adapter that represents your server’s address on the `docker0` virtual bridge:

```plaintext
○ → ip addr show dev docker0
3: docker0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default 
    link/ether 02:42:3a:ad:0b:94 brd ff:ff:ff:ff:ff:ff
    inet 172.17.0.1/16 brd 172.17.255.255 scope global docker0
       valid_lft forever preferred_lft forever

```

Any running docker containers will have a MAC address on this virtual bridge:

```plaintext
○ → docker run --rm --name example -it debian 
root@ba1b0e1446c8:/# 

(in another window:)
○ → docker inspect example | jq '.[0].NetworkSettings.IPAddress'
"172.17.0.2"

○ → docker inspect example | jq '.[0].NetworkSettings.MacAddress'
"02:42:ac:11:00:02"

○ → ping -c 1 172.17.0.2 >/dev/null; arp 172.17.0.2
Address HWtype HWaddress Flags Mask Iface
172.17.0.2 ether 02:42:ac:11:00:02 C docker0

```

this is _completely separate_ from your system interfaces. That MAC address should show up on the docker0 bridge though:

```plaintext
○ → brctl showmacs docker0
port no	mac addr is local?	ageing timer
  1	02:42:ac:11:00:02	no 187.24
…

```

Exactly what did you change when you “changed the network adapter”?

Does it still come up with an IP and everything that it should? i.e. is normal networking functional?

---

<div class="post-metadata">

### Author: ![supermathie](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/supermathie/32/507518_2.png) [@supermathie](https://meta.discourse.org/u/supermathie)
#### Post date: [February 10, 2020, 9:18pm UTC](https://meta.discourse.org/t/cant-reach-discourse-after-changing-network-adapter/141216/5 "2020-02-10T21:18:54Z")

</div>

Run `ip addr` and ensure it still has the same address you’re trying to access.

Maybe paste the output here.

Does the client connect to the socket but get no response?

---

<div class="post-metadata">

### Author: ![RBoy](https://avatars.discourse-cdn.com/v4/letter/r/2bfe46/32.png) [@RBoy](https://meta.discourse.org/u/RBoy)
#### Post date: [February 10, 2020, 10:52pm UTC](https://meta.discourse.org/t/cant-reach-discourse-after-changing-network-adapter/141216/7 "2020-02-10T22:52:58Z")

</div>

> [@supermathie](#):
>
> ip addr

Thank you so much! That was the pointer I needed. When I changed the network adapter, the static IP address to the machine changed to a dynamic IP address and hence it wasn’t responding to the clients. I reset the IP address and it started working. Apparently not related to the mac address but rather the IP address.

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [February 11, 2020, 9:37am UTC](https://meta.discourse.org/t/cant-reach-discourse-after-changing-network-adapter/141216/8 "2020-02-11T09:37:08Z")

</div>


