Bench update --bench error

chandu@food:~/frappe-bench$ bench update --bench

error: cannot fork() for fetch-pack: Cannot allocate memory
Traceback (most recent call last):
File “/usr/local/bin/bench”, line 9, in
load_entry_point(‘bench==0.1’, ‘console_scripts’, ‘bench’)()
File “/home/chandu/bench-repo/bench/cli.py”, line 60, in cli
bench()
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 664, in call
return self.main(*args, **kwargs)
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 644, in main
rv = self.invoke(ctx)
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 991, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 837, in invoke
return ctx.invoke(self.callback, **ctx.params)
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 464, in invoke
return callback(*args, **kwargs)
File “/home/chandu/bench-repo/bench/cli.py”, line 210, in _update
version_upgrade = is_version_upgrade()
File “/home/chandu/bench-repo/bench/app.py”, line 91, in is_version_upgrade
fetch_upstream(‘frappe’, bench=bench)
File “/home/chandu/bench-repo/bench/app.py”, line 117, in fetch_upstream
return exec_cmd(“git fetch upstream”, cwd=repo_dir)
File “/home/chandu/bench-repo/bench/utils.py”, line 104, in exec_cmd
raise CommandFailedError(cmd)
bench.utils.CommandFailedError: git fetch upstream
chandu@food:~/frappe-bench$
chandu@food:~/frappe-bench$ bench update --bench
error: cannot fork() for fetch-pack: Cannot allocate memory
Traceback (most recent call last):
File “/usr/local/bin/bench”, line 9, in
load_entry_point(‘bench==0.1’, ‘console_scripts’, ‘bench’)()
File “/home/chandu/bench-repo/bench/cli.py”, line 60, in cli
bench()
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 664, in call
return self.main(*args, **kwargs)
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 644, in main
rv = self.invoke(ctx)
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 991, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 837, in invoke
return ctx.invoke(self.callback, **ctx.params)
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 464, in invoke
return callback(*args, **kwargs)
File “/home/chandu/bench-repo/bench/cli.py”, line 210, in _update
version_upgrade = is_version_upgrade()
File “/home/chandu/bench-repo/bench/app.py”, line 91, in is_version_upgrade
fetch_upstream(‘frappe’, bench=bench)
File “/home/chandu/bench-repo/bench/app.py”, line 117, in fetch_upstream
return exec_cmd(“git fetch upstream”, cwd=repo_dir)
File “/home/chandu/bench-repo/bench/utils.py”, line 104, in exec_cmd
raise CommandFailedError(cmd)
bench.utils.CommandFailedError: git fetch upstream

Please check disk space.

Sorry, that means you ran out of RAM

2 Likes
ikhlas@ikhlas:~/frappe-bench$ bench update
remote: Counting objects: 47, done.
remote: Compressing objects: 100% (47/47), done.
remote: Total 47 (delta 15), reused 0 (delta 0), pack-reused 0
Unpacking objects: 100% (47/47), done.
From https://github.com/frappe/frappe
   f57ad0d..f97654a  develop    -> upstream/develop
INFO:bench.utils:updating bench
remote: Counting objects: 190, done.
remote: Compressing objects: 100% (12/12), done.
remote: Total 190 (delta 90), reused 89 (delta 89), pack-reused 89
Receiving objects: 100% (190/190), 37.59 KiB | 26 KiB/s, done.
Resolving deltas: 100% (117/117), completed with 32 local objects.
From https://github.com/frappe/bench
   6612c6d..e857c6d  develop    -> origin/develop
 * [new branch]      fix/new-installer -> origin/fix/new-installer
 * [new branch]      fix/sudoers -> origin/fix/sudoers
   112ea2e..4aacfae  master     -> origin/master
Updating 6612c6d..e857c6d
Fast-forward
 bench/app.py                                       |   31 +++-
 bench/commands/make.py                             |    6 +-
 bench/commands/setup.py                            |   10 +-
 bench/config/templates/frappe_sudoers              |   20 +++
 bench/config/templates/redis_cache.conf            |    1 +
 bench/config/templates/redis_queue.conf            |    1 +
 bench/config/templates/redis_socketio.conf         |    1 +
 bench/patches/patches.txt                          |    1 +
 bench/patches/v3/redis_bind_ip.py                  |   10 ++
 bench/tests/test_init.py                           |   17 ++-
 bench/tests/test_setup_production.py               |   15 ++
 bench/utils.py                                     |   36 ++++-
 playbooks/develop/centos.yml                       |   18 +--
 playbooks/develop/create_user.yml                  |   22 +++
 playbooks/develop/includes/mariadb_centos.yml      |    1 +
 playbooks/develop/includes/mariadb_ubuntu.yml      |   12 +-
 playbooks/develop/includes/setup_bench.yml         |   44 +++---
 playbooks/develop/includes/setup_dev_env.yml       |   22 +++
 playbooks/develop/includes/setup_mariadb.yml       |   31 ++--
 .../develop/includes/setup_selinux_policy.yml      |   38 +++++
 playbooks/develop/install.yml                      |    6 +-
 playbooks/develop/macosx.yml                       |    7 +-
 .../develop/templates/simple_mariadb_config.cnf    |    1 +
 playbooks/develop/ubuntu.yml                       |   12 +-
 playbooks/install.py                               |  161 ++++++++++++++++----
 .../production/includes/setup_bench_production.yml |   61 ++++++++
 playbooks/production/includes/setup_prod_env.yml   |  105 +++++++++++++
 playbooks/production/install.yml                   |   14 ++
 playbooks/production/templates/default_nginx.j2    |   42 +++++
 playbooks/production/templates/frappe_selinux.te   |   32 ++++
 vm/ansible/library/bench.py                        |    2 +-
 31 files changed, 664 insertions(+), 116 deletions(-)
 mode change 100644 => 100755 bench/app.py
 create mode 100644 bench/config/templates/frappe_sudoers
 create mode 100644 bench/patches/v3/redis_bind_ip.py
 mode change 100644 => 100755 bench/tests/test_init.py
 create mode 100644 playbooks/develop/create_user.yml
 create mode 100644 playbooks/develop/includes/setup_dev_env.yml
 create mode 100644 playbooks/develop/includes/setup_selinux_policy.yml
 create mode 100644 playbooks/production/includes/setup_bench_production.yml
 create mode 100644 playbooks/production/includes/setup_prod_env.yml
 create mode 100644 playbooks/production/install.yml
 create mode 100644 playbooks/production/templates/default_nginx.j2
 create mode 100644 playbooks/production/templates/frappe_selinux.te

This update will replace ERPNext's Redis configuration files to fix a major security issue.
If you don't know what this means, type Y ;)

Do you want to continue? [y/N]: y
Requirement already satisfied (use --upgrade to upgrade): Pillow in ./env/lib/python2.7/site-packages
/home/ikhlas/frappe-bench/env/local/lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:315: SNIMissingWarning: An HTTPS request has been made, but the SNI (Subject Name Indication) extension to TLS is not available on this platform. This may cause the server to present an incorrect TLS certificate, which can cause validation failures. For more information, see https://urllib3.readthedocs.org/en/latest/security.html#snimissingwarning.
  SNIMissingWarning
/home/ikhlas/frappe-bench/env/local/lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:120: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. For more information, see https://urllib3.readthedocs.org/en/latest/security.html#insecureplatformwarning.
  InsecurePlatformWarning
You are using pip version 8.1.1, however version 8.1.2 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
INFO:bench.app:pulling frappe
From https://github.com/frappe/frappe
 * branch            master     -> FETCH_HEAD
Updating 7856294..aacad14
Fast-forward
 frappe/__version__.py                              |    2 +-
 frappe/core/doctype/page/page.py                   |    4 +++-
 .../page/data_import_tool/data_import_tool.json    |   13 ++++++-------
 frappe/core/page/data_import_tool/exporter.py      |    9 ++++++++-
 frappe/hooks.py                                    |    2 +-
 .../doctype/dropbox_backup/dropbox_backup.py       |    7 ++++---
 frappe/utils/response.py                           |   10 ++++++----
 frappe/website/render.py                           |   13 ++++++++-----
 setup.py                                           |    2 +-
 9 files changed, 38 insertions(+), 24 deletions(-)
INFO:bench.app:pulling erpnext
remote: Counting objects: 174, done.
remote: Total 174 (delta 123), reused 123 (delta 123), pack-reused 51
Receiving objects: 100% (174/174), 27.12 KiB, done.
Resolving deltas: 100% (142/142), completed with 60 local objects.
From https://github.com/frappe/erpnext
 * branch            master     -> FETCH_HEAD
