[Important] Bench version 2 - see this before you run bench update

I had a small issue with the commands provided on point 4:

bench setup sudoers frappe # or the user that you used to install erpnext

gives an error about requiring super privileges. I ran it with sudo in front and that seemed to work. Just want to confirm that won’t cause other problems (and maybe you should update the commands).

1 Like

Let’s continue this discussion tomorrow. I am out of ideas :frowning:. May be someone else in the community can help troubleshoot.

Hi @anand,
Are you awake now? :smile:

My ERP installation is still down due to the node socketio issue.

Hi Kody. Socketio down doesn’t mean you can’t use ERPNext. Did you try logging in?

1 Like

Gah… nginx was stopped due to all the testing. Started nginx again and we’re running. Thanks!

I followed note 4,

had to follow Redis cache server not running. Please contact Administrator / Techsupport error to remove redis-cache error

In brief :

I see no error on bench update now. I get error on sudo supervisorctl status

output of sudo supervisorctl status :

frappe-bench-processes:frappe-bench-frappe-async-worker RUNNING    pid 3461, uptime 0:07:55
frappe-bench-processes:frappe-bench-frappe-longjob-worker RUNNING    pid 3462, uptime 0:07:55
frappe-bench-processes:frappe-bench-frappe-web RUNNING    pid 3486, uptime 0:07:54
frappe-bench-processes:frappe-bench-frappe-worker RUNNING    pid 3497, uptime 0:07:54
frappe-bench-processes:frappe-bench-frappe-workerbeat RUNNING    pid 3479, uptime 0:07:55
frappe-bench-processes:frappe-bench-node-socketio RUNNING    pid 3517, uptime 0:07:51
frappe-bench-redis:frappe-bench-redis-cache RUNNING    pid 3514, uptime 0:07:52
frappe-bench-redis:frappe-bench-redis-queue FATAL      Exited too quickly (process log may have details)
frappe-bench-redis:frappe-bench-redis-socketio RUNNING    pid 3519, uptime 0:07:51

process log logs/redis-queue.log:

[3513] 25 Mar 09:22:45 # Opening port 6379: bind: Address already in use
[3518] 25 Mar 09:22:46 # Opening port 6379: bind: Address already in use
[3528] 25 Mar 09:22:49 # Opening port 6379: bind: Address already in use
[3529] 25 Mar 09:22:52 # Opening port 6379: bind: Address already in use

Everything is working fine on desk. No errors on desk.

solved with :

sudo update-rc.d redis-server disable
sudo service redis-server stop
sudo supervisorctl start all
1 Like

After following the steps here ended up:

admin@server1:~/frappe-bench$ sudo supervisorctl restart frappe-bench-processes:frappe-bench-frappe-async-worker: stopped
frappe-bench-frappe-longjob-worker: stopped
frappe-bench-frappe-workerbeat: stopped
frappe-bench-frappe-web: stopped
frappe-bench-frappe-worker: stopped
frappe-bench-node-socketio: stopped
frappe-bench-frappe-async-worker: ERROR (abnormal termination)
frappe-bench-frappe-longjob-worker: ERROR (abnormal termination)
frappe-bench-frappe-workerbeat: ERROR (abnormal termination)
frappe-bench-frappe-web: ERROR (abnormal termination)
frappe-bench-frappe-worker: ERROR (abnormal termination)
frappe-bench-node-socketio: started

Here is the current status:

sudo supervisorctl status
[sudo] password for admin: 
frappe-bench-processes:frappe-bench-frappe-async-worker FATAL      Exited too quickly (process log may have details)
frappe-bench-processes:frappe-bench-frappe-longjob-worker FATAL      Exited too quickly (process log may have details)
frappe-bench-processes:frappe-bench-frappe-web FATAL      Exited too quickly (process log may have details)
frappe-bench-processes:frappe-bench-frappe-worker FATAL      Exited too quickly (process log may have details)
frappe-bench-processes:frappe-bench-frappe-workerbeat FATAL      Exited too quickly (process log may have details)
frappe-bench-processes:frappe-bench-node-socketio RUNNING    pid 17667, uptime 11:08:12
frappe-bench-redis:frappe-bench-redis-cache RUNNING    pid 8780, uptime 11:26:41
frappe-bench-redis:frappe-bench-redis-queue RUNNING    pid 8779, uptime 11:26:41
frappe-bench-redis:frappe-bench-redis-socketio RUNNING    pid 8785, uptime 11:26:40

