Error after executing bench update

I m facing this error after executing bench update command inside frappe-bench directory.
Everything is working fine before executing this command, even i was able to run bench migrate before executing bench update command, but now i m not able to executing bench migrate command after bench update.

/home/develop/frappe-bench/bench update
INFO:bench.utils:updating bench
Already up-to-date.
Requirement already satisfied: Pillow in ./env/lib/python2.7/site-packages
Requirement already satisfied: olefile in ./env/lib/python2.7/site-packages (from Pillow) frappe
From GitHub - frappe/frappe: Low code web framework for real world applications, in Python and Javascript

  • branch develop → FETCH_HEAD
    Already up-to-date. erpnext
    From GitHub - frappe/erpnext: Free and Open Source Enterprise Resource Planning (ERP)
  • branch develop → FETCH_HEAD
    Already up-to-date. erpnext_shopify
    From GitHub - frappe/erpnext_shopify: [Deprecated] Shopify connector for ERPNext
  • branch develop → FETCH_HEAD
    Already up-to-date.
    Requirement already up-to-date: pip in ./env/lib/python2.7/site-packages/pip-9.0.1-py2.7.egg
    Executing frappe.patches.v8_0.deprecate_integration_broker in (b1846533a05c5b4f)
    Traceback (most recent call last):
    File “/usr/lib/python2.7/”, line 174, in _run_module_as_main
    main”, fname, loader, pkg_name)
    File “/usr/lib/python2.7/”, line 72, in _run_code
    exec code in run_globals
    File “/home/develop/frappe-bench/apps/frappe/frappe/utils/”, line 79, in
    File “/home/develop/frappe-bench/apps/frappe/frappe/utils/”, line 16, in main
    File “/home/develop/frappe-bench/env/local/lib/python2.7/site-packages/click/”, line 722, in call
    return self.main(*args, **kwargs)
    File “/home/develop/frappe-bench/env/local/lib/python2.7/site-packages/click/”, line 697, in main
    rv = self.invoke(ctx)
    File “/home/develop/frappe-bench/env/local/lib/python2.7/site-packages/click/”, line 1066, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
    File “/home/develop/frappe-bench/env/local/lib/python2.7/site-packages/click/”, line 1066, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
    File “/home/develop/frappe-bench/env/local/lib/python2.7/site-packages/click/”, line 895, in invoke
    return ctx.invoke(self.callback, **ctx.params)
    File “/home/develop/frappe-bench/env/local/lib/python2.7/site-packages/click/”, line 535, in invoke
    return callback(*args, **kwargs)
    File “/home/develop/frappe-bench/env/local/lib/python2.7/site-packages/click/”, line 17, in new_func
    return f(get_current_context(), *args, **kwargs)
    File “/home/develop/frappe-bench/apps/frappe/frappe/commands/”, line 24, in _func
    ret = f(frappe._dict(ctx.obj), *args, **kwargs)
    File “/home/develop/frappe-bench/apps/frappe/frappe/commands/”, line 210, in migrate
    migrate(context.verbose, rebuild_website=rebuild_website)
    File “/home/develop/frappe-bench/apps/frappe/frappe/”, line 31, in migrate
    File “/home/develop/frappe-bench/apps/frappe/frappe/modules/”, line 29, in run_all
    if not run_single(patchmodule = patch):
    File “/home/develop/frappe-bench/apps/frappe/frappe/modules/”, line 63, in run_single
    return execute_patch(patchmodule, method, methodargs)
    File “/home/develop/frappe-bench/apps/frappe/frappe/modules/”, line 83, in execute_patch
    frappe.get_attr(patchmodule.split()[0] + “.execute”)()
    File “/home/develop/frappe-bench/apps/frappe/frappe/patches/v8_0/”, line 18, in execute
    frappe.delete_doc(“Module Def”, “Integration Broker”)
    File “/home/develop/frappe-bench/apps/frappe/frappe/”, line 638, in delete_doc
    ignore_permissions, flags)
    File “/home/develop/frappe-bench/apps/frappe/frappe/model/”, line 75, in delete_doc
    File “/home/develop/frappe-bench/apps/frappe/frappe/model/”, line 667, in run_method
    out = Document.hook(fn)(self, *args, **kwargs)
    File “/home/develop/frappe-bench/apps/frappe/frappe/model/”, line 888, in composer
    return composed(self, method, *args, **kwargs)
    File “/home/develop/frappe-bench/apps/frappe/frappe/model/”, line 873, in runner
    add_to_return_value(self, f(self, method, *args, **kwargs))
    File “/home/develop/frappe-bench/apps/frappe/frappe/core/doctype/feedback_trigger/”, line 32, in trigger_feedback_request
    reference_doctype=doc.doctype,, now=frappe.flags.in_test)
    File “/home/develop/frappe-bench/apps/frappe/frappe/”, line 1295, in enqueue
    return frappe.utils.background_jobs.enqueue(*args, **kwargs)
    File “/home/develop/frappe-bench/apps/frappe/frappe/utils/”, line 46, in enqueue
    “kwargs”: kwargs
    File “/home/develop/frappe-bench/env/local/lib/python2.7/site-packages/rq/”, line 227, in enqueue_call
    job = self.enqueue_job(job, at_front=at_front)
    File “/home/develop/frappe-bench/env/local/lib/python2.7/site-packages/rq/”, line 298, in enqueue_job
    File “/home/develop/frappe-bench/env/local/lib/python2.7/site-packages/redis/”, line 2641, in execute
    return execute(conn, stack, raise_on_error)
    File “/home/develop/frappe-bench/env/local/lib/python2.7/site-packages/redis/”, line 2495, in _execute_transaction
    File “/home/develop/frappe-bench/env/local/lib/python2.7/site-packages/redis/”, line 538, in send_packed_command
    File “/home/develop/frappe-bench/env/local/lib/python2.7/site-packages/redis/”, line 442, in connect
    raise ConnectionError(self._error_message(e))
    redis.exceptions.ConnectionError: Error 111 connecting to localhost:11080. Connection refused.

