Error installation at adding site

Hi I used ubuntu 17.04 and installing erpnext using manual installation, I follow up the procedure on https://github.com/frappe/bench. everything is find 'till “add a site” section, I’m using the same code and the result is like this

bench new-site site1.local
INFO:bench.utils:creating new site site1.local
frappe app is not installed. Run the following command to install frappe
bench get-app https://github.com/frappe/frappe.git
INFO:bench.utils:/home/frappe/env/bin/frappe site1.local --install 1bd3e0294d
Traceback (most recent call last):
File “/usr/local/bin/bench”, line 11, in
load_entry_point(‘bench’, ‘console_scripts’, ‘bench’)()
File “/home/frappe/bench-repo/bench/cli.py”, line 40, in cli
bench_command()
File “/home/frappe/.local/lib/python2.7/site-packages/click/core.py”, line 722, in call
return self.main(*args, **kwargs)
File “/home/frappe/.local/lib/python2.7/site-packages/click/core.py”, line 697, in main
rv = self.invoke(ctx)
File “/home/frappe/.local/lib/python2.7/site-packages/click/core.py”, line 1066, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/home/frappe/.local/lib/python2.7/site-packages/click/core.py”, line 895, in invoke
return ctx.invoke(self.callback, **ctx.params)
File “/home/frappe/.local/lib/python2.7/site-packages/click/core.py”, line 535, in invoke
return callback(*args, **kwargs)
File “/home/frappe/bench-repo/bench/commands/make.py”, line 58, in new_site
new_site(site, mariadb_root_password=mariadb_root_password, admin_password=admin_password)
File “/home/frappe/bench-repo/bench/utils.py”, line 177, in new_site
), cwd=os.path.join(bench_path, ‘sites’))
File “/home/frappe/bench-repo/bench/utils.py”, line 132, in exec_cmd
p = subprocess.Popen(cmd, cwd=cwd, shell=True, stdout=stdout, stderr=stderr, universal_newlines=True)
File “/usr/lib/python2.7/subprocess.py”, line 390, in init
errread, errwrite)
File “/usr/lib/python2.7/subprocess.py”, line 1025, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory: ‘./sites’

anyone know where the error is?

Inside app folder…What are all the apps available?

@ezraluandre ,
Inside app if frappe and erpnext is not there.
Run
bench get-app [repo-link]
bench get-app https://github.com/frappe/frappe.git

I try to run the command you gave there’s still error saying no such file or directory sites.

bench get-app [repo-link]
INFO:bench.app:getting app [repo-link]
INFO:bench.utils:git clone https://github.com/frappe/[repo-link] --origin upstream
Traceback (most recent call last):
File “/usr/local/bin/bench”, line 11, in
load_entry_point(‘bench’, ‘console_scripts’, ‘bench’)()
File “/home/ezraluandre/bench-repo/bench/cli.py”, line 40, in cli
bench_command()
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 722, in call
return self.main(*args, **kwargs)
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 697, in main
rv = self.invoke(ctx)
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 1066, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 895, in invoke
return ctx.invoke(self.callback, **ctx.params)
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 535, in invoke
return callback(*args, **kwargs)
File “/home/ezraluandre/bench-repo/bench/commands/make.py”, line 32, in get_app
get_app(git_url, branch=branch)
File “/home/ezraluandre/bench-repo/bench/app.py”, line 65, in get_app
cwd=os.path.join(bench_path, ‘apps’))
File “/home/ezraluandre/bench-repo/bench/utils.py”, line 132, in exec_cmd
p = subprocess.Popen(cmd, cwd=cwd, shell=True, stdout=stdout, stderr=stderr, universal_newlines=True)
File “/usr/lib/python2.7/subprocess.py”, line 390, in init
errread, errwrite)
File “/usr/lib/python2.7/subprocess.py”, line 1025, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory: ‘./apps’

when I try using the second command the result is like this

bench get-app https://github.com/frappe/frappe.git
INFO:bench.app:getting app frappe
INFO:bench.utils:git clone https://github.com/frappe/frappe.git --origin upstream
Traceback (most recent call last):
File “/usr/local/bin/bench”, line 11, in
load_entry_point(‘bench’, ‘console_scripts’, ‘bench’)()
File “/home/ezraluandre/bench-repo/bench/cli.py”, line 40, in cli
bench_command()
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 722, in call
return self.main(*args, **kwargs)
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 697, in main
rv = self.invoke(ctx)
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 1066, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 895, in invoke
return ctx.invoke(self.callback, **ctx.params)
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 535, in invoke
return callback(*args, **kwargs)
File “/home/ezraluandre/bench-repo/bench/commands/make.py”, line 32, in get_app
get_app(git_url, branch=branch)
File “/home/ezraluandre/bench-repo/bench/app.py”, line 65, in get_app
cwd=os.path.join(bench_path, ‘apps’))
File “/home/ezraluandre/bench-repo/bench/utils.py”, line 132, in exec_cmd
p = subprocess.Popen(cmd, cwd=cwd, shell=True, stdout=stdout, stderr=stderr, universal_newlines=True)
File “/usr/lib/python2.7/subprocess.py”, line 390, in init
errread, errwrite)
File “/usr/lib/python2.7/subprocess.py”, line 1025, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory: ‘./apps’

