Can't reach Discourse after changing network adapter

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:

> /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= --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.

1 Like

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

○ → 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 brd scope global docker0
       valid_lft forever preferred_lft forever

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

○ → docker run --rm --name example -it debian 

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

○ → docker inspect example | jq '.[0].NetworkSettings.MacAddress'

○ → ping -c 1 >/dev/null; arp
Address                  HWtype  HWaddress           Flags Mask            Iface               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:

○ → 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?


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?


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.