Swar-Chia-Plot-Manager doesn't work on Ubuntu Server

Swar-Chia-Plot-Manager works correctly on my Ubuntu Desktop, but not Server connected via SSH. It starts correctly, however, the view is showing 0 plots running.

Logs show, that the manager sees 1 job runnig:

2021-05-18 06:00:05 [INFO]: Checking log progress..
2021-05-18 06:00:05 [INFO]: Checking log progress for PID: 9625
2021-05-18 06:00:05 [INFO]: PID still alive: 9625
2021-05-18 06:00:05 [INFO]: Monitoring jobs to start.
2021-05-18 06:00:05 [INFO]: Checking to queue work for job: p91
2021-05-18 06:00:05 [INFO]: Total jobs in phase 1: 1
2021-05-18 06:00:05 [INFO]: Waiting for job stagger, skipping. Next allowable time: 2021-05-18 06:41:02.448893
2021-05-18 06:00:05 [INFO]: Sleeping for 60 seconds.

However, plot logs reveal an error:

Traceback (most recent call last):
  File "/home/chia-blockchain/venv/bin/chia", line 33, in <module>
    sys.exit(load_entry_point('chia-blockchain', 'console_scripts', 'chia')())
  File "/home/chia-blockchain/chia/cmds/chia.py", line 77, in main
    cli()  # pylint: disable=no-value-for-parameter
  File "/home/chia-blockchain/venv/lib/python3.8/site-packages/click/core.py", line 829, in __call__
    return self.main(*args, **kwargs)
  File "/home/chia-blockchain/venv/lib/python3.8/site-packages/click/core.py", line 782, in main
    rv = self.invoke(ctx)
  File "/home/chia-blockchain/venv/lib/python3.8/site-packages/click/core.py", line 1259, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/chia-blockchain/venv/lib/python3.8/site-packages/click/core.py", line 1256, in invoke
    Command.invoke(self, ctx)
  File "/home/chia-blockchain/venv/lib/python3.8/site-packages/click/core.py", line 1066, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/chia-blockchain/venv/lib/python3.8/site-packages/click/core.py", line 610, in invoke
    return callback(*args, **kwargs)
  File "/home/chia-blockchain/venv/lib/python3.8/site-packages/click/decorators.py", line 21, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/home/chia-blockchain/chia/cmds/plots.py", line 34, in plots_cmd
    raise RuntimeError("Please initialize (or migrate) your config directory with 'chia init'")
RuntimeError: Please initialize (or migrate) your config directory with 'chia init'

But when I launch manually “chia init”, everything seems fine:

image

The only thing I noticed is that "/home//.chia/mainnet looks different on my Ubuntu Desktop (where everything works):
image
vs on Server (where error occurs):
image

Any ideas what is wrong? I am completely stuck…

2 Likes

Same problem, though on ubuntu desktop. Did you find a solution?

does it work without Swar’s (just chia plots create …)?

python version? also pip install -r requirements.txt in venv?

All Swar’s does is call “chia plots create…” Swar’s is just a wrapper to control execution timing for the plotter program. And the logs are purely from the Python packages bundled with the Chia blockchain.

If you’re getting exactly the same error as OP, are your keys set up? Either private keys on your machine or public farmer/pool keys as input parameters?

It is not so easy, and in fact, we have found a solution on swar’s github discussion group: it is an issue with user’s permissions. @R6veJ2nes make sure that given user has all permissions to chia and swar folders.

I did give permissions to everyone, but it still wont’t start any plots. The debug.log shows that there should be a plot running and even tells me it’s PID, but there is actually no process with that PID.

Another thing I noticed is that I can only run the manager as “sudo”, otherwise it will give me an error "there is no module called ‘six’ "

Hi,

I’m very new into ubuntu server and has decided to try it just 2 days ago, formerly a full windows person.

For me the problems were

  1. CA folder haven’t been copied yet
  2. Directory permission haven’t set to 0777 on both temp1 temp2 and final drive

Perhaps these could be your issues.

1 Like

Hey, I know I’m a bit late to this thread, but I wanted to clarify a fix for anybody else in the future. This is due to a permission issue with python.

Most likely, one of two things happened.

  1. You launched manager.py as a superuser.
  2. Your current user doesn’t have permissions for correct files.

To fix this issue, you must open the corresponding venv file you made during Swar’s installation as a root user in a terminal window.

Run the following commands.

sudo su
cd /Path to Python virtual environment folder ( python -m venv venv <-- This portion of the installation)
chmod -R 777 .

If these commands were successful, you should run the Python commands without using root. Make sure you are not logged in or set as a root user.

python3 manager.py start

NOT

sudo python3 manager.py start

1 Like