Update actions fail on new install

On a new install, I sometimes get an error on cockpit interface. For example I change some setting in openssh and uppon hitting save, I get error, ssh configuration not saved.

Copying the corresponding to terminal in this case I got:

echo ‘{“name”:“sshd”,“props”:{“PasswordAuthentication”:“yes”,“PermitRootLogin”:“yes”,“TCPPort”:“port-nr”,“AllowGroups”:{},“AllowEveryone”:“none”},“type”:“service”}’ | /usr/bin/setsid /usr/bin/sudo /usr/libexec/nethserver/api/system-openssh/update | jq
{
“steps”: 3,
“pid”: 30837,
“args”: “”,
“event”: “nethserver-openssh-save”
}
{
“step”: 1,
“pid”: 30837,
“action”: “S05generic_template_expand”,
“event”: “nethserver-openssh-save”,
“state”: “running”
}
{
“progress”: “0.33”,
“time”: “0.058569”,
“exit”: 0,
“event”: “nethserver-openssh-save”,
“state”: “done”,
“step”: 1,
“pid”: 30837,
“action”: “S05generic_template_expand”
}
{
“step”: 2,
“pid”: 30837,
“action”: “S90adjust-services”,
“event”: “nethserver-openssh-save”,
“state”: “running”
}
{
“progress”: “0.67”,
“time”: “0.173275”,
“exit”: 0,
“event”: “nethserver-openssh-save”,
“state”: “done”,
“step”: 2,
“pid”: 30837,
“action”: “S90adjust-services”
}
{
“step”: 3,
“pid”: 30837,
“action”: “S95firewall-adjust”,
“event”: “nethserver-openssh-save”,
“state”: “running”
}
{
“progress”: “1.00”,
“time”: “0.827903”,
“exit”: 256,
“event”: “nethserver-openssh-save”,
“state”: “done”,
“step”: 3,
“pid”: 30837,
“action”: “S95firewall-adjust”
}
{
“pid”: 30837,
“status”: “failed”,
“event”: “nethserver-openssh-save”
}
{
“type”: “EventError”,
“id”: 1590229814,
“message”: “update_action_failed”
}

How can I correct this?

Although the message indicates that the settings were not saved, in fact they were.

Another example where this happens is when hitting save in threatshield:

echo ‘{“status”:“enabled”,“Url”:“https://github.com/firehol/blocklist-ipsets.git",“Whitelist”:[“someip”,“cidr1”,“cidr2”,“cidr3”],"Categories”:[]}’ | /usr/bin/setsid /usr/bin/sudo /usr/libexec/nethserver/api/nethserver-blacklist/settings/update | jq

Looking in /var/log/messages I see the same error again that I described in my last post, so is there maybe a bug?

May 23 12:44:00 pdc esmith::event[17526]: Compiling /etc/shorewall/maclist…
May 23 12:44:00 pdc esmith::event[17526]: ERROR: No hosts on br0 have the maclist option specified /etc/shorewall/maclist (line 22)
May 23 12:44:00 pdc esmith::event[17526]: Action: /etc/e-smith/events/nethserver-firewall-base-save/S89nethserver-shorewall-restart FAILED: 1 [0.372545]
May 23 12:44:00 pdc systemd: Reloading.
May 23 12:44:00 pdc esmith::event[17526]: [INFO] service lsm is disabled: skipped
May 23 12:44:00 pdc esmith::event[17526]: Action: /etc/e-smith/events/actions/adjust-services SUCCESS [0.153981]
May 23 12:44:00 pdc esmith::event[17526]: Event: nethserver-firewall-base-save FAILED
May 23 12:44:00 pdc esmith::event[17492]: Action: /etc/e-smith/events/nethserver-blacklist-save/S30firewall-adjust FAILED: 1 [0.796236]
May 23 12:44:00 pdc esmith::event[17492]: Event: nethserver-blacklist-save FAILED

Checking in service menu in cockpit indicates shorewall service is running, well until restart. Then shorewall did not come up anymore…

On a sidenote I realized something small missing in my new install in Threatshield (that still exists on my older installation of nethserver). At the bottom where I can select how many rows I want to be displayed I cannot select all anymore, just 10 20 30 40 or 50.

I did some thinking, and as the problem seems to origin from the fact, that I only had one green interface. So I will try now to segment the /24 lan and assign a small /29 lan to the red interface where the router ip is part of this network and a /25 lan that will be assigned to the green network where the nethserver’s ip will be the gateway. I’ll report back if this works :slight_smile:

It works.