still don’t understand why the error shows up

so I missed some point which I should enter the command on frappe-bench. It works!!! but then when I’m going to enter this command “bench new-site site1.local”, It asks for MySQL password which I am sure never ever make and MySQL password before

bench new-site site1.local
MySQL root password:
Traceback (most recent call last):
File “/usr/lib/python2.7/runpy.py”, line 174, in _run_module_as_main
main”, fname, loader, pkg_name)
File “/usr/lib/python2.7/runpy.py”, line 72, in _run_code
exec code in run_globals
File “/home/ezraluandre/frappe-bench/apps/frappe/frappe/utils/bench_helper.py”, line 94, in
main()
File “/home/ezraluandre/frappe-bench/apps/frappe/frappe/utils/bench_helper.py”, line 18, in main
click.Group(commands=commands)(prog_name=‘bench’)
File “/home/ezraluandre/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 722, in call
return self.main(*args, **kwargs)
File “/home/ezraluandre/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 697, in main
rv = self.invoke(ctx)
File “/home/ezraluandre/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 1066, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/home/ezraluandre/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 1066, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/home/ezraluandre/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 895, in invoke
return ctx.invoke(self.callback, **ctx.params)
File “/home/ezraluandre/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 535, in invoke
return callback(*args, **kwargs)
File “/home/ezraluandre/frappe-bench/apps/frappe/frappe/commands/site.py”, line 34, in new_site
verbose=verbose, install_apps=install_app, source_sql=source_sql, force=force)
File “/home/ezraluandre/frappe-bench/apps/frappe/frappe/commands/site.py”, line 65, in _new_site
admin_password=admin_password, verbose=verbose, source_sql=source_sql,force=force, reinstall=reinstall)
File “/home/ezraluandre/frappe-bench/apps/frappe/frappe/installer.py”, line 36, in install_db
create_database_and_user(force, verbose)
File “/home/ezraluandre/frappe-bench/apps/frappe/frappe/installer.py”, line 60, in create_database_and_user
if force or (db_name not in dbman.get_database_list()):
File “/home/ezraluandre/frappe-bench/apps/frappe/frappe/model/db_schema.py”, line 549, in get_database_list
return [d[0] for d in self.db.sql(“SHOW DATABASES”)]
File “/home/ezraluandre/frappe-bench/apps/frappe/frappe/database.py”, line 136, in sql
self.connect()
File “/home/ezraluandre/frappe-bench/apps/frappe/frappe/database.py”, line 86, in connect
charset=‘utf8mb4’, use_unicode = True, conv = conversions)
File “/home/ezraluandre/frappe-bench/env/local/lib/python2.7/site-packages/pymysql/init.py”, line 90, in Connect
return Connection(*args, **kwargs)
File “/home/ezraluandre/frappe-bench/env/local/lib/python2.7/site-packages/pymysql/connections.py”, line 706, in init
self.connect()
File “/home/ezraluandre/frappe-bench/env/local/lib/python2.7/site-packages/pymysql/connections.py”, line 932, in connect
self._request_authentication()
File “/home/ezraluandre/frappe-bench/env/local/lib/python2.7/site-packages/pymysql/connections.py”, line 1152, in _request_authentication
auth_packet = self._read_packet()
File “/home/ezraluandre/frappe-bench/env/local/lib/python2.7/site-packages/pymysql/connections.py”, line 1014, in _read_packet
packet.check_error()
File “/home/ezraluandre/frappe-bench/env/local/lib/python2.7/site-packages/pymysql/connections.py”, line 393, in check_error
err.raise_mysql_exception(self._data)
File “/home/ezraluandre/frappe-bench/env/local/lib/python2.7/site-packages/pymysql/err.py”, line 107, in raise_mysql_exception
raise errorclass(errno, errval)
pymysql.err.InternalError: (1698, u"Access denied for user ‘root’@‘localhost’")

There should be a file named passwords.txt in the directory where you installed frappe-bench, you can find your mysql password there.

Already solved the problem:

it start but the password isn’t change and I found that my root user plugin is unix_socket. so I change it using UPDATE mysql.user SET plugin = 'mysql_native_password' WHERE user = 'root' AND plugin = 'unix_socket'; while on USE mysql.

all detail installation can be found on this website: