Installing production setup error

Hi,
I am working in ubuntu OS 14.04 and trying to install the production set up for erpnext. I got error like this

fatal: [localhost]: FAILED! => {“changed”: true, “cmd”: [“bench”, “init”, “/home/frappe/frappe-bench”, “–frappe-branch”, “master”], “delta”: “0:00:44.145013”, “end”: “2016-08-01 15:25:54.921869”, “failed”: true, “rc”: 1, “start”: “2016-08-01 15:25:10.776856”, “stderr”: “fatal: unable to access ‘GitHub - frappe/python-pdfkit: Wkhtmltopdf python wrapper to convert html to pdf’: Could not resolve host: github.com\nCommand "git clone -q GitHub - frappe/python-pdfkit: Wkhtmltopdf python wrapper to convert html to pdf /home/frappe/frappe-bench/env/src/pdfkit" failed with error code 128 in None\nTraceback (most recent call last):\n File "/usr/local/bin/bench", line 9, in \n load_entry_point(‘bench’, ‘console_scripts’, ‘bench’)()\n File "/home/frappe/.bench/bench/cli.py", line 40, in cli\n bench_command()\n File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 716, in call\n return self.main(*args, **kwargs)\n File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 696, in main\n rv = self.invoke(ctx)\n File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 1060, in invoke\n return _process_result(sub_ctx.command.invoke(sub_ctx))\n File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 889, in invoke\n return ctx.invoke(self.callback, **ctx.params)\n File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 534, in invoke\n return callback(*args, **kwargs)\n File "/home/frappe/.bench/bench/commands/make.py", line 17, in init\n no_auto_update=no_auto_update, frappe_path=frappe_path, frappe_branch=frappe_branch, verbose=verbose)\n File "/home/frappe/.bench/bench/utils.py", line 46, in init\n setup_env(bench_path=path)\n File "/home/frappe/.bench/bench/utils.py", line 97, in setup_env\n exec_cmd(‘./env/bin/pip -q install -e git+https://github.com/frappe/python-pdfkit.git#egg=pdfkit’, cwd=bench_path)\n File "/home/frappe/.bench/bench/utils.py", line 90, in exec_cmd\n raise CommandFailedError(cmd)\nbench.utils.CommandFailedError: ./env/bin/pip -q install -e git+https://github.com/frappe/python-pdfkit.git#egg=pdfkit”, “stdout”: “Already using interpreter /usr/bin/python”, “stdout_lines”: [“Already using interpreter /usr/bin/python”], “warnings”: }
to retry, use: --limit @production/install.retry

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

Traceback (most recent call last):
File “install.py”, line 284, in
install_bench(args)
File “install.py”, line 102, in install_bench
run_playbook(‘production/install.yml’, sudo=True, extra_vars=extra_vars)
File “install.py”, line 234, in run_playbook
success = subprocess.check_call(args, cwd=os.path.join(tmp_bench_repo, ‘playbooks’))
File “/usr/lib/python2.7/subprocess.py”, line 540, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command ‘[‘ansible-playbook’, ‘-c’, ‘local’, ‘production/install.yml’, ‘-e’, ‘@/tmp/extra_vars.json’, ‘–become’, ‘–become-user=frappe’]’ returned non-zero exit status 2

anyone help me how to solve this

1 Like

i am having the same problem

Docs are very bad.

1 Like

I face the same problem and I am on a fresh installation of Ubuntu 16.04.

can you share, nodejs and python version?
sudo nodejs --version
sudo python —version

Hey @komsel2228,

Sorry, I’m using Debian 8.5 and not Ubuntu 16.04. And I am using Python 2.7.9 and nodeJS 6.5.0.

if you run the installation script those are being defined there, so … could they practically be wrong?

@Racer_Aravind

I have the same error and have seen there comes a suggestion in the error message

to retry, use: --limit @production/install.retry

(which I haven’t had the time to try out yet, did you? what happened?

I tried:

sudo python install.py --limit @production/install.retry

and it doesn’t look like a valid command. Any idea what the right syntax is, to do that?

1 Like

Having the same issue on a brand new droplet running 16.04

TASK [install bench] ***********************************************************
changed: [localhost]

TASK [Check whether bench exists] **********************************************
ok: [localhost]

TASK [init bench] **************************************************************
fatal: [localhost]: FAILED! => {"changed": true, "cmd": ["bench", "init", "/home/frappe/frappe-bench", "--frappe-branch", "develop"], "delta": "0:00:19.480817", "end": "2016-10-02 17:20:57.866078", "failed": true, "rc": 1, "start": "2016-10-02 17:20:38.385261", "stderr": "INFO:bench.app:getting app frappe\nCloning into 'frappe'...\nINFO:bench.app:installing frappe\nException:\nTraceback (most recent call last):\n  File \"/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/pip/basecommand.py\", line 215, in main\n    status = self.run(options, args)\n  File \"/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/pip/commands/install.py\", line 310, in run\n    wb.build(autobuilding=True)\n  File \"/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/pip/wheel.py\", line 750, in build\n    self.requirement_set.prepare_files(self.finder)\n  File \"/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/pip/req/req_set.py\", line 370, in prepare_files\n    ignore_dependencies=self.ignore_dependencies))\n  File \"/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/pip/req/req_set.py\", line 587, in _prepare_file\n    session=self.session, hashes=hashes)\n  File \"/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/pip/download.py\", line 810, in unpack_url\n    hashes=hashes\n  File \"/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/pip/download.py\", line 649, in unpack_http_url\n    hashes)\n  File \"/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/pip/download.py\", line 871, in _download_http_url\n    _download_url(resp, link, content_file, hashes)\n  File \"/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/pip/download.py\", line 595, in _download_url\n    hashes.check_against_chunks(downloaded_chunks)\n  File \"/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/pip/utils/hashes.py\", line 46, in check_against_chunks\n    for chunk in chunks:\n  File \"/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/pip/download.py\", line 563, in written_chunks\n    for chunk in chunks:\n  File \"/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/pip/download.py\", line 552, in resp_read\n    decode_content=False):\n  File \"/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/response.py\", line 353, in stream\n    data = self.read(amt=amt, decode_content=decode_content)\n  File \"/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/response.py\", line 310, in read\n    data = self._fp.read(amt)\n  File \"/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/pip/_vendor/cachecontrol/filewrapper.py\", line 54, in read\n    self.__callback(self.__buf.getvalue())\n  File \"/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/pip/_vendor/cachecontrol/controller.py\", line 275, in cache_response\n    self.serializer.dumps(request, response, body=body),\n  File \"/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/pip/_vendor/cachecontrol/serialize.py\", line 87, in dumps\n    ).encode(\"utf8\"),\nMemoryError\nTraceback (most recent call last):\n  File \"/usr/local/bin/bench\", line 11, in <module>\n    load_entry_point('bench', 'console_scripts', 'bench')()\n  File \"/home/frappe/.bench/bench/cli.py\", line 40, in cli\n    bench_command()\n  File \"/usr/local/lib/python2.7/dist-packages/click/core.py\", line 716, in __call__\n    return self.main(*args, **kwargs)\n  File \"/usr/local/lib/python2.7/dist-packages/click/core.py\", line 696, in main\n    rv = self.invoke(ctx)\n  File \"/usr/local/lib/python2.7/dist-packages/click/core.py\", line 1060, in invoke\n    return _process_result(sub_ctx.command.invoke(sub_ctx))\n  File \"/usr/local/lib/python2.7/dist-packages/click/core.py\", line 889, in invoke\n    return ctx.invoke(self.callback, **ctx.params)\n  File \"/usr/local/lib/python2.7/dist-packages/click/core.py\", line 534, in invoke\n    return callback(*args, **kwargs)\n  File \"/home/frappe/.bench/bench/commands/make.py\", line 19, in init\n    verbose=verbose, clone_from=clone_from)\n  File \"/home/frappe/.bench/bench/utils.py\", line 56, in init\n    get_app(frappe_path, branch=frappe_branch, bench_path=path, build_asset_files=False, verbose=verbose)\n  File \"/home/frappe/.bench/bench/app.py\", line 73, in get_app\n    install_app(app=app_name, bench_path=bench_path, verbose=verbose)\n  File \"/home/frappe/.bench/bench/app.py\", line 103, in install_app\n    find_links=find_links))\n  File \"/home/frappe/.bench/bench/utils.py\", line 127, in exec_cmd\n    raise CommandFailedError(cmd)\nbench.utils.CommandFailedError: /home/frappe/frappe-bench/env/bin/pip install -q  -e /home/frappe/frappe-bench/apps/frappe", "stdout": "Already using interpreter /usr/bin/python\ninstalling frappe", "stdout_lines": ["Already using interpreter /usr/bin/python", "installing frappe"], "warnings": []}
        to retry, use: --limit @develop/install.retry

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

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

I think its ridiculous that there is no proper fix to this issue, if anyone of you has figured it out please share

2 Likes

Any updates on @Installing production setup error.

In the last year? Yes numerous updates and fixes :slight_smile:

Welcome back - best thing to do is run an update and see what happens?