Easy Install guide not working

I try to insall using the Easy Install, but the installation is not completed. Got this error:

Traceback (most recent call last):
  File "install.py", line 413, 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 327, in run_playbook
    success = subprocess.check_call(args, cwd=os.path.join(cwd, 'playbooks'))
  File "/usr/lib/python2.7/subprocess.py", line 190, 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=pblt']' returned non-zero exit status 2

A search on the above turned up a few threads with clues to inform you for eg. Re: Install error | ‘--become-user frappe’ returned non-zero exit status 2

and no solution in the thread. So which installation guide that is really works? I am so stress now. Both manual and easy install end up with problems.

I guess some more detail about your scenario & the exact command you have used fro running the script may be helpful to identify your problem and likewise propose solutions.

i. e. I always ran into the '--become', '--become-user=xyz' problem when I did not use the --container switch running the script while I was trying to install inside an LXC/LXD container.

I think there is a problem with the v12…no matter what type of installation you choose, it will end up with the same errors.

This is error i got follow the manual installations:

Traceback (most recent call last):
  File "/home/erpnextuser/frappe-bench/env/lib/python3.6/site-packages/redis/connection.py", line 484, in connect
    sock = self._connect()
  File "/home/erpnextuser/frappe-bench/env/lib/python3.6/site-packages/redis/connection.py", line 541, in _connect
    raise err
  File "/home/erpnextuser/frappe-bench/env/lib/python3.6/site-packages/redis/connection.py", line 529, in _connect
    sock.connect(socket_address)
ConnectionRefusedError: [Errno 111] Connection refused

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/erpnextuser/frappe-bench/env/lib/python3.6/site-packages/redis/client.py", line 2879, in execute
    return execute(conn, stack, raise_on_error)
  File "/home/erpnextuser/frappe-bench/env/lib/python3.6/site-packages/redis/client.py", line 2749, in _execute_transaction
    connection.send_packed_command(all_cmds)
  File "/home/erpnextuser/frappe-bench/env/lib/python3.6/site-packages/redis/connection.py", line 585, in send_packed_command
    self.connect()
  File "/home/erpnextuser/frappe-bench/env/lib/python3.6/site-packages/redis/connection.py", line 489, in connect
    raise ConnectionError(self._error_message(e))
redis.exceptions.ConnectionError: Error 111 connecting to localhost:11000. Connection refused.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/erpnextuser/frappe-bench/env/lib/python3.6/site-packages/redis/connection.py", line 484, in connect
    sock = self._connect()
  File "/home/erpnextuser/frappe-bench/env/lib/python3.6/site-packages/redis/connection.py", line 541, in _connect
    raise err
  File "/home/erpnextuser/frappe-bench/env/lib/python3.6/site-packages/redis/connection.py", line 529, in _connect
    sock.connect(socket_address)
ConnectionRefusedError: [Errno 111] Connection refused

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3.6/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/usr/lib/python3.6/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/home/erpnextuser/frappe-bench/apps/frappe/frappe/utils/bench_helper.py", line 97, in <module>
    main()
  File "/home/erpnextuser/frappe-bench/apps/frappe/frappe/utils/bench_helper.py", line 18, in main
    click.Group(commands=commands)(prog_name='bench')
  File "/home/erpnextuser/frappe-bench/env/lib/python3.6/site-packages/click/core.py", line 764, in __call__
    return self.main(*args, **kwargs)
  File "/home/erpnextuser/frappe-bench/env/lib/python3.6/site-packages/click/core.py", line 717, in main
    rv = self.invoke(ctx)
  File "/home/erpnextuser/frappe-bench/env/lib/python3.6/site-packages/click/core.py", line 1137, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/erpnextuser/frappe-bench/env/lib/python3.6/site-packages/click/core.py", line 1137, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/erpnextuser/frappe-bench/env/lib/python3.6/site-packages/click/core.py", line 956, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/erpnextuser/frappe-bench/env/lib/python3.6/site-packages/click/core.py", line 555, in invoke
    return callback(*args, **kwargs)
  File "/home/erpnextuser/frappe-bench/apps/frappe/frappe/commands/site.py", line 32, in new_site
    db_type=db_type)
  File "/home/erpnextuser/frappe-bench/apps/frappe/frappe/commands/site.py", line 73, in _new_site
    _install_app(app, verbose=verbose, set_as_patched=not source_sql)
  File "/home/erpnextuser/frappe-bench/apps/frappe/frappe/installer.py", line 92, in install_app
    frappe.get_attr(after_install)()
  File "/home/erpnextuser/frappe-bench/apps/frappe/frappe/utils/install.py", line 19, in after_install
    install_basic_docs()
  File "/home/erpnextuser/frappe-bench/apps/frappe/frappe/utils/install.py", line 77, in install_basic_docs
    frappe.get_doc(d).insert()
  File "/home/erpnextuser/frappe-bench/apps/frappe/frappe/model/document.py", line 259, in insert
    self.run_post_save_methods()
  File "/home/erpnextuser/frappe-bench/apps/frappe/frappe/model/document.py", line 919, in run_post_save_methods
    self.run_method("on_update")
  File "/home/erpnextuser/frappe-bench/apps/frappe/frappe/model/document.py", line 787, in run_method
    out = Document.hook(fn)(self, *args, **kwargs)
  File "/home/erpnextuser/frappe-bench/apps/frappe/frappe/model/document.py", line 1058, in composer
    return composed(self, method, *args, **kwargs)
  File "/home/erpnextuser/frappe-bench/apps/frappe/frappe/model/document.py", line 1041, in runner
    add_to_return_value(self, fn(self, *args, **kwargs))
  File "/home/erpnextuser/frappe-bench/apps/frappe/frappe/model/document.py", line 781, in <lambda>
    fn = lambda self, *args, **kwargs: getattr(self, method)(*args, **kwargs)
  File "/home/erpnextuser/frappe-bench/apps/frappe/frappe/core/doctype/user/user.py", line 93, in on_update
    self.share_with_self()
  File "/home/erpnextuser/frappe-bench/apps/frappe/frappe/core/doctype/user/user.py", line 177, in share_with_self
    flags={"ignore_share_permission": True})
  File "/home/erpnextuser/frappe-bench/apps/frappe/frappe/share.py", line 45, in add
    notify_assignment(user, doctype, name, everyone)
  File "/home/erpnextuser/frappe-bench/apps/frappe/frappe/share.py", line 170, in notify_assignment
    enqueue_create_notification(shared_by, notification_doc)
  File "/home/erpnextuser/frappe-bench/apps/frappe/frappe/desk/doctype/notification_log/notification_log.py", line 38, in enqueue_create_notification
    now=frappe.flags.in_test
  File "/home/erpnextuser/frappe-bench/apps/frappe/frappe/__init__.py", line 1475, in enqueue
    return frappe.utils.background_jobs.enqueue(*args, **kwargs)
  File "/home/erpnextuser/frappe-bench/apps/frappe/frappe/utils/background_jobs.py", line 69, in enqueue
    kwargs=queue_args)
  File "/home/erpnextuser/frappe-bench/env/lib/python3.6/site-packages/rq/queue.py", line 258, in enqueue_call
    job = self.enqueue_job(job, at_front=at_front)
  File "/home/erpnextuser/frappe-bench/env/lib/python3.6/site-packages/rq/queue.py", line 331, in enqueue_job
    pipe.execute()
  File "/home/erpnextuser/frappe-bench/env/lib/python3.6/site-packages/redis/client.py", line 2894, in execute
    return execute(conn, stack, raise_on_error)
  File "/home/erpnextuser/frappe-bench/env/lib/python3.6/site-packages/redis/client.py", line 2749, in _execute_transaction
    connection.send_packed_command(all_cmds)
  File "/home/erpnextuser/frappe-bench/env/lib/python3.6/site-packages/redis/connection.py", line 585, in send_packed_command
    self.connect()
  File "/home/erpnextuser/frappe-bench/env/lib/python3.6/site-packages/redis/connection.py", line 489, in connect
    raise ConnectionError(self._error_message(e))
