Skip to content
This repository has been archived by the owner on Dec 31, 2022. It is now read-only.

SystemD Support #34

Open
pcfreak30 opened this issue Jun 21, 2021 · 5 comments
Open

SystemD Support #34

pcfreak30 opened this issue Jun 21, 2021 · 5 comments
Labels
bug Something isn't working

Comments

@pcfreak30
Copy link

For deb/rpm systemd support would be nice.

Here is a starting point:

[Unit]
Description=Chia Farmr Monitor
After=network.target
StartLimitIntervalSec=0
[Service]
User=root
Type=simple
Restart=always
RestartSec=1
ExecStart=/usr/bin/farmr
[Install]
WantedBy=multi-user.target
@gilnobrega
Copy link
Owner

gilnobrega commented Jun 21, 2021

Hey, this has been in the repo for some days now (https://github.com/joaquimguimaraes/farmr/blob/main/.github/workflows/farmr.service), and it's included as a user service in the .deb, .rpm packages in v1.4.1
I will be writing documentation on how to enable it.
systemctl --user enable farmr

@babafgd
Copy link

babafgd commented Jul 13, 2021

Hi,
it seams the service is not installed anymore when doing apt install :(

@Feromrk
Copy link

Feromrk commented Jul 24, 2021

I just installed v1.6.1 on my rpi4 with sudo apt install ./farmr-ubuntu-aarch64.deb and could enable it with systemctl --user enable farmr. Don't forget to start it aswell with systemctl --user start farmr.

Also important: execute sudo loginctl enable-linger $USER once, as the --user flag tells systemd to use user units (which work by default only if the user is logged in). More about it here: https://wiki.ubuntuusers.de/systemd/User_Units/

@gilnobrega gilnobrega pinned this issue Oct 4, 2021
@Knight1
Copy link

Knight1 commented Oct 31, 2021

Big Problem is that the farmr service does not wait for the harvester to start and just crashes.

● farmr.service - farmr
     Loaded: loaded (/etc/xdg/systemd/user/farmr.service; enabled; vendor preset: enabled)
     Active: failed (Result: exit-code) since Sun 2021-10-31 00:16:30 UTC; 3h 4min ago
    Process: 1810 ExecStart=/usr/bin/farmr headless (code=exited, status=255/EXCEPTION)
   Main PID: 1810 (code=exited, status=255/EXCEPTION)

Oct 31 00:16:19 chia-farmer systemd[1803]: Started farmr.
Oct 31 00:16:19 chia-farmer farmr[1810]: Unable to detect running chia farming/harvesting service.
Oct 31 00:16:29 chia-farmer farmr[1810]: Unhandled exception:
Oct 31 00:16:29 chia-farmer farmr[1810]: Exception: Unable to detect running chia farming/harvesting service.
Oct 31 00:16:29 chia-farmer farmr[1810]: #0      Blockchain.initializePorts (package:farmr_client/blockchain.dart:211)
Oct 31 00:16:29 chia-farmer farmr[1810]: <asynchronous suspension>
Oct 31 00:16:29 chia-farmer farmr[1810]: #1      main (file:///home/runner/work/farmr/farmr/farmr.dart:167)
Oct 31 00:16:29 chia-farmer farmr[1810]: <asynchronous suspension>
Oct 31 00:16:30 chia-farmer systemd[1803]: farmr.service: Main process exited, code=exited, status=255/EXCEPTION
Oct 31 00:16:30 chia-farmer systemd[1803]: farmr.service: Failed with result 'exit-code'.

@gilnobrega gilnobrega added the bug Something isn't working label Nov 1, 2021
@gilnobrega
Copy link
Owner

Yup I gotta fix that, it didnt happen before
thanks for reporting it!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants