Ethernet Connection Issue

Hello Farmbot Community!

Im part of the IT Staff attemping to get this device configured on our network. Can you please explain what the definitions are of each of the categories?

Like what is IS_RSA.PUB? DNS Test Name? NAMESERVERS? None of these settings are explained, Also none of the areas are marked as to What is required and what isnt. I understand we want to make this device static on our network so i assume it needs the IP Method Selected, IP Address, Subnet, Gateway. is NAMESERVERS DNS? Can Multiple DNS be entered here if NAMESERVERS is really DNS?

My question is how does it do its Checks for DNS is it pinging the DNS Server?? What are some possible reasons the Setup would Fail? We loaded the Older Farmbot Software 6.4.10 to avoid the possible static ip issue in 6.4.11

Hello.

ID_RSA.PUB is an SSH public key to allow getting SSH access to Farmbot. this can be left blank.

DNS TEST NAME is the name that Farmbot should test to determine part of internet connectivity. This can be left blank if you are using Farmbot’s public server.

NTP POOL SERVER these are NTP servers that should be accessible on the network somewhere. They default to 0.pool.ntp.org and 1.pool.ntp.org if these addresses are accessible to your network, you can leave them blank. If not, you will need to supply your own ntp addresses or domains.

DOMAIN is a for static ip config.

NAMESERVERS is for static ip config. You can supply several nameservers split by a comma.

All that said, i think as @jsimmonds has pointed out there has been a bug for static ip settings for a while.
I have a fixed staged, and we are QA’ing it for a release.

Gotcha, so the static IP isnt going to work until this new image is ready. Ok thanks for the response this answers alot but to clarify one part, what information do you need for the Domain section? I understand its needed for the static ip configuration, but what domain am i inputting into this?

If your network doesn’t require it, you can leave it blank. I believe it is for things like Samba and other Windows tools that Farmbot doesn’t need or support.

If you are interested, the current beta channel has the fix. The only problem is an .img file is not posted for beta releases. If you have a Linux or OSX machine available i can walk you through flashing the OTA file. This would be helpful to me if you have the time, since i can’t really test static ip settings.

There’s this thread which could help you.
(Found it using forum search at the top of the front page)
I suspect that your (static wired) DNS resolution not working was an external firewall rule, since the IPv4 address would have “defaulted” to DHCP because of the bug referred to.

I love testing Static IPv4 addressing on Ethernet :sunglasses: I’ll post my results.

Hmmm . . static Ethernet still no-worky on beta branch . . I’ll see what I can uncover :confused:

/ pst: how do I look into the Configurator’s finished database ?

Just a quick FYI, we tried just setting this up with DHCP just to ensure the farmbot was functional and it still failed to complete the setup, what else should i be looking for? The DNS resolution i will double check with out network team to see if we have a firewall rule in place.

That would be cool however It looks like @jsimmonds already attempted to test this and its still not working :sob:

What was the error? I suspect that your network does not allow access to ntp or there are some ports closed.

if you have a console you can to something like

iex()> Farmbot.System.ConfigStorage.get_config_as_map()

There is also a sqlite database on the sdcard you can inspect on a different machine with a gui tool or the sqlite command line client

The Error was the Last Shutdown Reason FarmBot is unable to make DNS Requests to Https://my.farm.bot. What ports do i have to ensure are open?

Great, thanks for that.

Here’s the crash (eventually fatal) on boot after Configurator finished.
Using staging branch and cloned 1 hour ago.

I’d try to open a PR but would be too slow and maybe not the simple solution that’s likely possible for this one.

_/ apologize for the log formatting . . how do I put a multi-line block as preformatted text ? _

[ . . . ]

01:29:57.767 [info] Waiting for interface eth0 up.

01:29:57.768 [info] Interface eth0 is up.

01:29:57.779 [debug] Starting ntpd as: ["/usr/sbin/ntpd", "-n", "-d", "-S", "/srv/erlang/lib/nerves_time-0.2.0/priv/ntpd_script", "-p", "3.au.pool.ntp.org", "-p", "2.au.pool.ntp.org"]

01:29:57.780 [debug] Hacking tzdata.

01:29:57.791 [error] Child Farmbot.Target.Network.Manager of Supervisor Farmbot.Target.Network failed to start
** (exit) an exception was raised:
** (CaseClauseError) no case clause matching: "static"
(nerves_network) lib/nerves_network/if_supervisor.ex:80: Nerves.Network.IFSupervisor.manager/2
(nerves_network) lib/nerves_network/if_supervisor.ex:28: Nerves.Network.IFSupervisor.setup/2
(farmbot) platform/target/network/manager.ex:56: Farmbot.Target.Network.Manager.init/1
(stdlib) gen_server.erl:374: :gen_server.init_it/2
(stdlib) gen_server.erl:342: :gen_server.init_it/6
(stdlib) proc_lib.erl:249: :proc_lib.init_p_do_apply/3

