Bench failed to start

Hi! I followed this tutorial to install ERPNext but when I want to start bench I receive this error:

bench@erp:~/erpnext$ bench start
23:36:10 redis_cache.1    | 1930:M 03 Feb 23:36:10.213 * The server is now ready to accept connections on port 13000
23:36:10 system           | worker_short.1 started (pid=1928)
23:36:12 socketio.1       | listening on *: 9000
23:36:18 web.1            |  * Running on http://0.0.0.0:8000/ (Press CTRL+C to quit)
23:36:18 web.1            |  * Restarting with inotify reloader
23:36:19 watch.1          | yarn run v1.21.1
23:36:19 watch.1          | $ node rollup/watch.js
23:36:20 web.1            |  * Debugger is active!
23:36:20 web.1            |  * Debugger PIN: 448-720-482
23:36:21 watch.1          | /home/bench/erpnext/apps/frappe/rollup/config.js:52
23:36:21 watch.1          |             vue.default(),
23:36:21 watch.1          |                        ^
23:36:21 watch.1          |
23:36:21 watch.1          | TypeError: vue.default is not a function
23:36:21 watch.1          |     at get_rollup_options_for_js (/home/bench/erpnext/apps/frappe/rollup/config.js:52:14)
23:36:21 watch.1          |     at get_rollup_options (/home/bench/erpnext/apps/frappe/rollup/config.js:29:10)
23:36:21 watch.1          |     at Object.keys.map.output_file (/home/bench/erpnext/apps/frappe/rollup/config.js:174:5)
23:36:21 watch.1          |     at Array.map (<anonymous>)
23:36:21 watch.1          |     at get_options_for (/home/bench/erpnext/apps/frappe/rollup/config.js:162:4)
23:36:21 watch.1          |     at get_watch_options (/home/bench/erpnext/apps/frappe/rollup/watch.js:57:18)
23:36:21 watch.1          |     at apps_list.map.app (/home/bench/erpnext/apps/frappe/rollup/watch.js:21:24)
23:36:21 watch.1          |     at Array.map (<anonymous>)
23:36:21 watch.1          |     at watch_assets (/home/bench/erpnext/apps/frappe/rollup/watch.js:20:12)
23:36:21 watch.1          |     at Object.<anonymous> (/home/bench/erpnext/apps/frappe/rollup/watch.js:16:1)
23:36:21 watch.1          |     at Module._compile (module.js:653:30)
23:36:21 watch.1          |     at Object.Module._extensions..js (module.js:664:10)
23:36:21 watch.1          |     at Module.load (module.js:566:32)
23:36:21 watch.1          |     at tryModuleLoad (module.js:506:12)
23:36:21 watch.1          |     at Function.Module._load (module.js:498:3)
23:36:21 watch.1          |     at Function.Module.runMain (module.js:694:10)
23:36:22 watch.1          | error Command failed with exit code 1.
23:36:22 watch.1          | info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
23:36:22 system           | watch.1 stopped (rc=0)
23:36:22 system           | sending SIGTERM to redis_socketio.1 (pid 1894)
23:36:22 system           | sending SIGTERM to worker_long.1 (pid 1896)
23:36:22 system           | sending SIGTERM to redis_queue.1 (pid 1899)
23:36:22 system           | sending SIGTERM to web.1 (pid 1910)
23:36:22 system           | sending SIGTERM to schedule.1 (pid 1917)
23:36:22 system           | sending SIGTERM to worker_default.1 (pid 1912)
23:36:22 system           | sending SIGTERM to socketio.1 (pid 1915)
23:36:22 system           | sending SIGTERM to redis_cache.1 (pid 1921)
23:36:22 system           | sending SIGTERM to worker_short.1 (pid 1928)
23:36:22 redis_socketio.1 | 1905:signal-handler (1580765782) Received SIGTERM scheduling shutdown...
23:36:22 redis_queue.1    | 1914:signal-handler (1580765782) Received SIGTERM scheduling shutdown...
23:36:22 system           | schedule.1 stopped (rc=-15)
23:36:22 redis_cache.1    | 1930:signal-handler (1580765782) Received SIGTERM scheduling shutdown...
23:36:22 system           | socketio.1 stopped (rc=-15)
23:36:22 redis_queue.1    | 1914:M 03 Feb 23:36:22.461 # User requested shutdown...
23:36:22 redis_queue.1    | 1914:M 03 Feb 23:36:22.461 * Removing the pid file.
23:36:22 redis_queue.1    | 1914:M 03 Feb 23:36:22.462 # Redis is now ready to exit, bye bye...
23:36:22 redis_cache.1    | 1930:M 03 Feb 23:36:22.464 # User requested shutdown...
23:36:22 redis_cache.1    | 1930:M 03 Feb 23:36:22.464 * Removing the pid file.
23:36:22 redis_cache.1    | 1930:M 03 Feb 23:36:22.464 # Redis is now ready to exit, bye bye...
23:36:22 system           | redis_queue.1 stopped (rc=-15)
23:36:22 redis_socketio.1 | 1905:M 03 Feb 23:36:22.465 # User requested shutdown...
23:36:22 redis_socketio.1 | 1905:M 03 Feb 23:36:22.465 * Removing the pid file.
23:36:22 redis_socketio.1 | 1905:M 03 Feb 23:36:22.466 # Redis is now ready to exit, bye bye...
23:36:22 system           | redis_socketio.1 stopped (rc=-15)
23:36:22 system           | redis_cache.1 stopped (rc=-15)
23:36:22 system           | worker_short.1 stopped (rc=-15)
23:36:22 system           | worker_default.1 stopped (rc=-15)
23:36:22 system           | worker_long.1 stopped (rc=-15)
23:36:23 system           | web.1 stopped (rc=-15)

