jjcarstens
Can't see `nerves.local` on network anymore
(This is ported from an unrelated GitHub issue that I didn’t want to clog up)
I currently have a device that is just wlan0 network setup and have suddenly lost the ability to get to it via nerves.local (although IP address still works fine)
At first it would just last a few minutes but then I could connect as normal. Now I’m a week in and still can’t see nerves.local on my network from MacOS. Although not sure if that is network setup or my configuration…
Portion of my current config
config :nerves_init_gadget,
ifname: "wlan0",
address_method: :dhcp,
node_host: :mdns_domain,
ssh_console_port: 22
[ssid, psk] = File.read!(".wlan_settings") |> String.split()
config :nerves_network, :default,
wlan0: [
ssid: ssid,
psk: psk,
key_mgmt: :"WPA-PSK"
]
case Mix.env do
:dev ->
config :nerves_init_gadget,
mdns_domain: "nerves-dev.local",
node_name: "nerves-dev"
:prod ->
config :nerves_init_gadget,
mdns_domain: "nerves.local",
node_name: "nerves"
end
Most Liked
jjcarstens
Thanks @tmecklem
I think you’re right it’s a router/switch problem. Using /etc/hosts worked like a charm and would be a great way to resolve this.
But, I wanted to go further (just for knowledges sake). Here’s what I ended up doing that seemed to get it all in a working state again:
sudo killall -HUP mDNSResponderon MacOS machine to reset DNS cache and put mDNS daemon in clean state- Restarted my router
- Restarted nerves device (rpi3) via unplug ↔ plug
- Performed a victory dance


I was hoping to be able to find more specific details for root cause and fixes, but decided this and utilizing /etc/hosts file was good enough in my case.
tmecklem
This does seem to be a router/switch problem. Getting mdns and the .local domain can be tricky on a local LAN if the router filters it out of the box, especially when WiFi is involved.
If you are assigning it a reserved IP address then you might get better results just adding a hostname/IP for it to your /etc/hosts file. I’m not sure if that’s a helpful solution for you or not.
Popular in Questions
Other popular topics
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #deployment
- #library
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #channels
- #elixirconf
- #exunit
- #discussion
- #code-sync
- #javascript
- #podcasts
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixir-ls
- #phoenix_html
- #iex
- #blog-post
- #graphql
- #genstage
- #ai
- #websockets
- #supervisor
- #advent-of-code
- #elixirconf-us
- #distillery
- #processes
- #forms
- #api
- #metaprogramming
- #security
- #performance









