frappe / bench

CLI to manage Multi-tenant deployments for Frappe apps
https://frappeframework.com/docs/user/en/bench
GNU General Public License v3.0
1.36k stars 1.19k forks source link

Error with install.py at [init bench] error code 1 in /tmp/pip-build-293dwu/python-ldap #321

Closed mgaerber closed 7 years ago

mgaerber commented 7 years ago

I ran wget https://raw.githubusercontent.com/frappe/bench/master/playbooks/install.py as root with: python install.py --develop --user frappe

stops at ` TASK [init bench] ** fatal: [localhost]: FAILED! => {"changed": true, "cmd": ["bench", "init", "/home/frappe/frappe-bench", "--frappe-branch", "develop"], "delta": "0:01:40.069845", "end": "2016-10-02 13:23:42.872078", "failed": true, "rc": 1, "start": "2016-10-02 13:22:02.802233", "stderr": "INFO:bench.app:getting app frappe\nCloning into 'frappe'...\nINFO:bench.app:installing frappe\nCommand \"/home/frappe/frappe-bench/env/bin/python -u -c \"import setuptools, tokenize;file='/tmp/pip-build-293dwu/python-ldap/setup.py';exec(compile(getattr(tokenize, 'open', open)(file).read().replace('\r\n', '\n'), file, 'exec'))\" install --record /tmp/pip-s_SuG0-record/install-record.txt --single-version-externally-managed --compile --install-headers /home/frappe/frappe-bench/env/include/site/python2.7/python-ldap\" failed with error code 1 in /tmp/pip-build-293dwu/python-ldap/\nTraceback (most recent call last):\n File \"/usr/local/bin/bench\", line 11, 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 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=30 changed=17 unreachable=0 failed=1

Traceback (most recent call last): File "install.py", line 349, in 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 540, 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 `

karlis-dreizis commented 7 years ago

You might have missing dependencies http://stackoverflow.com/questions/4768446/i-cant-install-python-ldap sudo apt-get install libsasl2-dev python-dev libldap2-dev libssl-dev

mgaerber commented 7 years ago

Thanks, brings me one step further. Now install is successful but when I run bench start, I get (on Debian 8)

14:26:25 redis_cache.1 | [20055] 04 Oct 14:26:25.707 # Server started, Redis version 2.8.17 14:26:25 redis_cache.1 | [20055] 04 Oct 14:26:25.707 # WARNING overcommit_memory is set to 0! Background save may fail under low memory condition. To fix this issue add 'vm.overcommit_memory = 1' to /etc/sysctl.conf and then reboot or run the command 'sysctl vm.overcommit_memory=1' for this to take effect. 14:26:25 redis_cache.1 | [20055] 04 Oct 14:26:25.707 * The server is now ready to accept connections on port 13000 14:26:26 schedule.1 | Usage: bench [OPTIONS] COMMAND [ARGS]... 14:26:26 schedule.1 | 14:26:26 schedule.1 | Error: No such command "schedule". 14:26:26 watch.1 | Usage: bench [OPTIONS] COMMAND [ARGS]... 14:26:26 watch.1 | 14:26:26 watch.1 | Error: No such command "watch". 14:26:26 web.1 | Usage: bench [OPTIONS] COMMAND [ARGS]... 14:26:26 web.1 | 14:26:26 web.1 | Error: No such command "serve". 14:26:26 system | schedule.1 stopped (rc=2) 14:26:26 system | sending SIGTERM to redis_socketio.1 (pid 20021) 14:26:26 system | sending SIGTERM to worker_long.1 (pid 20025) 14:26:26 system | sending SIGTERM to watch.1 (pid 20029)

vjFaLk commented 7 years ago

@mgaerber Just run ./env/bin pip install -e ./apps/frappe from the frappe-bench folder.