help please.

Which steps did you follow? Please paste your full command history.

admin@server1:~/frappe-bench/apps/erpnext$ sudo supervisorctl restart frappe-bench-processes:
error: <class 'xmlrpclib.Fault'>, <Fault 10: 'BAD_NAME: frappe-bench-processes'>: file: /usr/lib/python2.7/xmlrpclib.py line: 794
admin@server1:~/frappe-bench/apps/erpnext$ sudo supervisorctl status
frappe:frappe-web                FATAL      Exited too quickly (process log may have details)
frappe:frappe-worker             FATAL      Exited too quickly (process log may have details)
frappe:frappe-workerbeat         FATAL      Exited too quickly (process log may have details)
frappe-async-worker              FATAL      Exited too quickly (process log may have details)
frappe-longjob-worker            FATAL      Exited too quickly (process log may have details)
node-socketio                    RUNNING    pid 2838, uptime 0:08:34
redis-async-broker               RUNNING    pid 2826, uptime 0:08:35
redis-cache                      RUNNING    pid 2827, uptime 0:08:35
admin@server1:~/frappe-bench/apps/erpnext$ cd ..
admin@server1:~/frappe-bench/apps$ cd ..
admin@server1:~/frappe-bench$ mv config config-bak
admin@server1:~/frappe-bench$ mkdir -p config/pids
admin@server1:~/frappe-bench$ 
admin@server1:~/frappe-bench$ sudo supervisorctl stop all
redis-async-broker: stopped
redis-cache: stopped
node-socketio: stopped
admin@server1:~/frappe-bench$ sudo service nginx stop
admin@server1:~/frappe-bench$ bench setup config
admin@server1:~/frappe-bench$ bench setup redis
admin@server1:~/frappe-bench$ bench setup supervisor
admin@server1:~/frappe-bench$ bench setup nginx
admin@server1:~/frappe-bench$ bench setup procfile
admin@server1:~/frappe-bench$ sudo bench setup sudoers frappe      
admin@server1:~/frappe-bench$ sudo nginx -t
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful
admin@server1:~/frappe-bench$ sudo service nginx reload    
 * Reloading nginx configuration nginx                                   [ OK ] 
admin@server1:~/frappe-bench$ sudo supervisorctl reread
frappe: disappeared
frappe-async-worker: disappeared
frappe-bench-processes: available
frappe-bench-redis: available
frappe-longjob-worker: disappeared
node-socketio: disappeared
redis-async-broker: disappeared
redis-cache: disappeared
admin@server1:~/frappe-bench$ sudo supervisorctl update
redis-async-broker: stopped
redis-async-broker: removed process group
node-socketio: stopped
node-socketio: removed process group
frappe-async-worker: stopped
frappe-async-worker: removed process group
frappe: stopped
frappe: removed process group
frappe-longjob-worker: stopped
frappe-longjob-worker: removed process group
redis-cache: stopped
redis-cache: removed process group
frappe-bench-processes: added process group
frappe-bench-redis: added process group
admin@server1:~/frappe-bench$ sudo supervisorctl status 
frappe-bench-processes:frappe-bench-frappe-async-worker STARTING   
frappe-bench-processes:frappe-bench-frappe-longjob-worker STARTING   
frappe-bench-processes:frappe-bench-frappe-web STARTING   
frappe-bench-processes:frappe-bench-frappe-worker STARTING   
frappe-bench-processes:frappe-bench-frappe-workerbeat RUNNING    pid 4341, uptime 0:00:02
frappe-bench-processes:frappe-bench-node-socketio RUNNING    pid 3883, uptime 0:00:34
frappe-bench-redis:frappe-bench-redis-cache RUNNING    pid 3887, uptime 0:00:34
frappe-bench-redis:frappe-bench-redis-queue RUNNING    pid 3885, uptime 0:00:34
frappe-bench-redis:frappe-bench-redis-socketio RUNNING    pid 3888, uptime 0:00:34
admin@server1:~/frappe-bench$ sudo supervisorctl restart frappe-bench-processes:frappe-bench-frappe-async-worker: stopped
frappe-bench-frappe-longjob-worker: stopped
frappe-bench-frappe-workerbeat: stopped
frappe-bench-frappe-web: stopped
frappe-bench-frappe-worker: stopped
frappe-bench-node-socketio: stopped
frappe-bench-frappe-async-worker: ERROR (abnormal termination)
frappe-bench-frappe-longjob-worker: ERROR (abnormal termination)
frappe-bench-frappe-workerbeat: ERROR (abnormal termination)
frappe-bench-frappe-web: ERROR (abnormal termination)
frappe-bench-frappe-worker: ERROR (abnormal termination)
frappe-bench-node-socketio: started
admin@server1:~/frappe-bench$ sudo update-rc.d redis-server disable
update-rc.d: warning:  start runlevel arguments (none) do not match redis-server Default-Start values (2 3 4 5)
update-rc.d: warning:  stop runlevel arguments (none) do not match redis-server Default-Stop values (0 1 6)
 Disabling system startup links for /etc/init.d/redis-server ...
 Removing any system startup links for /etc/init.d/redis-server ...
   /etc/rc0.d/K20redis-server
   /etc/rc1.d/K20redis-server
   /etc/rc2.d/S20redis-server
   /etc/rc3.d/S20redis-server
   /etc/rc4.d/S20redis-server
   /etc/rc5.d/S20redis-server
   /etc/rc6.d/K20redis-server
 Adding system startup for /etc/init.d/redis-server ...
   /etc/rc0.d/K20redis-server -> ../init.d/redis-server
   /etc/rc1.d/K20redis-server -> ../init.d/redis-server
   /etc/rc6.d/K20redis-server -> ../init.d/redis-server
   /etc/rc2.d/K80redis-server -> ../init.d/redis-server
   /etc/rc3.d/K80redis-server -> ../init.d/redis-server
   /etc/rc4.d/K80redis-server -> ../init.d/redis-server
   /etc/rc5.d/K80redis-server -> ../init.d/redis-server