Updating 80c0264..fd5d0db
Fast-forward
 erpnext/__version__.py                             |    2 +-
 erpnext/accounts/doctype/account/account.py        |   22 ++++----
 .../sales_taxes_and_charges_template.py            |    7 +++
 erpnext/accounts/doctype/tax_rule/tax_rule.py      |    9 +++-
 .../delivered_items_to_be_billed.json              |    4 +-
 .../item_wise_purchase_register.js                 |    6 +++
 .../item_wise_purchase_register.py                 |   10 ++--
 .../item_wise_sales_register.js                    |    6 +++
 .../item_wise_sales_register.py                    |   10 ++--
 .../ordered_items_to_be_billed.json                |    4 +-
 .../purchase_order_items_to_be_billed.json         |    4 +-
 .../report/purchase_register/purchase_register.js  |    6 +++
 .../report/purchase_register/purchase_register.py  |   16 +++---
 .../received_items_to_be_billed.json               |    4 +-
 .../report/sales_register/sales_register.js        |    6 +++
 .../report/sales_register/sales_register.py        |   16 +++---
 erpnext/controllers/sales_and_purchase_return.py   |    4 +-
 erpnext/hooks.py                                   |    2 +-
 .../production_planning_tool.json                  |   57 ++++++++++++++++++--
 .../production_planning_tool.py                    |   15 ++++--
 erpnext/selling/doctype/sales_order/sales_order.py |   14 +++--
 erpnext/setup/doctype/company/company.py           |    4 +-
 erpnext/setup/setup_wizard/setup_wizard.py         |    9 ++++
 .../doctype/purchase_receipt/purchase_receipt.py   |   38 +++++++------
 erpnext/stock/stock_ledger.py                      |    2 -
 erpnext/translations/kn.csv                        |    4 +-
 setup.py                                           |    2 +-
 27 files changed, 204 insertions(+), 79 deletions(-)
INFO:bench.app:pulling schools
remote: Counting objects: 12, done.
remote: Total 12 (delta 8), reused 8 (delta 8), pack-reused 4
Unpacking objects: 100% (12/12), done.
From https://github.com/frappe/schools
 * branch            develop    -> FETCH_HEAD
Updating 4d7d61a..6dbf9f1
Fast-forward
 schools/__version__.py  |    2 +-
 schools/hooks.py        |    2 +-
 schools/setup_wizard.py |    7 ++++---
 setup.py                |    2 +-
 4 files changed, 7 insertions(+), 6 deletions(-)
INFO:bench.app:pulling s3_backup
From https://github.com/ccfiel/s3_backup
 * branch            master     -> FETCH_HEAD
Already up-to-date.
INFO:bench.app:pulling mandrill_integration
From https://github.com/frappe/mandrill_integration
 * branch            master     -> FETCH_HEAD
Already up-to-date.
INFO:bench.app:pulling paypal_integration
From https://github.com/frappe/paypal_integration
 * branch            master     -> FETCH_HEAD
Already up-to-date.
INFO:bench.app:pulling erpnext_shopify
From https://github.com/frappe/erpnext_shopify
 * branch            master     -> FETCH_HEAD
Already up-to-date.
INFO:bench.app:pulling civil_contracting
From https://github.com/revant/civil_contracting
 * branch            master     -> FETCH_HEAD
Already up-to-date.
INFO:bench.app:pulling shopping_cart
From https://github.com/frappe/shopping_cart
 * branch            develop    -> FETCH_HEAD
Already up-to-date.
/home/ikhlas/frappe-bench/env/local/lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:315: SNIMissingWarning: An HTTPS request has been made, but the SNI (Subject Name Indication) extension to TLS is not available on this platform. This may cause the server to present an incorrect TLS certificate, which can cause validation failures. For more information, see https://urllib3.readthedocs.org/en/latest/security.html#snimissingwarning.
  SNIMissingWarning
/home/ikhlas/frappe-bench/env/local/lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:120: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. For more information, see https://urllib3.readthedocs.org/en/latest/security.html#insecureplatformwarning.
  InsecurePlatformWarning
Collecting pip
  Downloading pip-8.1.2-py2.py3-none-any.whl (1.2MB)
    100% |████████████████████████████████| 1.2MB 80kB/s 
Installing collected packages: pip
  Found existing installation: pip 8.1.1
    Uninstalling pip-8.1.1:
      Successfully uninstalled pip-8.1.1
