Issue with permission - bench mariadb

Hello all,

I have installed frappe + bench on a fresh Ubuntu 20.04.
I am almost there, but there are some issues I am not managing to get over. Any help would be appreciated.

I am in a production setup

First issue

frappe@ubuntu:~/frappe-bench$ bench restart
$ sudo supervisorctl restart frappe:
frappe: ERROR (no such group)
frappe: ERROR (no such group)

Second issue

frappe@ubuntu : ~/frappe-bench$ sudo supervisorctl status

Doesn’t return anything ;-(

Third issue:

sudo systemctl status mysql

returns some errors:

Aug 05 20:14:04 ubuntu-s-1vcpu-2gb-education mysqld[1067]: 2020-08-05 20:14:04 0 [Warning] Changed limits: max_open_files: 16364 max_connections: 500 (was 500) table_cache:
Aug 05 20:14:06 ubuntu-s-1vcpu-2gb-education systemd[1]: Started MariaDB 10.3.22 database server.
Aug 05 20:14:06 ubuntu-s-1vcpu-2gb-education /etc/mysql/debian-start[1250]: Upgrading MySQL tables if necessary.
Aug 05 20:14:06 ubuntu-s-1vcpu-2gb-education /etc/mysql/debian-start[1255]: Looking for ‘mysql’ as: /usr/bin/mysql
Aug 05 20:14:06 ubuntu-s-1vcpu-2gb-education /etc/mysql/debian-start[1255]: Looking for ‘mysqlcheck’ as: /usr/bin/mysqlcheck
Aug 05 20:14:06 ubuntu-s-1vcpu-2gb-education /etc/mysql/debian-start[1255]: Version check failed. Got the following error when calling the ‘mysql’ command line client
Aug 05 20:14:06 ubuntu-s-1vcpu-2gb-education /etc/mysql/debian-start[1255]: ERROR 1045 (28000): Access denied for user ‘root’@‘localhost’ (using password: NO)
Aug 05 20:14:06 ubuntu-s-1vcpu-2gb-education /etc/mysql/debian-start[1255]: FATAL ERROR: Upgrade failed
Aug 05 20:14:06 ubuntu-s-1vcpu-2gb-education /etc/mysql/debian-start[1289]: Checking for insecure root accounts.
Aug 05 20:14:06 ubuntu-s-1vcpu-2gb-education debian-start[1294]: ERROR 1045 (28000): Access denied for user ‘root’@‘localhost’ (using password: NO)

Finally the

bench update

finish on the

redis.exceptions.ConnectionError: Error 111 connecting to localhost:11311. Connection refused.

Any help might be greatly appreciated.

Still looking for solutions in the meantime ; -)


Looks like you have a lot of permissions/ownership errors. How did you install, and as whom?
I have created a manual install script for ubuntu16-20+ERPNext12 here which is liberally commented. If you read the comments, you may get some tips on where things go wrong and why

1 Like

Thanks @trentmu,
I will look at your install script. This could work for a new install but doesn’t help me with my problem. I will try to get some ideas from it though.

I install it as a frappe user which has sudo privilege.

It seems like I can make frappe work using

bench start

Which tells me that the server is setup as development although I have run several times already

sudo bench setup production frappe

which I am also confused there…

You should have done the bench init as

sudo bench init…

If you ran it as

bench init

Then it gives subsequent problems.
I sort of remember seeing a post where someone found a way to fix this AFTER the setting up was finished, but I can’t remember who/where

Yes I had tried that earlier, but

sudo bench init

just return
WARN: You should not run this command as root

OK I have solved my issues of permission with this tutorial on DO.
So far, that was the best (most & clear explanations)