admin@server1:~/frappe-bench$ sudo service redis-server stop
Stopping redis-server: redis-server.
admin@server1:~/frappe-bench$ sudo supervisorctl start all
admin@server1:~/frappe-bench$ sudo supervisorctl status
frappe-bench-processes:frappe-bench-frappe-async-worker RUNNING    pid 6754, uptime 0:00:01
frappe-bench-processes:frappe-bench-frappe-longjob-worker STARTING   
frappe-bench-processes:frappe-bench-frappe-web STARTING   
frappe-bench-processes:frappe-bench-frappe-worker STARTING   
frappe-bench-processes:frappe-bench-frappe-workerbeat STARTING   
frappe-bench-processes:frappe-bench-node-socketio RUNNING    pid 4860, uptime 0:02:19
frappe-bench-redis:frappe-bench-redis-cache RUNNING    pid 3887, uptime 0:03:32
frappe-bench-redis:frappe-bench-redis-queue RUNNING    pid 3885, uptime 0:03:32
frappe-bench-redis:frappe-bench-redis-socketio RUNNING    pid 3888, uptime 0:03:32

Looks like everything seems to be running. Check sudo supervisorctl status

just solved and successfully updated bench, but nothing coming up on port 80, please advise.

admin@server1:~/frappe-bench/apps/erpnext$ sudo supervisorctl status
frappe-bench-processes:frappe-bench-frappe-async-worker RUNNING    pid 4700, uptime 0:01:53
frappe-bench-processes:frappe-bench-frappe-longjob-worker RUNNING    pid 4701, uptime 0:01:53
frappe-bench-processes:frappe-bench-frappe-web RUNNING    pid 4715, uptime 0:01:52
frappe-bench-processes:frappe-bench-frappe-worker RUNNING    pid 4724, uptime 0:01:51
frappe-bench-processes:frappe-bench-frappe-workerbeat RUNNING    pid 4710, uptime 0:01:52
frappe-bench-processes:frappe-bench-node-socketio RUNNING    pid 4725, uptime 0:01:51
frappe-bench-redis:frappe-bench-redis-cache RUNNING    pid 8780, uptime 14:08:51
frappe-bench-redis:frappe-bench-redis-queue RUNNING    pid 8779, uptime 14:08:51
frappe-bench-redis:frappe-bench-redis-socketio RUNNING    pid 8785, uptime 14:08:50
admin@server1:~/frappe-bench/apps/erpnext$ netstat | grep http | wc -l
0
admin@server1:~/frappe-bench/apps/erpnext$ netstat -anp | grep :80 | grep ESTABLISHED | wc -l
(Not all processes could be identified, non-owned process info
 will not be shown, you would have to be root to see it all.)
