I’ll be rerunning the scripts again today to check the things you’ve been saying.
I have done a complete revision of these scripts.
There are now 4 not 5.
I have tested them on Bionic 18.04 LTS and Focal 20.04 LTS
I have added numerous commentaries to help with understanding what is going on, what to expect and what to do next.
I would be grateful to hear from anyone who tries them to make sure they have no problems and to know they are being used.
Hi Martin
I struggled to pass the 1st stage. following to strickly to the instructions. So I changed the order and amended the file name of #fix permisssions as below:
Suggestion
Steps:
- Create a new user for working with ERPNext, give it ‘sudoer’ privileges
Create user
sudo adduser erpdev;Add to sudoers
sudo usermod -aG sudo erpdev;2. Logout as yourself. Log back in as user ‘erpdev’.
# Create directory and keys file
sudo mkdir /home/erpdev/.ssh;
# Fix permissions
sudo chmod go-rwx /home/erpdev/.ssh;
sudo chmod -R o-rwx /home/erpdev/.ssh;
sudo chown -R erpdev:erpdev /home/erpdev/.ssh;
# Place pub keys of workstations
cat > /home/erpdev/.ssh/authorized_keys
** paste the text of your id_rsa.pub file here the hit<ctrl>-d
to save and exit
<ctrl>-d
# Fix permissions
sudo chmod g-rwx /home/erpdev/.ssh/authorized_keys;
after this I managed to run erpnextqikinstall_0.sh with no issues.
However on erpnextqikinstall_1.sh when it reaches below it stays there and does not process anymore until I key in ctrl C
to stop.
Would you try replacing that line 202 with:
sudo -A service nginx status | cat
or even
sudo -A service nginx status | grep "Active"
I have replaced with sudo -A service nginx status | cat
and re-run the command erpnextqikinstall_1.sh
below is what appear and is now continuing the installation process.
after all I did all again from scratch and snapshot at end of 01 which look run OK. follow instruction to reboot. I run than 02 however this comes with few errors.
see below I copied the log and bold the errors
14:48:53 redis_cache.1 | 910:M 21 May 2020 14:48:53.942 * Ready to accept con nections
14:48:53 system | schedule.1 started (pid=917)
14:48:53 system | worker_default.1 started (pid=918)
14:48:53 system | worker_short.1 started (pid=887)
14:48:53 system | worker_long.1 started (pid=889)
14:48:54 socketio.1 | internal/modules/cjs/loader.js:960
14:48:54 socketio.1 | throw err;
14:48:54 socketio.1 | ^
14:48:54 socketio.1 |
14:48:54 socketio.1 | Error: Cannot find module ‘express’
14:48:54 socketio.1 | Require stack:
14:48:54 socketio.1 | - /home/erpdev/frappe-bench/apps/frappe/socketio.js
14:48:54 socketio.1 | at Function.Module._resolveFilename (internal/mo dules/cjs/loader.js:957:15)
14:48:54 socketio.1 | at Function.Module._load (internal/modules/cjs/l oader.js:840:27)
14:48:54 socketio.1 | at Module.require (internal/modules/cjs/loader.j s:1019:19)
14:48:54 socketio.1 | at require (internal/modules/cjs/helpers.js:77:1 8)
14:48:54 socketio.1 | at Object. (/home/erpdev/frappe-bench /apps/frappe/socketio.js:1:11)
14:48:54 socketio.1 | at Module._compile (internal/modules/cjs/loader. js:1133:30)
14:48:54 socketio.1 | at Object.Module._extensions…js (internal/modul es/cjs/loader.js:1153:10)
14:48:54 socketio.1 | at Module.load (internal/modules/cjs/loader.js:9 77:32)
14:48:54 socketio.1 | at Function.Module._load (internal/modules/cjs/l oader.js:877:14)
14:48:54 socketio.1 | at Function.executeUserEntryPoint [as runMain] ( internal/modules/run_main.js:74:12) {
14:48:54 socketio.1 | code: ‘MODULE_NOT_FOUND’,
14:48:54 socketio.1 | requireStack: [ ‘/home/erpdev/frappe-bench/apps/fr appe/socketio.js’ ]
14:48:54 socketio.1 | }
14:48:54 system | socketio.1 stopped (rc=1)
14:48:54 system | sending SIGTERM to redis_cache.1 (pid 885)
14:48:54 system | sending SIGTERM to redis_socketio.1 (pid 899)
14:48:54 system | sending SIGTERM to redis_queue.1 (pid 884)
14:48:54 system | sending SIGTERM to web.1 (pid 886)
14:48:54 system | sending SIGTERM to watch.1 (pid 897)
14:48:54 system | sending SIGTERM to schedule.1 (pid 917)
14:48:54 system | sending SIGTERM to worker_short.1 (pid 887)
14:48:54 system | sending SIGTERM to worker_long.1 (pid 889)
14:48:54 system | sending SIGTERM to worker_default.1 (pid 918)
14:48:54 redis_queue.1 | 891:signal-handler (1590072534) Received SIGTERM sch eduling shutdown…
14:48:54 redis_socketio.1 | 905:signal-handler (1590072534) Received SIGTERM sch eduling shutdown…
14:48:54 redis_cache.1 | 910:signal-handler (1590072534) Received SIGTERM sch eduling shutdown…
14:48:54 system | web.1 stopped (rc=-15)
14:48:54 system | worker_default.1 stopped (rc=-15)
14:48:54 system | schedule.1 stopped (rc=-15)
14:48:54 system | watch.1 stopped (rc=-15)
14:48:54 system | worker_short.1 stopped (rc=-15)
14:48:54 system | worker_long.1 stopped (rc=-15)
14:48:54 redis_queue.1 | 891:M 21 May 2020 14:48:54.930 # User requested shut down…
14:48:54 redis_queue.1 | 891:M 21 May 2020 14:48:54.930 * Removing the pid fi le.
14:48:54 redis_queue.1 | 891:M 21 May 2020 14:48:54.930 # Redis is now ready to exit, bye bye…
14:48:54 system | redis_queue.1 stopped (rc=-15)
14:48:54 redis_socketio.1 | 905:M 21 May 2020 14:48:54.942 # User requested shut down…
14:48:54 redis_socketio.1 | 905:M 21 May 2020 14:48:54.942 * Removing the pid fi le.
14:48:54 redis_socketio.1 | 905:M 21 May 2020 14:48:54.942 # Redis is now ready to exit, bye bye…
14:48:54 system | redis_socketio.1 stopped (rc=-15)
14:48:54 redis_cache.1 | 910:M 21 May 2020 14:48:54.944 # User requested shut down…
14:48:54 redis_cache.1 | 910:M 21 May 2020 14:48:54.944 * Removing the pid fi le.
14:48:54 redis_cache.1 | 910:M 21 May 2020 14:48:54.944 # Redis is now ready to exit, bye bye…
14:48:54 system | redis_cache.1 stopped (rc=-15)Done
does it mean went well? Should I now re-run the script? and open another terminal to run 03?
many thanks
Ok. That confirms what I thought. You are working with a very tiny screen size, so instead of failing to display the full status report, it passes its output to "less"
so you can easily scroll through it.
If you type "q"
, it will exit and continue.
Please, reboot again, log in then do:
cd frappe-bench/
bench start
Does it always show that error, then fail back to the command line prompt?
no nothing
erpdev@distin:~$ cd frappe-bench/
erpdev@distin:~/frappe-bench$ bencg start
bencg: command not found
erpdev@distin:~/frappe-bench$
went back to run script 01
to see what happen
sorry notice wrote wrong bench…
erpdev@distin:~/frappe-bench$ bench start
/usr/lib/python3.8/subprocess.py:844: RuntimeWarning: line buffering (buffering= 1) isn’t supported in binary mode, the default buffer size will be used
self.stdout = io.open(c2pread, ‘rb’, bufsize)
/usr/lib/python3.8/subprocess.py:844: RuntimeWarning: line buffering (buffering= 1) isn’t supported in binary mode, the default buffer size will be used
self.stdout = io.open(c2pread, ‘rb’, bufsize)
/usr/lib/python3.8/subprocess.py:844: RuntimeWarning: line buffering (buffering= 1) isn’t supported in binary mode, the default buffer size will be used
self.stdout = io.open(c2pread, ‘rb’, bufsize)
/usr/lib/python3.8/subprocess.py:844: RuntimeWarning: line buffering (buffering= 1) isn’t supported in binary mode, the default buffer size will be used
self.stdout = io.open(c2pread, ‘rb’, bufsize)
/usr/lib/python3.8/subprocess.py:844: RuntimeWarning: line buffering (buffering= 1) isn’t supported in binary mode, the default buffer size will be used
self.stdout = io.open(c2pread, ‘rb’, bufsize)
/usr/lib/python3.8/subprocess.py:844: RuntimeWarning: line buffering (buffering= 1) isn’t supported in binary mode, the default buffer size will be used
self.stdout = io.open(c2pread, ‘rb’, bufsize)
/usr/lib/python3.8/subprocess.py:844: RuntimeWarning: line buffering (buffering= 1) isn’t supported in binary mode, the default buffer size will be used
self.stdout = io.open(c2pread, ‘rb’, bufsize)
/usr/lib/python3.8/subprocess.py:844: RuntimeWarning: line buffering (buffering= 1) isn’t supported in binary mode, the default buffer size will be used
self.stdout = io.open(c2pread, ‘rb’, bufsize)
/usr/lib/python3.8/subprocess.py:844: RuntimeWarning: line buffering (buffering= 1) isn’t supported in binary mode, the default buffer size will be used
self.stdout = io.open(c2pread, ‘rb’, bufsize)
/usr/lib/python3.8/subprocess.py:844: RuntimeWarning: line buffering (buffering= 1) isn’t supported in binary mode, the default buffer size will be used
self.stdout = io.open(c2pread, ‘rb’, bufsize)
15:55:00 system | redis_queue.1 started (pid=6191)
15:55:00 system | redis_cache.1 started (pid=6190)
15:55:00 system | redis_socketio.1 started (pid=6192)
15:55:00 redis_socketio.1 | 6199:C 21 May 2020 15:55:00.836 # oO0OoO0OoO0Oo Redi s is starting oO0OoO0OoO0Oo
15:55:00 redis_socketio.1 | 6199:C 21 May 2020 15:55:00.836 # Redis version=5.0. 7, bits=64, commit=00000000, modified=0, pid=6199, just started
15:55:00 redis_socketio.1 | 6199:C 21 May 2020 15:55:00.836 # Configuration load ed
15:55:00 redis_socketio.1 | 6199:M 21 May 2020 15:55:00.837 * Increased maximum number of open files to 10032 (it was originally set to 1024).
15:55:00 redis_socketio.1 | 6199:M 21 May 2020 15:55:00.837 * Running mode=stand alone, port=12000.
15:55:00 redis_socketio.1 | 6199:M 21 May 2020 15:55:00.837 # Server initialized
15:55:00 redis_socketio.1 | 6199:M 21 May 2020 15:55:00.837 # WARNING overcommit _memory is set to 0! Background save may fail under low memory condition. To fix this issue add ‘vm.overcommit_memory = 1’ to /etc/sysctl.conf and then reboot o r run the command ‘sysctl vm.overcommit_memory=1’ for this to take effect.
15:55:00 redis_socketio.1 | 6199:M 21 May 2020 15:55:00.837 # WARNING you have T ransparent Huge Pages (THP) support enabled in your kernel. This will create lat ency and memory usage issues with Redis. To fix this issue run the command ‘echo never > /sys/kernel/mm/transparent_hugepage/enabled’ as root, and add it to you r /etc/rc.local in order to retain the setting after a reboot. Redis must be res tarted after THP is disabled.
15:55:00 redis_socketio.1 | 6199:M 21 May 2020 15:55:00.837 * Ready to accept co nnections
15:55:00 redis_queue.1 | 6206:C 21 May 2020 15:55:00.838 # oO0OoO0OoO0Oo Redi s is starting oO0OoO0OoO0Oo
15:55:00 redis_queue.1 | 6206:C 21 May 2020 15:55:00.838 # Redis version=5.0. 7, bits=64, commit=00000000, modified=0, pid=6206, just started
15:55:00 redis_queue.1 | 6206:C 21 May 2020 15:55:00.838 # Configuration load ed
15:55:00 redis_queue.1 | 6206:M 21 May 2020 15:55:00.839 * Increased maximum number of open files to 10032 (it was originally set to 1024).
15:55:00 redis_queue.1 | 6206:M 21 May 2020 15:55:00.840 * Running mode=stand alone, port=11000.
15:55:00 redis_queue.1 | 6206:M 21 May 2020 15:55:00.840 # Server initialized
15:55:00 redis_queue.1 | 6206:M 21 May 2020 15:55:00.840 # WARNING overcommit _memory is set to 0! Background save may fail under low memory condition. To fix this issue add ‘vm.overcommit_memory = 1’ to /etc/sysctl.conf and then reboot o r run the command ‘sysctl vm.overcommit_memory=1’ for this to take effect.
15:55:00 redis_queue.1 | 6206:M 21 May 2020 15:55:00.840 # WARNING you have T ransparent Huge Pages (THP) support enabled in your kernel. This will create lat ency and memory usage issues with Redis. To fix this issue run the command ‘echo never > /sys/kernel/mm/transparent_hugepage/enabled’ as root, and add it to you r /etc/rc.local in order to retain the setting after a reboot. Redis must be res tarted after THP is disabled.
15:55:00 redis_queue.1 | 6206:M 21 May 2020 15:55:00.840 * Ready to accept co nnections
15:55:00 system | worker_short.1 started (pid=6202)
15:55:00 system | socketio.1 started (pid=6193)
15:55:00 system | worker_long.1 started (pid=6226)
15:55:00 system | web.1 started (pid=6194)
15:55:00 system | watch.1 started (pid=6195)
15:55:00 system | worker_default.1 started (pid=6227)
15:55:00 system | schedule.1 started (pid=6204)
15:55:00 redis_cache.1 | 6196:C 21 May 2020 15:55:00.828 # oO0OoO0OoO0Oo Redi s is starting oO0OoO0OoO0Oo
15:55:00 redis_cache.1 | 6196:C 21 May 2020 15:55:00.828 # Redis version=5.0. 7, bits=64, commit=00000000, modified=0, pid=6196, just started
15:55:00 redis_cache.1 | 6196:C 21 May 2020 15:55:00.828 # Configuration load ed
15:55:00 redis_cache.1 | 6196:M 21 May 2020 15:55:00.829 * Increased maximum number of open files to 10032 (it was originally set to 1024).
15:55:00 redis_cache.1 | 6196:M 21 May 2020 15:55:00.833 * Running mode=stand alone, port=13000.
15:55:00 redis_cache.1 | 6196:M 21 May 2020 15:55:00.834 # Server initialized
15:55:00 redis_cache.1 | 6196:M 21 May 2020 15:55:00.834 # WARNING overcommit _memory is set to 0! Background save may fail under low memory condition. To fix this issue add ‘vm.overcommit_memory = 1’ to /etc/sysctl.conf and then reboot o r run the command ‘sysctl vm.overcommit_memory=1’ for this to take effect.
15:55:00 redis_cache.1 | 6196:M 21 May 2020 15:55:00.834 # WARNING you have T ransparent Huge Pages (THP) support enabled in your kernel. This will create lat ency and memory usage issues with Redis. To fix this issue run the command ‘echo never > /sys/kernel/mm/transparent_hugepage/enabled’ as root, and add it to you r /etc/rc.local in order to retain the setting after a reboot. Redis must be res tarted after THP is disabled.
15:55:00 redis_cache.1 | 6196:M 21 May 2020 15:55:00.834 * Ready to accept co nnections
15:55:00 socketio.1 | internal/modules/cjs/loader.js:960
15:55:00 socketio.1 | throw err;
15:55:00 socketio.1 | ^
15:55:00 socketio.1 |
15:55:00 socketio.1 | Error: Cannot find module ‘express’
15:55:00 socketio.1 | Require stack:
15:55:00 socketio.1 | - /home/erpdev/frappe-bench/apps/frappe/socketio.js
15:55:00 socketio.1 | at Function.Module._resolveFilename (internal/mo dules/cjs/loader.js:957:15)
15:55:00 socketio.1 | at Function.Module._load (internal/modules/cjs/l oader.js:840:27)
15:55:00 socketio.1 | at Module.require (internal/modules/cjs/loader.j s:1019:19)
15:55:00 socketio.1 | at require (internal/modules/cjs/helpers.js:77:1 8)
15:55:00 socketio.1 | at Object. (/home/erpdev/frappe-bench /apps/frappe/socketio.js:1:11)
15:55:00 socketio.1 | at Module._compile (internal/modules/cjs/loader. js:1133:30)
15:55:00 socketio.1 | at Object.Module._extensions…js (internal/modul es/cjs/loader.js:1153:10)
15:55:00 socketio.1 | at Module.load (internal/modules/cjs/loader.js:9 77:32)
15:55:00 socketio.1 | at Function.Module._load (internal/modules/cjs/l oader.js:877:14)
15:55:00 socketio.1 | at Function.executeUserEntryPoint [as runMain] ( internal/modules/run_main.js:74:12) {
15:55:00 socketio.1 | code: ‘MODULE_NOT_FOUND’,
15:55:00 socketio.1 | requireStack: [ ‘/home/erpdev/frappe-bench/apps/fr appe/socketio.js’ ]
15:55:00 socketio.1 | }
15:55:01 system | socketio.1 stopped (rc=1)
15:55:01 system | sending SIGTERM to redis_cache.1 (pid 6190)
15:55:01 system | sending SIGTERM to redis_socketio.1 (pid 6192)
15:55:01 system | sending SIGTERM to redis_queue.1 (pid 6191)
15:55:01 system | sending SIGTERM to web.1 (pid 6194)
15:55:01 system | sending SIGTERM to watch.1 (pid 6195)
15:55:01 system | sending SIGTERM to schedule.1 (pid 6204)
15:55:01 system | sending SIGTERM to worker_short.1 (pid 6202)
15:55:01 system | sending SIGTERM to worker_long.1 (pid 6226)
15:55:01 system | sending SIGTERM to worker_default.1 (pid 6227)
15:55:01 redis_cache.1 | 6196:signal-handler (1590076501) Received SIGTERM sc heduling shutdown…
15:55:01 redis_socketio.1 | 6199:signal-handler (1590076501) Received SIGTERM sc heduling shutdown…
15:55:01 redis_queue.1 | 6206:signal-handler (1590076501) Received SIGTERM sc heduling shutdown…
15:55:01 system | web.1 stopped (rc=-15)
15:55:01 system | worker_default.1 stopped (rc=-15)
15:55:01 system | watch.1 stopped (rc=-15)
15:55:01 system | worker_short.1 stopped (rc=-15)
15:55:01 system | schedule.1 stopped (rc=-15)
15:55:01 system | worker_long.1 stopped (rc=-15)
15:55:01 redis_cache.1 | 6196:M 21 May 2020 15:55:01.034 # User requested shu tdown…
15:55:01 redis_cache.1 | 6196:M 21 May 2020 15:55:01.034 * Removing the pid f ile.
15:55:01 redis_cache.1 | 6196:M 21 May 2020 15:55:01.034 # Redis is now ready to exit, bye bye…
15:55:01 system | redis_cache.1 stopped (rc=-15)
15:55:01 redis_queue.1 | 6206:M 21 May 2020 15:55:01.040 # User requested shu tdown…
15:55:01 redis_queue.1 | 6206:M 21 May 2020 15:55:01.040 * Removing the pid f ile.
15:55:01 redis_queue.1 | 6206:M 21 May 2020 15:55:01.040 # Redis is now ready to exit, bye bye…
15:55:01 system | redis_queue.1 stopped (rc=-15)
15:55:01 redis_socketio.1 | 6199:M 21 May 2020 15:55:01.041 # User requested shu tdown…
15:55:01 redis_socketio.1 | 6199:M 21 May 2020 15:55:01.041 * Removing the pid f ile.
15:55:01 redis_socketio.1 | 6199:M 21 May 2020 15:55:01.041 # Redis is now ready to exit, bye bye…
15:55:01 system | redis_socketio.1 stopped (rc=-15)
erpdev@distin:~/frappe-bench$
I cannot see any reason for that to be happening.
You are using a completely fresh install of Ubuntu 20.04 correct?
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
Update: 2020/06/29 Pandas version bug!
Running these scripts on 20.04 LTS will fail due to a bug in a new version of Python module “Pandas”.
There is a fix : Bench installation of erpnext fails on pandas setup if numpy>=1.19.0 · Issue #22424 · frappe/erpnext · GitHub
I’ll add the fix as soon as I can.
Hi @MartinHBramwell,
I try to install ERPNext in ubuntu 20.04
Which file do I need to download over 5 of your files?
And how about the step?
Thank.
As it says at the beginning of the first file:
This first section is set up to facilitate snippet drag and drop from the GitHub gist.
At the end of it you’ll be ready to get the files and run them.
You just select, drag and drop a command at a time, from the browser page, directly onto your terminal.
The last step of the second section of the first script uses wget
to help you get the script and prepare to run it.
4. Get the first of the installer script files ready to run
# Move into a temporary directory
mkdir -p /tmp/erpnext
chmod ugo+rwx /tmp/erpnext
cd /tmp/erpnext
# Pull and set permissions for the first of the four files (this one)
wget -O ErpNextQikInstall_0.sh gist.githubusercontent.com/martinhbramwell/347d8fd4b3f073b099aabbf4512c14b4/raw/ErpNextQikInstall_0.sh?cachebust=anything;
chmod +x ErpNextQikInstall_0.sh;
# Edit the three settings at the top of the script: MYPWD, ADMPWD & THESITE, eg: nano ErpNextQikInstall_0.sh;
# nano ErpNextQikInstall_0.sh; # If you use nano, use <ctrl>-x to exit
# Execute the script to ensure 'sudo -A' is working
./ErpNextQikInstall_0.sh;
As far as I have learned from other users, the instruction comments provide all you need to know.
Thank for your answer, i will try.