Problems running grin-miner in background

Hey there,

here’s my problem. I think I am missing something obvious:

After compiling grin-miner, I can start it without hassle in TUI mode, and it’ll mine happily.
I am connecting to my miner (which is running Linux - Ubuntu 18, to be precise) via ssh, so I must put the process in the background and disown it, so it’ll continue running after I close the ssh connection.

I tried the following approach

  1. Start the miner:

Now the miner starts in TUI mode - working fine.

  1. Stop process and return to command prompt via CTRL-Z.
    Now the process is stopped.
    Running the jobs command yields:
    [1]+ Stopped ./target/release/grin-miner
    As would be expected.
  2. Try to put process into background with bg or bg %<Processnumber>
    Here is where it falls apart. The process doesn’t get put in the background.
    running jobs after this still yields [1]+ Stopped ./target/release/grin-miner.

Running top shows that grin-miner is not doing any work.

Alternative approaches have included something like:
nohup ./target/release/grin-miner &
Which is not working for me aswell, this particular command generates a nohup.out file to which the processes output is printed, which in this case is indicating that it’s shutting down immediately after starting up…

EDIT: ^ This approach, I might add, has worked with most (if not all) other command line mining utilities I’ve used in the past

Am I missing something obvious?
Any advice is greatly appreciated! :smile:

Did you try disabling the TUI via the grin miner config, then retry your steps?
Another option is to use systemd, I have been running grin via it just fine.

1 Like

Disabling the TUI did it for me, thanks!
Wasn’t aware of that option…

I’ll try making it a systemd service too, could be useful.
But for now, nohup ./target/release/grin-miner & works for me :slight_smile: