Problem at the last installation step

Hi,

I am installing ERPN manually, following the guide given. When i am at this step:

bench new-site site1.local

I got instructions to add this to the mariadb my.cnf

Please add this to MariaDB's my.cnf and restart MariaDB before proceeding
[mysqld]
innodb-file-format=barracuda
innodb-file-per-table=1
innodb-large-prefix=1
character-set-client-handshake = FALSE
character-set-server = utf8mb4
collation-server = utf8mb4_unicode_ci

[mysql]
default-character-set = utf8mb4

I added. Then i try to bench update and i got this:

INFO:bench.utils:setting up sudoers
Already up-to-date.
Requirement already satisfied (use --upgrade to upgrade): Pillow in ./env/lib/python2.7/site-packages
INFO:bench.app:pulling frappe
From https://github.com/frappe/frappe
 * branch            develop    -> FETCH_HEAD
Already up-to-date.
INFO:bench.app:pulling erpnext
From https://github.com/frappe/erpnext
 * branch            develop    -> FETCH_HEAD
Already up-to-date.
Requirement already up-to-date: pip in ./env/lib/python2.7/site-packages
Traceback (most recent call last):
  File "/usr/lib/python2.7/runpy.py", line 162, 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/forge/frappe-bench/apps/frappe/frappe/utils/bench_helper.py", line 79, in <module>
    main()
  File "/home/forge/frappe-bench/apps/frappe/frappe/utils/bench_helper.py", line 16, in main
    click.Group(commands=commands)(prog_name='bench')
  File "/home/forge/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py", line 716, in __call__
    return self.main(*args, **kwargs)
  File "/home/forge/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py", line 696, in main
    rv = self.invoke(ctx)
  File "/home/forge/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py", line 1060, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/forge/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py", line 1060, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/forge/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py", line 889, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/forge/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py", line 534, in invoke
    return callback(*args, **kwargs)
  File "/home/forge/frappe-bench/env/local/lib/python2.7/site-packages/click/decorators.py", line 17, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/home/forge/frappe-bench/apps/frappe/frappe/commands.py", line 29, in _func
    ret = f(frappe._dict(ctx.obj), *args, **kwargs)
  File "/home/forge/frappe-bench/apps/frappe/frappe/commands.py", line 920, in backup
    odb = scheduled_backup(ignore_files=not with_files, backup_path_db=backup_path_db, backup_path_files=backup_path_files, backup_path_private_files=backup_path_private_files, force=True)
  File "/home/forge/frappe-bench/apps/frappe/frappe/utils/backups.py", line 164, in scheduled_backup
    odb = new_backup(older_than, ignore_files, backup_path_db=backup_path_db, backup_path_files=backup_path_files, force=force)
  File "/home/forge/frappe-bench/apps/frappe/frappe/utils/backups.py", line 168, in new_backup
    delete_temp_backups(older_than = frappe.conf.keep_backups_for_hours or 48)
  File "/home/forge/frappe-bench/apps/frappe/frappe/utils/backups.py", line 181, in delete_temp_backups
    file_list = os.listdir(get_backup_path())
OSError: [Errno 2] No such file or directory: './site1.local/private/backups'
Traceback (most recent call last):
  File "/usr/local/bin/bench", line 9, in <module>
    load_entry_point('bench', 'console_scripts', 'bench')()
  File "/home/forge/ems.mywebsite.com/bench-repo/bench/cli.py", line 60, in cli
    bench()
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 716, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 696, in main
    rv = self.invoke(ctx)
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 1060, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 889, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 534, in invoke
    return callback(*args, **kwargs)
  File "/home/forge/ems.mywebsite.com/bench-repo/bench/cli.py", line 241, in _update
    update(pull, patch, build, bench, auto, restart_supervisor, requirements, no_backup, upgrade, force=force)
  File "/home/forge/ems.mywebsite.com/bench-repo/bench/cli.py", line 269, in update
    backup_all_sites(bench=bench_path)
  File "/home/forge/ems.mywebsite.com/bench-repo/bench/utils.py", line 372, in backup_all_sites
    backup_site(site, bench=bench)
  File "/home/forge/ems.mywebsite.com/bench-repo/bench/utils.py", line 368, in backup_site
    run_frappe_cmd('--site', site, 'backup', bench=bench)
  File "/home/forge/ems.mywebsite.com/bench-repo/bench/utils.py", line 496, in run_frappe_cmd
    raise CommandFailedError(args)