Successfully installed pip-8.1.2
Migrating civil
Updating frappe                     : [=                                       ]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/ikhlas/frappe-bench/apps/frappe/frappe/utils/bench_helper.py", line 79, in <module>
    main()
  File "/home/ikhlas/frappe-bench/apps/frappe/frappe/utils/bench_helper.py", line 16, in main
    click.Group(commands=commands)(prog_name='bench')
  File "/home/ikhlas/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py", line 716, in __call__
    return self.main(*args, **kwargs)
  File "/home/ikhlas/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py", line 696, in main
    rv = self.invoke(ctx)
  File "/home/ikhlas/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/ikhlas/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/ikhlas/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/ikhlas/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py", line 534, in invoke
    return callback(*args, **kwargs)
  File "/home/ikhlas/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/ikhlas/frappe-bench/apps/frappe/frappe/commands.py", line 29, in _func
    ret = f(frappe._dict(ctx.obj), *args, **kwargs)
  File "/home/ikhlas/frappe-bench/apps/frappe/frappe/commands.py", line 205, in migrate
    migrate(context.verbose, rebuild_website=rebuild_website)
  File "/home/ikhlas/frappe-bench/apps/frappe/frappe/migrate.py", line 29, in migrate
    frappe.model.sync.sync_all(verbose=verbose)
  File "/home/ikhlas/frappe-bench/apps/frappe/frappe/model/sync.py", line 19, in sync_all
    sync_for(app, force, verbose=verbose)
  File "/home/ikhlas/frappe-bench/apps/frappe/frappe/model/sync.py", line 43, in sync_for
    import_file_by_path(doc_path, force=force)
  File "/home/ikhlas/frappe-bench/apps/frappe/frappe/modules/import_file.py", line 54, in import_file_by_path
    import_doc(doc, force=force, data_import=data_import, pre_process=pre_process)
  File "/home/ikhlas/frappe-bench/apps/frappe/frappe/modules/import_file.py", line 122, in import_doc
    doc.insert()
  File "/home/ikhlas/frappe-bench/apps/frappe/frappe/model/document.py", line 203, in insert
    self.db_insert()
  File "/home/ikhlas/frappe-bench/apps/frappe/frappe/model/base_document.py", line 282, in db_insert
    ), d.values())
  File "/home/ikhlas/frappe-bench/apps/frappe/frappe/database.py", line 136, in sql
    self._cursor.execute(query, values)
  File "/home/ikhlas/frappe-bench/env/local/lib/python2.7/site-packages/MySQLdb/cursors.py", line 205, in execute
    self.errorhandler(self, exc, value)
  File "/home/ikhlas/frappe-bench/env/local/lib/python2.7/site-packages/MySQLdb/connections.py", line 36, in defaulterrorhandler
    raise errorclass, errorvalue
_mysql_exceptions.OperationalError: (1048, "Column 'track_seen' cannot be null")
Traceback (most recent call last):
  File "/usr/local/bin/bench", line 9, in <module>
    load_entry_point('bench==2.1.0', 'console_scripts', 'bench')()
  File "/home/ikhlas/bench-repo/bench/cli.py", line 40, in cli
    bench_command()
  File "/usr/local/lib/python2.7/dist-packages/click-6.4-py2.7.egg/click/core.py", line 716, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/click-6.4-py2.7.egg/click/core.py", line 696, in main
    rv = self.invoke(ctx)
  File "/usr/local/lib/python2.7/dist-packages/click-6.4-py2.7.egg/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-6.4-py2.7.egg/click/core.py", line 889, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/lib/python2.7/dist-packages/click-6.4-py2.7.egg/click/core.py", line 534, in invoke
    return callback(*args, **kwargs)
  File "/home/ikhlas/bench-repo/bench/commands/update.py", line 61, in update
    _update(pull, patch, build, bench, auto, restart_supervisor, requirements, no_backup, upgrade, force=force)
  File "/home/ikhlas/bench-repo/bench/commands/update.py", line 91, in _update
    patch_sites(bench=bench_path)
  File "/home/ikhlas/bench-repo/bench/utils.py", line 132, in patch_sites
    run_frappe_cmd('--site', 'all', 'migrate', bench=bench)
  File "/home/ikhlas/bench-repo/bench/utils.py", line 492, in run_frappe_cmd
    raise CommandFailedError(args)
bench.utils.CommandFailedError: ('--site', 'all', 'migrate')

This is almost the same error as I am getting:

File "/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/MySQLdb/connections.py", line 36, in defaulterrorhandler raise errorclass, errorvalue _mysql_exceptions.OperationalError: (1048, "Column 'beta' cannot be null") Traceback (most recent call last): File "/usr/local/bin/bench", line 9, in <module> load_entry_point('bench==0.92', 'console_scripts', 'bench')() File "/home/frappe/bench-repo/bench/cli.py", line 40, in cli bench_command() 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/frappe/bench-repo/bench/commands/update.py", line 61, in update _update(pull, patch, build, bench, auto, restart_supervisor, requirements, no_backup, upgrade, force=force) File "/home/frappe/bench-repo/bench/commands/update.py", line 91, in _update patch_sites(bench=bench_path) File "/home/frappe/bench-repo/bench/utils.py", line 132, in patch_sites run_frappe_cmd('--site', 'all', 'migrate', bench=bench) File "/home/frappe/bench-repo/bench/utils.py", line 492, in run_frappe_cmd raise CommandFailedError(args) bench.utils.CommandFailedError: ('--site', 'all', 'migrate')