Installation Error on Centos 7.4

Hi @Leonardo_Augusto

Thanks for your suggestion. I tried it but still the same result

Hi @codingCoffee

I’m wondering if the repo-url flag actually worked as I didn’t notice any difference in the full trace

Is there supposed to be any visible difference?

Thanks

Hi @wale, I had made changes (create_user.yml was made executable) in the particular branch, and I expected it to make a difference, but it didn’t. Just give me some time. I’ll get back to you on this issue, on this same thread.

Hi @codingCoffee

Thanks a lot for looking into this. What I wanted to know was if we’re sure that the install script actually pulled from your repo. Will await your update

Kind regards,

Hi @codingCoffee

I was able to get past the initial error by making the ansible-playbooks file executable but now I’m encountering the error below:

TASK [swap : Turn swap on] *****************************************************
fatal: [localhost]: FAILED! => {"changed": true, "cmd": ["swapon", "-a"], "delta": "0:00:00.019014", "end": "2018-04-18 09:52:54.775507", "msg": "non-zero return code", "rc": 255, "start": "2018-04-18 09:52:54.756493", "stderr": "swapon: /extraswap: insecure permissions 0644, 0600 suggested.\nswapon: /extraswap: swapon failed: Operation not permitted", "stderr_lines": ["swapon: /extraswap: insecure permissions 0644, 0600 suggested.", "swapon: /extraswap: swapon failed: Operation not permitted"], "stdout": "", "stdout_lines": []}
        to retry, use: --limit @/tmp/.bench/playbooks/site.retry

PLAY RECAP *********************************************************************
localhost                  : ok=8    changed=5    unreachable=0    failed=1

Traceback (most recent call last):
  File "install.py", line 417, in <module>
    install_bench(args)
  File "install.py", line 122, in install_bench
    run_playbook('site.yml', sudo=True, extra_vars=extra_vars)
  File "install.py", line 338, 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=frappe']' returned non-zero exit status 2

How to proceed? Please assist

Thanks

I tried updating the permissions for the swapfile as suggested but still encountered the error below:

TASK [swap : Turn swap on] *****************************************************
fatal: [localhost]: FAILED! => {"changed": true, "cmd": ["swapon", "-a"], "delta": "0:00:00.003422", "end": "2018-04-18 10:22:18.546557", "msg": "non-zero return code", "rc": 255, "start": "2018-04-18 10:22:18.543135", "stderr": "swapon: /extraswap: swapon failed: Operation not permitted", "stderr_lines": ["swapon: /extraswap: swapon failed: Operation not permitted"], "stdout": "", "stdout_lines": []}
        to retry, use: --limit @/tmp/.bench/playbooks/site.retry

PLAY RECAP *********************************************************************
localhost                  : ok=8    changed=3    unreachable=0    failed=1

Traceback (most recent call last):
  File "install.py", line 417, in <module>
    install_bench(args)
  File "install.py", line 122, in install_bench
    run_playbook('site.yml', sudo=True, extra_vars=extra_vars)
  File "install.py", line 338, 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=frappe']' returned non-zero exit status 2

@codingCoffee any idea how to get around this please? Swap on / Swap off seems to be disabled (even for root) on this server

Thanks

By the way, I also noticed some warnings earlier on:

 [WARNING]: Unable to parse /etc/ansible/hosts as an inventory source

 [WARNING]: No inventory was parsed, only implicit localhost is available

 [WARNING]: provided hosts list is empty, only localhost is available. Note
that the implicit localhost does not match 'all'

Hope these are not critical

Thanks

Hi @wale yes the warnings are harmless.

In case you the swap error, can you try executing this:

swapon -a

as the root user, on the failed sever and tell me if it works

Hi @codingCoffee

Thanks for your response. Here’s the output:

swapon: /extraswap: swapon failed: Operation not permitted

Hi @codingCoffee

Apparently, this is a known issue with openvps. Is there any way of making this task optional when it is not permitted?

Thanks

Hi @codingCoffee

I got past the swap issue by following the suggestion in the thread below:

Now I’m encountering the following error:

TASK [frappe_selinux : Check enabled SELinux modules] **************************
fatal: [localhost]: FAILED! => {"changed": true, "cmd": "semanage module -l", "delta": "0:00:01.684212", "end": "2018-04-19 09:38:36.310557", "msg": "non-zero return code", "rc": 1, "start": "2018-04-19 09:38:34.626345", "stderr": "ValueError: SELinux policy is not managed or store cannot be accessed.", "stderr_lines": ["ValueError: SELinux policy is not managed or store cannot be accessed."], "stdout": "", "stdout_lines": []}
        to retry, use: --limit @/tmp/.bench/playbooks/site.retry

PLAY RECAP *********************************************************************
localhost                  : ok=8    changed=1    unreachable=0    failed=1

Traceback (most recent call last):
  File "install.py", line 417, in <module>
    install_bench(args)
  File "install.py", line 122, in install_bench
    run_playbook('site.yml', sudo=True, extra_vars=extra_vars)
  File "install.py", line 338, 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=frappe']' returned non-zero exit status 2

Please advise

Thanks

Which OS you are using

Hi @saurabh6790

It’s CentOS 7

Seems kernel not supporting SELinux.

please share output for uname -rv

Hi @saurabh6790

Please find output below:

2.6.32-042stab113.21 #1 SMP Wed Mar 23 11:05:25 MSK 2016

@wale are you using openvz ??

Hi @codingCoffee

Yes, that is correct

There are a few problems with using the install scripts on container based virtualizations like docker, openvz etc. For example even after you’re able to get it installed you might face an ENOSPC error,

Its best to install manually on them, for now! Or better yet, use a VM. We don’t yet completely support container based virtualization. However you can try it out, and if you can find and fix all the problems send PRs for the same :slight_smile:

And I now realized why swapon was failing. A container based environment is not true virtualization. Hence it cannot modify the kernel level stuff. For example in the above mentioned link, ENOSPC cannot be fixed from inside the container. The changes need to be made on the host machine. Same goes for swap on, you have to create swap area on the host machine and link it inside somehow. Same goes for SE Linux. All these are kernel parameters and cannot be modified from inside the container based environment.

However I still don’t know why creation of user was failing.
Also maybe next time mention that you’re using a conainer based system :wink:

2 Likes

Hi @codingCoffee

Didn’t even know this myself till now! I just found out it’s openvz based on troubleshooting I was doing today

I’ll consider my options and take a decision later today. Thanks a lot for all your kind assistance

Cheers!