0
admin@server1:~/frappe-bench/apps/erpnext$ sudo netstat -anp | grep :80 | grep ESTABLISHED | wc -l
[sudo] password for admin: 
0
admin@server1:~/frappe-bench/apps/erpnext$ netstat -l
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State      
tcp        0      0 *:11311                 *:*                     LISTEN     
tcp        0      0 *:ssh                   *:*                     LISTEN     
tcp        0      0 *:12311                 *:*                     LISTEN     
tcp        0      0 *:smtp                  *:*                     LISTEN     
tcp        0      0 localhost.localdom:8000 *:*                     LISTEN     
tcp        0      0 *:48000                 *:*                     LISTEN     
tcp        0      0 *:48001                 *:*                     LISTEN     
tcp        0      0 *:48004                 *:*                     LISTEN     
tcp        0      0 *:48005                 *:*                     LISTEN     
tcp        0      0 *:9000                  *:*                     LISTEN     
tcp        0      0 localhost.localdo:mysql *:*                     LISTEN     
tcp        0      0 *:6379                  *:*                     LISTEN     
tcp6       0      0 [::]:11311              [::]:*                  LISTEN     
tcp6       0      0 [::]:ssh                [::]:*                  LISTEN     
tcp6       0      0 [::]:12311              [::]:*                  LISTEN     
tcp6       0      0 [::]:smtp               [::]:*                  LISTEN     
tcp6       0      0 [::]:6379               [::]:*                  LISTEN     
udp        0      0 *:48000                 *:*                                
udp        0      0 server1.zinnee.com:ntp  *:*                                
udp        0      0 10.16.166.240:ntp       *:*                                
udp        0      0 localhost.localdoma:ntp *:*                                
udp        0      0 *:ntp                   *:*                                
udp6       0      0 fe80::481:3fff:fe60:ntp [::]:*                             
udp6       0      0 fe80::45a:45ff:fe5c:ntp [::]:*

Check if Nginx is running.

sudo nginx -t
sudo service nginx status

if test indicates that all is well and nginx is not on, use
sudo service nginx start

Best,
Anand Doshi

ERPNext

Hi
I use bench update before see this , then i run all this command but still when i try to login to GUI i get bellow error ( screen shout attached ) , any one knows about solution .

Oops, a server error has occured

Traceback (innermost last):
File “/home/frappe/frappe-bench/apps/frappe/frappe/website/render.py”, line 25, in render
data = render_page_by_language(path)
File “/home/frappe/frappe-bench/apps/frappe/frappe/website/render.py”, line 91, in render_page_by_language
return render_page(path)
File “/home/frappe/frappe-bench/apps/frappe/frappe/website/render.py”, line 107, in render_page
return build(path)
File “/home/frappe/frappe-bench/apps/frappe/frappe/website/render.py”, line 114, in build
return build_page(path)
File “/home/frappe/frappe-bench/apps/frappe/frappe/website/render.py”, line 127, in build_page
context = get_context(path)
File “/home/frappe/frappe-bench/apps/frappe/frappe/website/context.py”, line 16, in get_context
context = build_context(context)
File “/home/frappe/frappe-bench/apps/frappe/frappe/website/context.py”, line 54, in build_context
ret = module.get_context(context)
File “/home/frappe/frappe-bench/apps/frappe/frappe/templates/pages/desk.py”, line 21, in get_context
boot = frappe.sessions.get()
File “/home/frappe/frappe-bench/apps/frappe/frappe/sessions.py”, line 106, in get
bootinfo = get_bootinfo()
File “/home/frappe/frappe-bench/apps/frappe/frappe/boot.py”, line 37, in get_bootinfo
load_desktop_icons(bootinfo)
File “/home/frappe/frappe-bench/apps/frappe/frappe/boot.py”, line 78, in load_desktop_icons
bootinfo.desktop_icons = get_desktop_icons()
File “/home/frappe/frappe-bench/apps/frappe/frappe/desk/doctype/desktop_icon/desktop_icon.py”, line 36, in get_desktop_icons
fields=fields, filters={‘standard’: 1})
File “/home/frappe/frappe-bench/apps/frappe/frappe/database.py”, line 504, in get_all
return frappe.get_all(*args, **kwargs)
File “/home/frappe/frappe-bench/apps/frappe/frappe/init.py”, line 956, in get_all
return get_list(doctype, *args, **kwargs)
File “/home/frappe/frappe-bench/apps/frappe/frappe/init.py”, line 929, in get_list
return frappe.model.db_query.DatabaseQuery(doctype).execute(None, *args, **kwargs)
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/db_query.py”, line 66, in execute
result = self.build_and_run()
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/db_query.py”, line 74, in build_and_run
args = self.prepare_args()
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/db_query.py”, line 88, in prepare_args
self.set_optional_columns()
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/db_query.py”, line 181, in set_optional_columns
columns = frappe.db.get_table_columns(self.doctype)
File “/home/frappe/frappe-bench/apps/frappe/frappe/database.py”, line 754, in get_table_columns
return [r[0] for r in self.sql(“DESC tab%s” % doctype)]
File “/home/frappe/frappe-bench/apps/frappe/frappe/database.py”, line 147, in sql
self._cursor.execute(query)
File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/MySQLdb/cursors.py”, line 205, in execute
self.errorhandler(self, exc, value)
File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/MySQLdb/connections.py”, line 36, in defaulterrorhandler
raise errorclass, errorvalue
ProgrammingError: (1146, “Table ‘d56cb677ea.tabDesktop Icon’ doesn’t exist”)

