V11 on CentOS - Got this error during installation. Help!

Running Centos7 on my new server setup. Used easy installation. Any idea how to fix this error?

TASK [bench : python2 bench init for production] *******************************
fatal: [localhost]: FAILED! => {"changed": true, "cmd": ["bench", "init", "/home/skserpnext/frappe-bench", "--frappe-path", "https://github.com/frappe/frappe", "--frappe-branch", "master"], "delta": "0:00:00.256758", "end": "2019-07-22 16:55:40.147768", "msg": "non-zero return code", "rc": 1, "start": "2019-07-22 16:55:39.891010", "stderr": "", "stderr_lines": [], "stdout": "You should not run this command as root", "stdout_lines": ["You should not run this command as root"]}

PLAY RECAP *********************************************************************
localhost                  : ok=61   changed=6    unreachable=0    failed=1    skipped=51   rescued=0    ignored=0   

Traceback (most recent call last):
  File "install.py", line 432, in <module>
    install_bench(args)
  File "install.py", line 128, in install_bench
    run_playbook('site.yml', sudo=True, extra_vars=extra_vars)
  File "install.py", line 344, in run_playbook
    success = subprocess.check_call(args, cwd=os.path.join(cwd, 'playbooks'))
  File "/usr/lib64/python2.7/subprocess.py", line 542, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['ansible-playbook', '-c', 'local', 'site.yml', '-e', '@/tmp/extra_vars.json', '--become', '--become-user=skserpnext']' returned non-zero exit status 2

“You should not run this command as root”??

There seems to be some confusion about installs lately with the easy install script. For a few weeks the only way to install successfully using the easy install script has been to run from root user and specify user profile for the install (created prior to running last mile installation script). I haven’t tried on Centos though as all my attempts have been on Ubuntu.

See this thread for more info:

1 Like

I tried using root user and got a different error this time. Running install.py i used my own user. I had success with Ubuntu but my RAID needs only work in CentOS. Any ideas how to fix this?

TASK [bench : python2 bench init for production] *******************************
fatal: [localhost]: FAILED! => {"changed": true, "cmd": ["bench", "init", "/home/skserpnext/frappe-bench", "--frappe-path", "https://github.com/frappe/frappe", "--frappe-branch"], "delta": "0:00:00.262134", "end": "2019-07-22 21:33:03.944206", "msg": "non-zero return code", "rc": 2, "start": "2019-07-22 21:33:03.682072", "stderr": "Error: --frappe-branch option requires an argument", "stderr_lines": ["Error: --frappe-branch option requires an argument"], "stdout": "", "stdout_lines": []}

PLAY RECAP *********************************************************************
localhost                  : ok=61   changed=6    unreachable=0    failed=1    skipped=51   rescued=0    ignored=0   

Traceback (most recent call last):
  File "install.py", line 416, in <module>
    install_bench(args)
  File "install.py", line 135, in install_bench
    run_playbook('site.yml', sudo=True, extra_vars=extra_vars)
  File "install.py", line 330, in run_playbook
    success = subprocess.check_call(args, cwd=os.path.join(cwd, 'playbooks'))
  File "/usr/lib64/python2.7/subprocess.py", line 542, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['ansible-playbook', '-c', 'local', 'site.yml', '-e', '@/tmp/extra_vars.json', '--become', '--become-user=skserpnext']' returned non-zero exit status 2
HEY! USE SCREEN [root@localhost ~]#