Error at task mariadb : Start and enable service

I run into an error while installing ERPNext 13 afresh using easy install script on a fresh EC2 instance running Ubuntu 20.04. Below are the details of the error. Request your help to resolve this issue.

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-1650303374.0615761-36379-15292890374697 && echo ansible-tmp-1650303374.0615761-36379-15292890374697="` echo /root/.ansible/tmp/ansible-tmp-1650303374.0615761-36379-15292890374697 `" ) && 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-26526xw0tt2ai/tmprmzldlbz TO /root/.ansible/tmp/ansible-tmp-1650303374.0615761-36379-15292890374697/AnsiballZ_systemd.py
<127.0.0.1> EXEC /bin/sh -c 'chmod u+x /root/.ansible/tmp/ansible-tmp-1650303374.0615761-36379-15292890374697/ /root/.ansible/tmp/ansible-tmp-1650303374.0615761-36379-15292890374697/AnsiballZ_systemd.py && sleep 0'
<127.0.0.1> EXEC /bin/sh -c '/usr/bin/python3 /root/.ansible/tmp/ansible-tmp-1650303374.0615761-36379-15292890374697/AnsiballZ_systemd.py && sleep 0'
<127.0.0.1> EXEC /bin/sh -c 'rm -f -r /root/.ansible/tmp/ansible-tmp-1650303374.0615761-36379-15292890374697/ > /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=19   changed=14   unreachable=0    failed=1    skipped=15   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=ubuntu']' returned non-zero exit status 2.

This is resolved by doing the following
sudo apt install mysql-server

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