bench.utils.CommandFailedError: ('--site', 'site1.local', 'backup')

It looks like in your install process you are installing an old version of MariaDB.

I have found the simple install method the best way:

It the your install fails for some reason. Then delete/remove Maria.DB before attempting a new install like below.
This is for CentOS but is easy to change for ubuntu.

sudo systemctl stop mariadb
sudo yum remove mariadb-server mariadb mariadb-libs 
sudo yum remove mariadb-common mariadb-compat
sudo yum remove mysql-libs mysql-devel
sudo rm /etc/yum.repos.d/MariaDB.repo 
And then run one or both of these commands depending on what install you have
sudo rm /etc/my.cnf 
sudo rm /etc/my.cnf.d

sudo yum clean all 

Then to see if all your db parts have been deleted

yum list installed | grep MariaDB

Then run frappe installer again…
The easy method looks after MariaDB encoding types on install.

I cannot do that because this is an existing server. There are websites that is using the MariaDB as well.

Restore your my.cnf to what it was originally.
Restart MariaDB
Back Up all DB’s.
Update to the lastest version of MariaDB (ver 10.x I think)

What website CMS do you use? If its wordpress maybe this article will help.

This article explains the difference between the two formats.

Once this is all done then try installing ERPNext again.

Best Regards

@System19

I managed to follow the manual setup from this page succesfully - GitHub - frappe/bench: CLI to manage Multi-tenant deployments for Frappe apps

However, after i bench start, I still cannot see the login page when i enter my subdomain or VPS ip address.

Then i notice setup for production and deployment down under the guide. It mentions that I have to configure Supervisor and Nginx?

My VPS is already have nginx installed, should I skip the nginx part? What happen to my other websites if i start doing the Supervisor and Nginx setup? Will the other websites go offline?

Please merge this with other thread at:

@blackfriday just setup a new VPS (they are quite cheap these days!)

@rmehta very good idea…Cheaper than messing about for days/weeks.

If its easy like that I already did it at the first place.
I can’t do it since the company has bought high performance VPS to host this ERPN website together with our websites.

Other websites are just fine, I am just stuck at where I mentioned earlier in this thread. And it seems no one from ERPN knows how to solve it. I search the forum, many threads with similar problem are left unsolved.

Yep, Sorry @blackfriday I’m not sure how to fix your issue. I did some reading online and errors similar to yours have been reported when MySQL/Apache is currently installed.
I still think that getting a separate clean VPS ( I personally like DigitalOcean) is the best solution. By separating your backoffice ERP from your client facing HTML frontend and AV delivery platform is the best option. Apps that behave like ERPNext create lots of small read/write calls to RAM (especially if its multi user). AV delivery servers on the other hand like to use long contiguous sections of RAM as cache. Running an App that use’s small chunks of RAM usually fragments your contiguous AV RAM stream. Your digital ocean server can be linked into your existing URL as sub domain like erp.blackfriday.com
HTH

Now i try to install it on fresh Ubuntu Server. This is what i get. Even using the easy install method is not success, how can you expect it to be OK using manual installation?

sudo bash setup_frappe.sh --setup-production
Installing for Ubuntu trusty amd64
In case you encounter an error, you can post on https://discuss.frappe.io

Adding ubuntu mariadb repo
Installing packages for Ubuntu. This might take time...
Installing wkhtmltopdf
 * Stopping MariaDB database server mysqld                                  [ OK ] 
 * Starting MariaDB database server mysqld                                  [ OK ] 
 * Checking for corrupt, not cleanly closed and upgrade needing tables.