Start Call: Farmbot.Target.Network.Manager.start_link("eth0", [domain: "fb2", name_servers: ["10.0.1.1"], ipv4_address_method: "static", ipv4_address: "10.0.1.120", ipv4_gateway: "10.0.1.1", ipv4_subnet_mask: "255.255.255.0"])
Restart: :transient
Shutdown: 5000
Type: :worker

01:29:57.797 [error] Child Farmbot.Target.Network of Supervisor Farmbot.System.Init.Suprevisor failed to start
** (exit) shutdown: failed to start child: Farmbot.Target.Network.Manager
** (EXIT) an exception was raised:
** (CaseClauseError) no case clause matching: "static"
(nerves_network) lib/nerves_network/if_supervisor.ex:80: Nerves.Network.IFSupervisor.manager/2
(nerves_network) lib/nerves_network/if_supervisor.ex:28: Nerves.Network.IFSupervisor.setup/2

[ . . . ]

01:29:57.838 [error] Farmbot exited: {{:shutdown, {:failed_to_start_child, Farmbot.System.Supervisor, {:shutdown, {:failed_to_start_child, Farmbot.System.Init.Suprevisor, {:shutdown, {:failed_to_start_child, Farmbot.Target.Network, {:shutdown, {:failed_to_start_child, Farmbot.Target.Network.Manager, {{:case_clause, "static"}, [{Nerves.Network.IFSupervisor, :manager, 2, [file: 'lib/nerves_network/if_supervisor.ex', line: 80]}, {Nerves.Network.IFSupervisor, :setup, 2, [file: 'lib/nerves_network/if_supervisor.ex', line: 28]}, {Farmbot.Target.Network.Manager, :init, 1, [file: 'platform/target/network/manager.ex', line: 56]}, {:gen_server, :init_it, 2, [file: 'gen_server.erl', line: 374]}, {:gen_server, :init_it, 6, [file: 'gen_server.erl', line: 342]}, {:proc_lib, :init_p_do_apply, 3, [file: 'proc_lib.erl', line: 249]}]}}}}}}}}}, {Farmbot, :start, [:normal, []]}}

Ah cool. I know exactly what that is. I will push a fix for that tomorrow morning.

1 Like

Hi @JayM026, did you try the forum search about “Ports” ? [I’d love to do it for you :neutral_face:]

Hoping this fix will also work for wireless ( :yum: )

Thanks ! Your Static Tester :no_mouth:

1 Like

Thanks for pointing this out. I believe it should work for wireless also.

Heres the silly change btw: https://github.com/FarmBot/farmbot_os/commit/0f3a45c16e9080b8f3a2d8ac7efb6bc379aaeb71

Hmmm . . certainly fixes the Ethernet static IPv4 setup . . But (!)

Now can’t get a connection to https://my.farm.bot
Have to go away for a few hours now but will try to debug some more later. Here’s a snip of the first boot Logger logs :slight_smile:

01:49:07.584 [info] Beginning Bootstrap authorization: [my email] - https://my.farm.bot

01:49:07.597 [info] Child :default of Supervisor :hackney_sup started Pid: #PID<0.3126.0>
Start Call: :hackney_pool.start_link(:default, [name: :default])
Restart: :permanent
Shutdown: 10000
Type: :worker

01:49:07.601 [info] Child of Supervisor :inet_gethost_native_sup started Pid: #PID<0.3128.0>
Start Call: :inet_gethost_native.init([])

01:49:07.601 [info] Child :inet_gethost_native_sup of Supervisor :kernel_safe_sup started Pid: #PID<0.3127.0>
Start Call: :inet_gethost_native.start_link()
Restart: :temporary
Shutdown: 1000
Type: :worker

01:49:07.615 [error] Authorization failed: {:error, :nxdomain}. Trying again 4 more times.

01:49:10.134 [error] Authorization failed: {:error, :nxdomain}. Trying again 3 more times.

01:49:12.651 [error] Authorization failed: {:error, :nxdomain}. Trying again 2 more times.

01:49:15.172 [error] Authorization failed: {:error, :nxdomain}. Trying again 1 more times.

01:49:17.557 [debug] Server not configured yet. Waiting 10_000 ms to try OTA config again.

01:49:17.687 [error] Authorization failed: {:error, :nxdomain}. Trying again 0 more times.

01:49:20.202 [error] Authorization failed: {:error, :nxdomain}

01:49:27.558 [debug] Server not configured yet. Waiting 10_000 ms to try OTA config again.

This is interesting. Nxdomain is a DNS error. Can you try adding 8.8.8.8 to the DNS config?