Bench Update Error 01-Jul-2016

I was getting the above error on develop branch on my test account and then out of frustration I had shifted to the master branch in my test environment and I had to reinstall frappe from scratch.

But after using the master branch for few months I am again getting this error on running bench update --no-backup I hope someone this time could give me a solution to this problem

Migrating rigb.local
Executing erpnext.patches.v6_20x.repost_valuation_rate_for_negative_inventory in rigb.local (6b2467e6e9)
Updating frappe                     : [========================================]
Updating erpnext                    : [========================================]
Wrote ./assets/js/print_format_v3.min.js - 18k
Wrote ./assets/js/frappe-web.min.js - 101k
Wrote ./assets/js/form.min.js - 113k
Wrote ./assets/js/report.min.js - 157k
Wrote ./assets/js/erpnext.min.js - 36k
Wrote ./assets/css/list.min.css - 6k
Wrote ./assets/js/erpnext-web.min.js - 1k
Wrote ./assets/css/report.min.css - 7k
Wrote ./assets/css/frappe-web.css - 51k
Wrote ./assets/js/list.min.js - 66k
Wrote ./assets/js/dialog.min.js - 58k
Wrote ./assets/js/desk.min.js - 874k
Wrote ./assets/css/form.min.css - 2k
Wrote ./assets/js/editor.min.js - 26k
Wrote ./assets/css/erpnext.css - 1k
Wrote ./assets/css/desk.min.css - 256k
Wrote ./assets/css/module.min.css - 2k
error: <class 'xmlrpclib.Fault'>, <Fault 10: 'BAD_NAME: frappe'>: file: /usr/lib/python2.7/ line: 794
Traceback (most recent call last):
  File "/usr/local/bin/bench", line 9, in <module>
    load_entry_point('bench==3.0.0', 'console_scripts', 'bench')()
  File "/home/aditya/bench-repo/bench/", line 40, in cli
  File "/usr/local/lib/python2.7/dist-packages/click/", line 664, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/click/", line 644, in main
    rv = self.invoke(ctx)
  File "/usr/local/lib/python2.7/dist-packages/click/", line 991, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/local/lib/python2.7/dist-packages/click/", line 837, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/lib/python2.7/dist-packages/click/", line 464, in invoke
    return callback(*args, **kwargs)
  File "/home/aditya/bench-repo/bench/commands/", line 60, in update
    _update(pull, patch, build, bench, auto, restart_supervisor, requirements, no_backup, upgrade, force=force)
  File "/home/aditya/bench-repo/bench/commands/", line 96, in _update
  File "/home/aditya/bench-repo/bench/", line 322, in restart_supervisor_processes
    exec_cmd('sudo supervisorctl restart {group}'.format(group=group), cwd=bench_path)
  File "/home/aditya/bench-repo/bench/", line 100, in exec_cmd
    raise CommandFailedError(cmd)
bench.utils.CommandFailedError: sudo supervisorctl restart frappe:

@vjFaLk @shreyasp can you check?

@adityaduggal does running sudo supervisorctl restart frappe: work manually?

aditya@ubuntu:~/frappe-bench$ sudo supervisorctl restart frappe
frappe: ERROR (no such process)
frappe: ERROR (no such process)

This is the same thing which happened in the develop branch but I was unable to find the solution for the same and hence had to revert to the master branch.

Just a followup, I would also like to infrom that I have edited my procfile as below:

redis_cache: redis-server config/redis_cache.conf
redis_socketio: redis-server config/redis_socketio.conf
redis_queue: redis-server config/redis_queue.conf
web_rigpl: bench --site rigpl.local serve --port 8002
web_ru: bench --site ru.local serve --port 8003
web_rigb: bench --site rigb.local serve --port 8004
web_sv:bench --site sv.local serve --port 8005
socketio: /usr/bin/node apps/frappe/socketio.js
watch: bench watch
schedule: bench schedule
worker_short: bench worker --queue short
worker_long: bench worker --queue long
worker_default: bench worker --queue default

Now I can remember following the steps in [Important] Bench version 2 - see this before you run bench update and then the problem was gone for few days but again the problem is back. Is it because I have edited my procfile and this is a test env.