Adding frappe user
The directory '/home/blackfriday/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
The directory '/home/blackfriday/.cache/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
Obtaining file:///home/blackfriday/bench-repo
Collecting Click (from bench==0.0.0)
  Downloading click-6.3-py2.py3-none-any.whl (70kB)
Exception:
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/pip-8.1.0-py2.7.egg/pip/basecommand.py", line 209, in main
    status = self.run(options, args)
  File "/usr/local/lib/python2.7/dist-packages/pip-8.1.0-py2.7.egg/pip/commands/install.py", line 299, in run
    requirement_set.prepare_files(finder)
  File "/usr/local/lib/python2.7/dist-packages/pip-8.1.0-py2.7.egg/pip/req/req_set.py", line 360, in prepare_files
    ignore_dependencies=self.ignore_dependencies))
  File "/usr/local/lib/python2.7/dist-packages/pip-8.1.0-py2.7.egg/pip/req/req_set.py", line 577, in _prepare_file
    session=self.session, hashes=hashes)
  File "/usr/local/lib/python2.7/dist-packages/pip-8.1.0-py2.7.egg/pip/download.py", line 810, in unpack_url
    hashes=hashes
  File "/usr/local/lib/python2.7/dist-packages/pip-8.1.0-py2.7.egg/pip/download.py", line 649, in unpack_http_url
    hashes)
  File "/usr/local/lib/python2.7/dist-packages/pip-8.1.0-py2.7.egg/pip/download.py", line 871, in _download_http_url
    _download_url(resp, link, content_file, hashes)
  File "/usr/local/lib/python2.7/dist-packages/pip-8.1.0-py2.7.egg/pip/download.py", line 595, in _download_url
    hashes.check_against_chunks(downloaded_chunks)
  File "/usr/local/lib/python2.7/dist-packages/pip-8.1.0-py2.7.egg/pip/utils/hashes.py", line 46, in check_against_chunks
    for chunk in chunks:
  File "/usr/local/lib/python2.7/dist-packages/pip-8.1.0-py2.7.egg/pip/download.py", line 563, in written_chunks
    for chunk in chunks:
  File "/usr/local/lib/python2.7/dist-packages/pip-8.1.0-py2.7.egg/pip/utils/ui.py", line 139, in iter
    for x in it:
  File "/usr/local/lib/python2.7/dist-packages/pip-8.1.0-py2.7.egg/pip/download.py", line 552, in resp_read
    decode_content=False):
  File "/usr/local/lib/python2.7/dist-packages/pip-8.1.0-py2.7.egg/pip/_vendor/requests/packages/urllib3/response.py", line 344, in stream
    data = self.read(amt=amt, decode_content=decode_content)
  File "/usr/local/lib/python2.7/dist-packages/pip-8.1.0-py2.7.egg/pip/_vendor/requests/packages/urllib3/response.py", line 311, in read
    flush_decoder = True
  File "/usr/lib/python2.7/contextlib.py", line 35, in __exit__
    self.gen.throw(type, value, traceback)
  File "/usr/local/lib/python2.7/dist-packages/pip-8.1.0-py2.7.egg/pip/_vendor/requests/packages/urllib3/response.py", line 231, in _error_catcher
    raise ReadTimeoutError(self._pool, None, 'Read timed out.')
ReadTimeoutError: HTTPSConnectionPool(host='pypi.python.org', port=443): Read timed out.

Sorry not sure why you are having issues. I would do this

As Root
Delete User frappe.
Delete Maria Mysql DB
Delete node.js
sudo apt-get purge nodejs npm

Install node.js
curl -sL https://deb.nodesource.com/setup | sudo bash -
sudo apt-get install nodejs npm -y
sudo apt-get -y install python-pip

Then try
wget https://raw.githubusercontent.com/frappe/bench/master/install_scripts/setup_frappe.sh
sudo bash setup_frappe.sh --setup-production