Cheezy
VintageNet issue when running on host: (File.Error) could not write to file “/etc/resolv.conf”: permission denied
Hello, my Nerves app is using VintageNet and VintageNetWizard to establish a network connection when on target. My app also has a phoenix app and I want to run/develop the web app on my host. I’ve created a fake for VintageNet and VintageNetWizard when running on host. When I start the application on host I get the following error:
** (Mix) Could not start application vintage_net: VintageNet.Application.start(:normal, ) returned an error: shutdown: failed to start child: VintageNet.NameResolver
** (EXIT) an exception was raised:
** (File.Error) could not write to file “/etc/resolv.conf”: permission denied
(elixir 1.17.2) lib/file.ex:1144: File.write!/3
(vintage_net 0.13.5) lib/vintage_net/name_resolver.ex:129: VintageNet.NameResolver.refresh/1
(vintage_net 0.13.5) lib/vintage_net/name_resolver.ex:96: VintageNet.NameResolver.init/1
(stdlib 6.0) gen_server.erl:2057: :gen_server.init_it/2
(stdlib 6.0) gen_server.erl:2012: :gen_server.init_it/6
(stdlib 6.0) proc_lib.erl:329: :proc_lib.init_p_do_apply/3
Even though I am using a fake the application is trying to start the NameResolver. Any ideas how I can get around this?
Most Liked
Taun
Do you have the following in your host.exs configuration?
config :vintage_net,
resolvconf: "/dev/null",
persistence: VintageNet.Persistence.Null,
bin_ip: "false"
Which avoids attempting to write to resolve.conf.
However, if you really want to have a resolv.conf, you would want to give a path that is writable on the host to override the default /etc/resolv.conf
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