I tried sudo supervisorctl restart all but didn’t work.

I try to install on Debian 9.

Can someone help me?

1 Like

What does bench setup redis , bench setup socketio and bench setup requirements return?

1 Like

Hi,
Try running this command in your terminal and then start bench,
echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p

1 Like

This commands solved my problem.

But when i tried to connect on browser it stuck after login.

In console i have this:

14:54:22 socketio.1       | listening on *: 9000
14:54:28 web.1            |  * Running on http://0.0.0.0:8000/ (Press CTRL+C to quit)
14:54:28 web.1            |  * Restarting with inotify reloader
14:54:29 watch.1          | yarn run v1.21.1
14:54:29 watch.1          | $ node rollup/watch.js
14:54:30 web.1            |  * Debugger is active!
14:54:30 web.1            |  * Debugger PIN: 448-720-482
14:54:32 watch.1          |
14:54:32 watch.1          | Rollup Watcher Started
14:54:32 watch.1          |
14:54:32 watch.1          | Watching...
14:54:34 watch.1          | Rebuilding frappe-web-b4.css
14:54:34 watch.1          | Rebuilding frappe-chat-web.css
14:54:34 watch.1          | Rebuilding chat.js
14:54:37 watch.1          | Rebuilding frappe-recorder.min.js
14:54:45 watch.1          | Rebuilding checkout.min.js
14:54:45 watch.1          | Rebuilding frappe-web.min.js
14:54:50 watch.1          | Rebuilding bootstrap-4-web.min.js
14:54:52 watch.1          | Rebuilding control.min.js
14:54:57 watch.1          | Rebuilding dialog.min.js
14:54:59 watch.1          | Rebuilding desk.min.css
14:54:59 watch.1          | Rebuilding frappe-rtl.css
14:54:59 watch.1          | Rebuilding printview.css
14:54:59 watch.1          | Rebuilding desk.min.js
14:55:13 watch.1          | Rebuilding module.min.css
14:55:13 watch.1          | Rebuilding form.min.css
14:55:13 watch.1          | Rebuilding form.min.js
14:55:20 watch.1          | Rebuilding list.min.css
14:55:20 watch.1          | Rebuilding list.min.js
14:55:22 watch.1          | Rebuilding report.min.css
14:55:22 watch.1          | Rebuilding report.min.js
14:55:25 watch.1          | Rebuilding web_form.min.js
14:55:26 watch.1          | Rebuilding web_form.css
14:55:26 watch.1          | Rebuilding email.css
14:55:26 watch.1          | Rebuilding social.min.js
14:55:28 watch.1          | Rebuilding modules.min.js
14:55:28 watch.1          | Rebuilding barcode_scanner.min.js
14:55:35 watch.1          | Rebuilding data_import_tools.min.js
14:55:38 watch.1          | Rebuilding erpnext.css
14:55:38 watch.1          | Rebuilding marketplace.css
14:55:38 watch.1          | Rebuilding erpnext-web.min.js
14:55:38 watch.1          | Rebuilding erpnext-web.css
14:55:38 watch.1          | Rebuilding marketplace.min.js
14:55:47 watch.1          | Rebuilding erpnext.min.js
14:55:49 watch.1          | Rebuilding item-dashboard.min.js
15:00:22 web.1            | 192.168.1.1 - - [04/Feb/2020 15:00:22] "GET / HTTP/1.1" 200 -
15:00:22 web.1            | INFO:werkzeug:192.168.1.1 - - [04/Feb/2020 15:00:22] "GET / HTTP/1.1" 200 -
15:00:23 web.1            | 192.168.1.1 - - [04/Feb/2020 15:00:23] "GET /website_script.js HTTP/1.1" 200 -
15:00:23 web.1            | INFO:werkzeug:192.168.1.1 - - [04/Feb/2020 15:00:23] "GET /website_script.js HTTP/1.1" 200 -
15:00:23 web.1            | 192.168.1.1 - - [04/Feb/2020 15:00:23] "POST / HTTP/1.1" 200 -
15:00:23 web.1            | INFO:werkzeug:192.168.1.1 - - [04/Feb/2020 15:00:23] "POST / HTTP/1.1" 200 -
15:00:33 web.1            | 192.168.1.1 - - [04/Feb/2020 15:00:33] "POST / HTTP/1.1" 200 -
15:00:33 web.1            | INFO:werkzeug:192.168.1.1 - - [04/Feb/2020 15:00:33] "POST / HTTP/1.1" 200 -
15:00:35 web.1            | fatal: Needed a single revision
15:00:35 web.1            | fatal: Needed a single revision
15:00:36 web.1            | fatal: Needed a single revision
15:00:36 web.1            | fatal: Needed a single revision
15:00:36 web.1            | fatal: Needed a single revision
15:00:36 web.1            | fatal: Needed a single revision
15:00:36 web.1            | 192.168.1.1 - - [04/Feb/2020 15:00:36] "GET /desk HTTP/1.1" 200 -
15:00:36 web.1            | INFO:werkzeug:192.168.1.1 - - [04/Feb/2020 15:00:36] "GET /desk HTTP/1.1" 200 -
15:00:40 web.1            | 192.168.1.1 - - [04/Feb/2020 15:00:40] "GET /assets/css/desk.min.css?ver=ApoeSIP4 HTTP/1.1" 200 -
15:00:40 web.1            | INFO:werkzeug:192.168.1.1 - - [04/Feb/2020 15:00:40] "GET /assets/css/desk.min.css?ver=ApoeSIP4 HTTP/1.1" 200 -
15:00:40 web.1            | 192.168.1.1 - - [04/Feb/2020 15:00:40] "GET /assets/css/list.min.css?ver=ApoeSIP4 HTTP/1.1" 200 -
15:00:40 web.1            | INFO:werkzeug:192.168.1.1 - - [04/Feb/2020 15:00:40] "GET /assets/css/list.min.css?ver=ApoeSIP4 HTTP/1.1" 200 -
15:00:40 web.1            | 192.168.1.1 - - [04/Feb/2020 15:00:40] "GET /assets/css/report.min.css?ver=ApoeSIP4 HTTP/1.1" 200 -
15:00:40 web.1            | INFO:werkzeug:192.168.1.1 - - [04/Feb/2020 15:00:40] "GET /assets/css/report.min.css?ver=ApoeSIP4 HTTP/1.1" 200 -
15:00:40 web.1            | 192.168.1.1 - - [04/Feb/2020 15:00:40] "GET /assets/css/form.min.css?ver=ApoeSIP4 HTTP/1.1" 200 -
15:00:40 web.1            | INFO:werkzeug:192.168.1.1 - - [04/Feb/2020 15:00:40] "GET /assets/css/form.min.css?ver=ApoeSIP4 HTTP/1.1" 200 -
15:00:40 web.1            | 192.168.1.1 - - [04/Feb/2020 15:00:40] "GET /assets/css/module.min.css?ver=ApoeSIP4 HTTP/1.1" 200 -
15:00:40 web.1            | INFO:werkzeug:192.168.1.1 - - [04/Feb/2020 15:00:40] "GET /assets/css/module.min.css?ver=ApoeSIP4 HTTP/1.1" 200 -
15:00:40 web.1            | 192.168.1.1 - - [04/Feb/2020 15:00:40] "GET /assets/css/erpnext.css?ver=ApoeSIP4 HTTP/1.1" 200 -
15:00:40 web.1            | INFO:werkzeug:192.168.1.1 - - [04/Feb/2020 15:00:40] "GET /assets/css/erpnext.css?ver=ApoeSIP4 HTTP/1.1" 200 -
15:00:41 web.1            | 192.168.1.1 - - [04/Feb/2020 15:00:41] "GET /assets/js/desk.min.js?ver=ApoeSIP4 HTTP/1.1" 200 -
15:00:41 web.1            | INFO:werkzeug:192.168.1.1 - - [04/Feb/2020 15:00:41] "GET /assets/js/desk.min.js?ver=ApoeSIP4 HTTP/1.1" 200 -
15:00:41 web.1            | 192.168.1.1 - - [04/Feb/2020 15:00:41] "GET /assets/js/list.min.js?ver=ApoeSIP4 HTTP/1.1" 200 -
15:00:41 web.1            | INFO:werkzeug:192.168.1.1 - - [04/Feb/2020 15:00:41] "GET /assets/js/list.min.js?ver=ApoeSIP4 HTTP/1.1" 200 -
15:00:41 web.1            | 192.168.1.1 - - [04/Feb/2020 15:00:41] "GET /assets/js/form.min.js?ver=ApoeSIP4 HTTP/1.1" 200 -
15:00:41 web.1            | INFO:werkzeug:192.168.1.1 - - [04/Feb/2020 15:00:41] "GET /assets/js/form.min.js?ver=ApoeSIP4 HTTP/1.1" 200 -
15:00:41 web.1            | 192.168.1.1 - - [04/Feb/2020 15:00:41] "GET /assets/js/control.min.js?ver=ApoeSIP4 HTTP/1.1" 200 -
15:00:41 web.1            | INFO:werkzeug:192.168.1.1 - - [04/Feb/2020 15:00:41] "GET /assets/js/control.min.js?ver=ApoeSIP4 HTTP/1.1" 200 -
15:00:42 web.1            | 192.168.1.1 - - [04/Feb/2020 15:00:42] "GET /assets/js/libs.min.js?ver=ApoeSIP4 HTTP/1.1" 404 -
15:00:42 web.1            | INFO:werkzeug:192.168.1.1 - - [04/Feb/2020 15:00:42] "GET /assets/js/libs.min.js?ver=ApoeSIP4 HTTP/1.1" 404 -
15:00:42 web.1            | 192.168.1.1 - - [04/Feb/2020 15:00:42] "GET /assets/js/report.min.js?ver=ApoeSIP4 HTTP/1.1" 200 -
15:00:42 web.1            | INFO:werkzeug:192.168.1.1 - - [04/Feb/2020 15:00:42] "GET /assets/js/report.min.js?ver=ApoeSIP4 HTTP/1.1" 200 -
15:00:44 web.1            | 192.168.1.1 - - [04/Feb/2020 15:00:44] "GET /assets/js/erpnext.min.js?ver=ApoeSIP4 HTTP/1.1" 200 -
15:00:44 web.1            | INFO:werkzeug:192.168.1.1 - - [04/Feb/2020 15:00:44] "GET /assets/js/erpnext.min.js?ver=ApoeSIP4 HTTP/1.1" 200 -
15:00:47 web.1            | 192.168.1.1 - - [04/Feb/2020 15:00:47] "GET /assets/js/libs.min.js?ver=ApoeSIP4 HTTP/1.1" 404 -
15:00:47 web.1            | INFO:werkzeug:192.168.1.1 - - [04/Feb/2020 15:00:47] "GET /assets/js/libs.min.js?ver=ApoeSIP4 HTTP/1.1" 404 -

After a bench update the erp is 100% working.

My guess is the Node ‘rollup’ was broken. Either broken JS code. Or a bad ‘package.json’. And the developers fixed it in the past 24-48 hours.

You’d have to review the latest GitHub commits to prove/disprove that.