Uploading Screen Shot 2016-03-28 at 3.34.37 PM.png…

@neginy your bench update didn’t run completely. You need to check if there is any error when you run bench update.

this error when try bench update :

Traceback (most recent call last):
File “./env/bin/pip”, line 11, in
sys.exit(main())
File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/pip/init.py”, line 215, in main
locale.setlocale(locale.LC_ALL, ‘’)
File “/home/frappe/frappe-bench/env/lib/python2.7/locale.py”, line 579, in setlocale
return _setlocale(category, locale)
locale.Error: unsupported locale setting
Please install these dependencies using the command:
sudo apt-get install -y libtiff5-dev libjpeg8-dev zlib1g-dev libfreetype6-dev liblcms2-dev libwebp-dev tcl8.6-dev tk8.6-dev python-tk
Traceback (most recent call last):
File “/usr/local/bin/bench”, line 9, in
load_entry_point(‘bench==0.0.0’, ‘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 60, 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 73, in _update
before_update(bench=bench_path, requirements=requirements)
File “/home/frappe/bench-repo/bench/utils.py”, line 583, in before_update
validate_pillow_dependencies(bench, requirements)
File “/home/frappe/bench-repo/bench/utils.py”, line 591, in validate_pillow_dependencies
exec_cmd(“{pip} install Pillow”.format(pip=pip))
File “/home/frappe/bench-repo/bench/utils.py”, line 99, in exec_cmd
raise CommandFailedError(cmd)
bench.utils.CommandFailedError: ./env/bin/pip install Pillow

HI @anand I am not sure if this is an bench update issue or if there is something else messed up with our setup.

[frappe@newmatik frappe-bench]$ bench update
Traceback (most recent call last):
File “/usr/bin/bench”, line 5, in
from pkg_resources import load_entry_point
File “/usr/lib/python2.7/site-packages/pkg_resources.py”, line 3007, in
working_set.require(requires)
File “/usr/lib/python2.7/site-packages/pkg_resources.py”, line 728, in require
needed = self.resolve(parse_requirements(requirements))
File “/usr/lib/python2.7/site-packages/pkg_resources.py”, line 626, in resolve
raise DistributionNotFound(req)
pkg_resources.DistributionNotFound: bench==0.92

Can you help me and @emakis with that?

@dominik and/or @emakis

Try:

# go back one level outsite frappe-bench folder
cd ..
sudo pip uninstall bench
sudo pip install -e bench-repo

@anand
Error Message:

Sorry, user frappe is not allowed to execute '/bin/pip uninstall bench' as root on newmatik.com. 

Do you want me to run this as root rather than frappe or do we need to fix user rights?

drwxr-xr-x 8 frappe frappe 4096  8. Okt 09:43 frappe-bench

Use root. You won’t need to fix permissions.

One level outside of frappe-bench folder:

[root@newmatik frappe]# pwd
/home/frappe

The error:

[root@newmatik frappe]# sudo pip uninstall bench
You are using pip version 7.0.3, however version 8.1.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
Cannot uninstall requirement bench, not installed