deutrino's picture

Hello, I'm deploying a Turnkey 16 box (Mattermost) on a provider which doesn't use DHCP, instead they have their users enter static IP information.

This is how my install goes with Turnkey 16. Not sure how much of this is intentional, just describing the process to the best of my recollection.

* the lack of networking isn't mentioned prior to the first reboot

* the lack of networking is first mentioned when selecting to install security updates, which fails and offers a command line to run later (shouldn't the offer to install updates depend on functional networking?)

* when I then select Static IP in the resulting dialog, I get an error which says "failed to find default gateway! (0.0.0.0) unable to perform config." in a confconsole dialog box titled "Error" and the only button being "ok".

* when I select "ok" I'm then dropped back to the choice of static/DHCP again. thus it is not possible to configure static networking on this appliance with confconsole.

This would appear to be a bug, yes?

Forum: 
Jeremy Davis's picture

Yep, it's a bug. In v16.0 we ported Inithooks (along with Confconsole and other custom TurnKey components) from Python2 to Python3, plus deprecated quite a few old libraries that we were providing. We're now relying more on the Python standard library and Debian default packages (as we probably should have been doing ages ago...).

Since initial Core v16.0 release (Confconsole v2.0.1) we have tweaked Confconsole (the bit that allows configuration of the IP address) to better handle the case where a DHCP server isn't available. But we didn't rebuild the previous appliances. TBH, I had in my head that we did that earlier in the release cycle (and so it should have been included in Mattermost) but obviously not...

FWIW, I just double checked the Mattermost manifest and that has Confconsole v2.0.1+4+ga372f91 - so includes some improvements. But the latest from the apt repo is Confconsole v2.0.1+6+ga22afe3 - so not the latest.

Also, we probably still need to tidy it up a bit more...

Jeremy Davis's picture

Thinking about this a little more, because you can't get networking working easily, it's especially a pain...

Whilst it should be resolved in the latest build of Confconsole (although as I say, probably needs some more tweaking), we should probably document the workaround!

So to manually set a static IP, you need to edit /etc/network/interfaces. Vim users will find the pre-installed vim ('vim.tiny') adequate and ready to use. Those unfamiliar with vim are probably better served with 'nano'. I.e.:

nano /etc/network/interfaces

Then to use 192.168.1.200/24 address as an example, with Google Public DNS; set a static IP eth0 like this (auto eth0 line should already be there, replace everything under that):

auto eth0
iface eth0 inet static
    address 192.168.1.200
    netmask 255.255.255.0
    gateway 192.168.1.1
    dns-nameservers 8.8.8.8 8.8.4.4

Then:

ifup eth0

Restarting the networking service might also work too I think, but I haven't checked and I don't have one in front of me right now...

Jeremy Davis's picture

Thinking about this a little more, because you can't get networking working easily, it's especially a pain...

Whilst it should be resolved in the latest build of Confconsole (although as I say, probably needs some more tweaking), we should probably document the workaround!

So to manually set a static IP, you need to edit /etc/network/interfaces. Vim users will find the pre-installed vim ('vim.tiny') adequate and ready to use. Those unfamiliar with vim are probably better served with 'nano'. I.e.:

nano /etc/network/interfaces

Then to use 192.168.1.200/24 address as an example, with Google Public DNS; set a static IP eth0 like this (auto eth0 line should already be there, replace everything under that):

auto eth0
iface eth0 inet static
    address 192.168.1.200
    netmask 255.255.255.0
    gateway 192.168.1.1
    dns-nameservers 8.8.8.8 8.8.4.4

Then:

ifup eth0

Restarting the networking service might also work too I think, but I haven't checked and I don't have one in front of me right now...

deutrino's picture

Thanks, I've gotten it working. If I deploy another Turnkey appliance at this provider and it's still a problem, I'll update this thread.

Add new comment