Error at task mariadb : Start and enable service while Installing v13 with easy install

TASK [mariadb : Start and enable service] ***************************************************************************************************************************************************
task path: /tmp/.bench/bench/playbooks/roles/mariadb/tasks/main.yml:60
Running systemd
<127.0.0.1> ESTABLISH LOCAL CONNECTION FOR USER: root
<127.0.0.1> EXEC /bin/sh -c 'echo ~root && sleep 0'
<127.0.0.1> EXEC /bin/sh -c '( umask 77 && mkdir -p "` echo /root/.ansible/tmp `"&& mkdir /root/.ansible/tmp/ansible-tmp-1648496977.4362192-3390-230314876819819 && echo ansible-tmp-1648496977.4362192-3390-230314876819819="` echo /root/.ansible/tmp/ansible-tmp-1648496977.4362192-3390-230314876819819 `" ) && sleep 0'
Using module file /usr/local/lib/python3.8/dist-packages/ansible/modules/system/systemd.py
<127.0.0.1> PUT /root/.ansible/tmp/ansible-local-2644cjw09h7b/tmptle0ux03 TO /root/.ansible/tmp/ansible-tmp-1648496977.4362192-3390-230314876819819/AnsiballZ_systemd.py
<127.0.0.1> EXEC /bin/sh -c 'chmod u+x /root/.ansible/tmp/ansible-tmp-1648496977.4362192-3390-230314876819819/ /root/.ansible/tmp/ansible-tmp-1648496977.4362192-3390-230314876819819/AnsiballZ_systemd.py && sleep 0'
<127.0.0.1> EXEC /bin/sh -c '/usr/bin/python3 /root/.ansible/tmp/ansible-tmp-1648496977.4362192-3390-230314876819819/AnsiballZ_systemd.py && sleep 0'
<127.0.0.1> EXEC /bin/sh -c 'rm -f -r /root/.ansible/tmp/ansible-tmp-1648496977.4362192-3390-230314876819819/ > /dev/null 2>&1 && sleep 0'
fatal: [localhost]: FAILED! => {
"changed": false,
"invocation": {
    "module_args": {
        "daemon_reexec": false,
        "daemon_reload": false,
        "enabled": true,
        "force": null,
        "masked": null,
        "name": "mysql",
        "no_block": false,
        "scope": null,
        "state": "started",
        "user": null
    }
},
"msg": "Could not find the requested service mysql: host"
}

RUNNING HANDLER [mariadb : restart mysql] ***************************************************************************************************************************************************
task path: /tmp/.bench/bench/playbooks/roles/mariadb/handlers/main.yml:2

PLAY RECAP **********************************************************************************************************************************************************************************
localhost                  : ok=18   changed=5    unreachable=0    failed=1    skipped=16   rescued=0    ignored=0

Traceback (most recent call last):
  File "install.py", line 497, in <module>
install_bench(args)
  File "install.py", line 278, in install_bench
run_playbook('site.yml', sudo=True, extra_vars=extra_vars)
  File "install.py", line 413, in run_playbook
success = subprocess.check_call(args, cwd=playbooks_folder, stdout=log_stream, stderr=sys.stderr)
  File "/usr/lib/python3.8/subprocess.py", line 364, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['ansible-playbook', '-c', 'local', 'site.yml', '-vvvv', '-e', '@/tmp/extra_vars.json', '--become', '--become-user=frappe_admin']' returned non-zero exit status 2

Can anybody please help?

Hi,

May we know what is the operating environment? Also, what does mysql -V return, in a terminal ?

Hi Smino,

OS is Ubuntu 20.04

frappe_admin@ip-172-31-40-48:~$ mysql -V
mysql  Ver 15.1 Distrib 10.4.24-MariaDB, for debian-linux-gnu (aarch64) using readline 5.2
frappe_admin@ip-172-31-40-48:~$

It looks like the installer isn’t able to connect with the mariadb server. What command did you use to invoke the Easy Install script?

sudo python3 install.py --production --verbose --user frappe_admin

That loks right. It might be good to review the Easy install docs to make sure all the preliminary steps were taken, and see if the logs give any more details.

https://github.com/frappe/bench/blob/develop/docs/easy_install.md

Also, what is the output of: cat /etc/hosts and if you can log into the mariadb server the output of:

SELECT SUBSTRING_INDEX(USER(), '@', -1) AS ip,  @@hostname as hostname, @@port as port, DATABASE() as current_database;


frappe_admin@ip-172-31-40-48:~$ cat /etc/hosts
127.0.0.1 localhost

# The following lines are desirable for IPv6 capable hosts
::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts
frappe_admin@ip-172-31-40-48:~$

It doesnt allow to login to mysql

frappe_admin@ip-172-31-40-48:~$ mysql
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
frappe_admin@ip-172-31-40-48:~$

Is mariadb running? try ps-A | grep mysql or sudo service mysql status

frappe_admin@ip-172-31-40-48:~$ ps-A | grep mysql or sudo service mysql status
grep: or: No such file or directory
grep: sudo: No such file or directory
grep: service: No such file or directory
grep: mysql: No such file or directory
grep: status: No such file or directory
ps-A: command not found
frappe_admin@ip-172-31-40-48:~$

But cant install mariadb

frappe_admin@ip-172-31-40-48:~$ sudo apt install mariadb-server
[sudo] password for frappe_admin:
Reading package lists... Done
Building dependency tree
Reading state information... Done
mariadb-server is already the newest version (1:10.4.24+maria~focal).
0 upgraded, 0 newly installed, 0 to remove and 4 not upgraded.
frappe_admin@ip-172-31-40-48:~$

Also,

frappe_admin@ip-172-31-40-48:~$ service mysqld start
==== AUTHENTICATING FOR org.freedesktop.systemd1.manage-units ===
Authentication is required to start 'mysqld.service'.
Multiple identities can be used for authentication:
 1.  Ubuntu (ubuntu)
 2.  Vinod Nadar,,, (frappe_admin)
Choose identity to authenticate as (1-2): 2
Password:
==== AUTHENTICATION COMPLETE ===
Failed to start mysqld.service: Unit mysqld.service not found.
frappe_admin@ip-172-31-40-48:~$

Also This,

frappe_admin@ip-172-31-40-48:~$ sudo systemctl start mariadb
Failed to start mariadb.service: Unit mariadb.service not found.
frappe_admin@ip-172-31-40-48:~$ sudo systemctl restart mariadb
Failed to restart mariadb.service: Unit mariadb.service not found.
frappe_admin@ip-172-31-40-48:~$

Just wanted to thank your for your continued assistance :slight_smile:

The command; ps-A | grep mysql
or
sudo service mysql status

also try: netstat | grep mysql

It may be that the Easy Install conflicts with other settings on your server and the manual install given a try instead?

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