How to restart OctoPrint (inside FreeBSD jail)?

What is the problem?

I installed OctoPrint inside my FreeBSD Jail and everything worked great. I have also applied this guide FreeBSD 12.1 Guide with rc.d script to start OctoPrint Automatically and as a Service - Get Help / Guides - OctoPrint Community Forum

The problem now is I couldn't restart OctoPrint using OctoPrint website regardless what command I tried.

What did you already try to solve it?

I install doas (similar but lighter than sudo) and configure to allow octoprint user to restart service without password:

permit nopass octoprint as root cmd /usr/sbin/service args octoprint restart

If I'm inside jail and type command: doas /usr/sbin/service octoprint restart, everything works as expected: OctoPrint stops then starts. But if I use that command through OctoPrint website, OctoPrint stops but doesn't start.

Have you tried running in safe mode?

N/A

Did running in safe mode solve the problem?

N/A

Systeminfo Bundle

browser.user_agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.71 Safari/537.36 Edg/97.0.1072.62
connectivity.connection_check: 1.1.1.1:53
connectivity.connection_ok: True
connectivity.enabled: False
connectivity.online: True
connectivity.resolution_check: octoprint.org
connectivity.resolution_ok: True
env.hardware.cores: 24
env.hardware.freq: unknown
env.hardware.ram: 36461621248
env.os.bits: 64
env.os.id: freebsd
env.os.platform: freebsd13
env.python.pip: 21.1.1
env.python.version: 3.7.12
env.python.virtualenv: True
octoprint.safe_mode: False
octoprint.version: 1.7.3
systeminfo.generator: zipapi

Additional information about your setup

FreeBSD 13.0-RELEASE Jail

My hypothesis is that, through the website, OctoPrint initialize the restart command "in process" (I'm not sure correct term) so when OctoPrint stops, it kills everything so the 2nd part of the command to start OctoPrint is not actually executing. I'm not 100% sure though but I'm looking for some recommendation/workaround (through OctoPrint site).

Thanks

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.