Error with clean installation

Hi!

I have a problem with clean installation of erpnext, I’m trying to install on Ubuntu 16.04, but doesn’t work (with --develop flag)…console throws me:

TASK [Set root Password] *******************************************************
fatal: [localhost]: FAILED! => {"changed": true, "cmd": ["mysqladmin", "-u", "root", "password", "1234"], "delta": "0:00:00.046958", "end": "2016-09-02 16:16:08.796867", "failed": true, "rc": 1, "start": "2016-09-02 16:16:08.749909", "stderr": "\u0007mysqladmin: connect to server at 'localhost' failed\nerror: 'Access denied for user 'root'@'localhost' (using password: NO)'", "stdout": "", "stdout_lines": [], "warnings": []}
...ignoring

TASK [add launchagents folder mac] *********************************************
skipping: [localhost]

TASK [add mysql to mac startup] ************************************************
skipping: [localhost]

TASK [stop mysql mac] **********************************************************
skipping: [localhost]

TASK [start mysql mac] *********************************************************
skipping: [localhost]

TASK [debug] *******************************************************************
ok: [localhost] => {
    "run_travis": false
}

TASK [include] *****************************************************************
included: /tmp/.bench/playbooks/develop/includes/setup_bench.yml for localhost

TASK [Check if /tmp/.bench exists] *********************************************
ok: [localhost]

TASK [Check if bench_repo_path exists] *****************************************
ok: [localhost]

TASK [move /tmp/.bench if it exists] *******************************************
skipping: [localhost]

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

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

TASK [init bench] **************************************************************
skipping: [localhost]

TASK [setup config] ************************************************************
ok: [localhost]

TASK [install frappe app] ******************************************************
ok: [localhost]

TASK [include] *****************************************************************
included: /tmp/.bench/playbooks/develop/includes/setup_dev_env.yml for localhost

TASK [setup procfile] **********************************************************
fatal: [localhost]: FAILED! => {"changed": true, "cmd": ["bench", "setup", "socketio"], "delta": "0:00:08.498974", "end": "2016-09-02 16:16:23.033823", "failed": true, "rc": 1, "start": "2016-09-02 16:16:14.534849", "stderr": "npm ERR! Linux 4.4.0-36-generic\nnpm ERR! argv \"/usr/bin/nodejs\" \"/usr/bin/npm\" \"install\" \"socket.io\" \"redis\" \"express\" \"superagent\" \"cookie\"\nnpm ERR! node v6.5.0\nnpm ERR! npm  v3.10.3\nnpm ERR! path /home/ironsistem/.npm/proxy-addr/1.1.2\nnpm ERR! code EACCES\nnpm ERR! errno -13\nnpm ERR! syscall mkdir\n\nnpm ERR! Error: EACCES: permission denied, mkdir '/home/ironsistem/.npm/proxy-addr/1.1.2'\nnpm ERR!     at Error (native)\nnpm ERR!  { Error: EACCES: permission denied, mkdir '/home/ironsistem/.npm/proxy-addr/1.1.2'\nnpm ERR!     at Error (native)\nnpm ERR!   errno: -13,\nnpm ERR!   code: 'EACCES',\nnpm ERR!   syscall: 'mkdir',\nnpm ERR!   path: '/home/ironsistem/.npm/proxy-addr/1.1.2',\nnpm ERR!   parent: 'express' }\nnpm ERR! \nnpm ERR! Please try running this command again as root/Administrator.\n\nnpm ERR! Please include the following file with any support request:\nnpm ERR!     /home/ironsistem/frappe-bench/npm-debug.log\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/ironsistem/.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 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/ironsistem/.bench/bench/commands/setup.py\", line 98, in setup_socketio\n    setup_socketio()\n  File \"/home/ironsistem/.bench/bench/utils.py\", line 137, in setup_socketio\n    exec_cmd(\"npm install socket.io redis express superagent cookie\", cwd=bench_path)\n  File \"/home/ironsistem/.bench/bench/utils.py\", line 127, in exec_cmd\n    raise CommandFailedError(cmd)\nbench.utils.CommandFailedError: npm install socket.io redis express superagent cookie", "stdout": "", "stdout_lines": [], "warnings": []}
	to retry, use: --limit @develop/install.retry

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

Traceback (most recent call last):
  File "install.py", line 342, 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 292, 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=ironsistem']' returned non-zero exit status 2

Anyone can help me to solve this?

Another question… how to install a private repo of ERPNEXT with my changes on a fresh installation?, I don’t want the official repo.

Thanx!!

Read this thread, might be similar issue.
https://discuss.frappe.io/t/solved-v6-upgrade-errors/7282

@aarondiazr

In above case, I can see that the error happened since node was not able to install pre-requisites for socket-io on your machine. You might try re-running the script to see if node installs socket-io or else you can try running bench setup socketio from frappe-bench folder.

To install private repo you will have to do following,

1. bench get-app erpnext <path_to_your_github_erpnext_repo>
2. bench --site <site_name> install-app erpnext
1 Like

My solution was execute “setup.py” in a new user named frappe, mi default user or root doesn’t work with this script.

Thanx for your help and instructions to install my custom repo :slight_smile: