plugins icon indicating copy to clipboard operation
plugins copied to clipboard

ACME client not starting (22.1.6+ w/ /var on tmpfs)

Open YaannnTech opened this issue 4 years ago • 3 comments

The ACME client doesn't start when I change /var to be on tmpfs. The only way to get it going again is to disable, then enable the ACME client in its settings. However, on the next OPNsense reboot, it's red again and I cannot start it until I go through the same sequence described above. This doesn't seem to happen when /var is not in RAM.

I know there's a broader discussion underway about which folders under /var should be allowed to be on tmpfs and which ones shouldn't. I assume this is part of that conversation (i.e. whether /var/etc should be on tmpfs or not).

To Reproduce Steps to reproduce the behavior:

  1. In OPNsense web UI, go to System > Settings > Miscellaneous
  2. Enable "/var RAM disk"
  3. Reboot OPNsense
  4. ACME client will now be in a red state

Expected behavior ACME client should start properly upon OPNsense reboot

Relevant log files I see the following in the system log:

<13>1 2022-05-02T03:01:43-04:00 OPNsense.lan root 65690 - [meta sequenceId="26"] /usr/local/etc/rc.d/acme_http_challenge: WARNING: /var/etc/lighttpd-acme-challenge.conf is not readable.
<13>1 2022-05-02T03:01:43-04:00 OPNsense.lan root 66935 - [meta sequenceId="27"] /usr/local/etc/rc.d/acme_http_challenge: WARNING: failed precmd routine for acme_http_challenge

The file it's complaining about not being able to read has the following permissions:

# ll /var/etc/lighttpd-acme-challenge.conf 
-rw-r--r--  1 root  wheel  2522 May  2 11:34 /var/etc/lighttpd-acme-challenge.conf

When I do get it going again, even though it's green, it still shows the following in the system log:

<147>1 2022-05-02T11:34:53-04:00 OPNsense.lan config 12736 - [meta sequenceId="7"] [2022-05-02T11:34:53-04:00][error] [OPNsense\AcmeClient\AcmeClient:settings.UpdateCron] Related cron not found.{23b7041f-6697-456f-9a42-4bfff087f806}

There is, however, an active cron job scheduled for ACME in the OPNsense web UI cron settings.

Environment

OPNsense 22.1.7_1-amd64 FreeBSD 13.0-STABLE OpenSSL 1.1.1o 3 May 2022 Intel(R) Celeron(R) CPU J3160 @ 1.60GHz (4 cores, 4 threads) Network Intel I211-AT

This was also already observed in 22.1.6 and may have been an issue even in earlier version. I just never tried /var on tmpfs before that.

YaannnTech avatar May 11 '22 15:05 YaannnTech

Thank you for creating an issue. Since the ticket doesn't seem to be using one of our templates, we're marking this issue as low priority until further notice.

For more information about the policies for this repository, please read https://github.com/opnsense/plugins/blob/master/CONTRIBUTING.md for further details.

The easiest option to gain traction is to close this ticket and open a new one using one of our templates.

OPNsense-bot avatar May 11 '22 15:05 OPNsense-bot

Bad bot. I used the provided template and filled in all sections to the best of my ability/knowledge.

YaannnTech avatar May 11 '22 23:05 YaannnTech

No you did not (omitting checkboxes) so I'm going to close it for complaining to a robot.

fichtner avatar May 12 '22 06:05 fichtner