Please assist me if i have missed something or doing wrong while executing bench update.

I’m getting the same error

Bench update failing only due to rq [Redis Queue].

Install rq [Redis Queue] using following method:
Inside frappe-bench directory execute ./env/bin/pip install rq==0.4.6
then execute same bench update command inside frappe-bench directory.

It’ll resolve your bench update problem, but you’ll face the different error while starting your bench using bench start command.

rq installed ok

but the error still happens on bench update

1 Like

Just go to /home/username/frappe-bench/apps/frappe/frappe/utils/
and open in your favorite editor and return the control from the enqueue function before execution of this [return q.enqueue_call …] line.
You just need to add return statement (Just return statement) before [return q.enqueue_call …] line.
Now you can run bench update

Note :
But Its not a standard way to deal with this error [Not recommend]. This method will initialize your Empty workers, and this error you’ll receive on terminal while executing bench start command.

I had exactly the same error as the poster on doing a bench update on Develop just now

Thanks for your help. doing the above did let me do a bench update successfully, but not when I try to run bench start, there is a problem with red-server again. Redis starts up fine, but shuts down gain almost as soon as it started. I had removed the additional return statement too.

The other question why did this suddenly go awry? I’m running a std VM pretty vanilla with the develop branch and I’m a little concerned that just doing a simple update can fairly easily bring the system down

1 Like

Are you on development setup?

I faced this error when I had a development bench which was not running when I did bench update.

try bench start, once the bench is started open a separate terminal emulator window do bench update

Thank you @revant_one !

Yes ! I m on Development branch.
I have already fixed this problem, It was related to Redis Queue.
What was happing when i was trying to start the bench, it was actually trying to create local connection on this : redis://localhost:11080 address.

But localhost is not valid address as there is no entry in etc/hosts file against After putting localhost value against IP address my bench start running successfully.