redis.exceptions.ConnectionError: Error 111 connecting to localhost:11000. Connection refused.

and when you bench start, the page will not load and show

09:29:42 web.1            | ipaddress does not exist
09:29:42 web.1            | ipaddress does not exist
09:29:42 web.1            | ipaddress does not exist

And when you bench update --reset:

Traceback (most recent call last):
  File "/usr/local/bin/bench", line 11, in <module>
    load_entry_point('bench', 'console_scripts', 'bench')()
  File "/home/erpnextuser/bench-repo/bench/cli.py", line 40, in cli
    bench_command()
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 764, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 717, in main
    rv = self.invoke(ctx)
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 1137, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 956, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 555, in invoke
    return callback(*args, **kwargs)
  File "/home/erpnextuser/bench-repo/bench/commands/update.py", line 51, in update
    validate_branch()
  File "/home/erpnextuser/bench-repo/bench/app.py", line 428, in validate_branch
    branch = get_current_branch(app)
  File "/home/erpnextuser/bench-repo/bench/app.py", line 281, in get_current_branch
    return get_cmd_output("basename $(git symbolic-ref -q HEAD)", cwd=repo_dir)
  File "/home/erpnextuser/bench-repo/bench/utils.py", line 370, in get_cmd_output
    output = subprocess.check_output(cmd, cwd=cwd, shell=True, stderr=subprocess.PIPE).strip()
  File "/usr/lib/python2.7/subprocess.py", line 216, in check_output
    process = Popen(stdout=PIPE, *popenargs, **kwargs)
  File "/usr/lib/python2.7/subprocess.py", line 394, in __init__
    errread, errwrite)
  File "/usr/lib/python2.7/subprocess.py", line 1047, in _execute_child
    raise child_exception
OSError: [Errno 2] No such file or directory: './apps/erpnext'

Don’t blame yourself, perhaps invite your boss or workmates to help troubleshoot?

Persistence turns into learning, that we can contribute and pass on - that’s the fundamental premise here

I am learning this by myself. So many similar problems in this forum end up with no solution. I don’t know which to refer anymore.

Hi All,

I think there is something definetly wrong with code cause I managed to follow the steps last month and get a ubuntu 18 vm with erpnext install.

Doing the sames steps this week seems to keep breaking a different points in the install.

Trying that same VM with a bench update and it breaks, so something definetly broken somewhere.

Will keep digging, sorry dont have a solution yet…just raising that there is an issue.

kind regards
Hemant

Yes, agree.

Last 2 weeks i follow the EasyInstall and it was no problem at all. This week all are messed up!

Seems the issue with the easy install in not unconnected with the latest update. Update to 12.1.18 is broken as well. You need to reboot hardware after first install fails for update to work. I’m not a developer so this is just conjecture at this time, but when you tie the timeline of the issues with installations and updates, it seems to make sense.

Please support the bug report. I submitted a bug request for this. Please submit your comments and +1 there.
https://github.com/frappe/erpnext/issues/19486

I am also facing same issue on Ubuntu 16.0.4. Was anyone able to resolve this ?