New Install issue (multiple attempts) - Don't Panic - no success

Did you use easy install script or did you manually install frappe-bench?

BTW, is this the latest version of bench?

Used a script but not easy install. Bench version 4.1
The script I have created is for installing erpnext on CentOS and follows bench standard installation command set

Help needed

Can you try using the easy install scripts from bench. It supports Cent OS as well.

cd ~ || yum check-update && yum update -y && yum install -y python-devel git vim curl wget

wget https://raw.githubusercontent.com/frappe/bench/master/playbooks/install.py && sudo python install.py --production --user frappe
1 Like

git clone GitHub - frappe/bench: CLI to manage Multi-tenant deployments for Frappe apps bench-repo --branch master

—sudo python /home/centos/get-pip.py

sudo pip install -e bench-repo
bench init erpnext && cd erpnext

bench get-app erpnext GitHub - frappe/erpnext: Free and Open Source Enterprise Resource Planning (ERP) --branch master

bench switch-to-master

bench update

bench new-site {XYZ}

bench --site {XYZ} install-app erpnext

sudo yum install -y supervisor
sudo systemctl start supervisord
sudo systemctl enable supervisord
sudo systemctl status supervisord

sudo bench setup production bench

chmod o+x /opt/bench/

Error using easy install

Running setup.py bdist_wheel for pycparser ... done
  Stored in directory: /root/.cache/pip/wheels/c0/a1/27/5ba234bd77ea5a290cbf6d675259ec52293193467a12ef1f46
Successfully built pycparser
Installing collected packages: setuptools, urllib3, idna, chardet, certifi, requests, pycparser, cffi, enum34, asn1crypto, cryptography, pip
  Found existing installation: setuptools 0.9.8
    Uninstalling setuptools-0.9.8:
      Successfully uninstalled setuptools-0.9.8
  Found existing installation: urllib3 1.10.2
    Uninstalling urllib3-1.10.2:
      Successfully uninstalled urllib3-1.10.2
  Found existing installation: chardet 2.2.1
    Uninstalling chardet-2.2.1:
      Successfully uninstalled chardet-2.2.1
  Found existing installation: requests 2.6.0
Cannot uninstall 'requests'. It is a distutils installed project and thus we cannot accurately determine which files belong to it which would lead to only a partial uninstall.
Traceback (most recent call last):
  File "install.py", line 420, in <module>
    install_bench(args)
  File "install.py", line 54, in install_bench
    'pip': 'sudo pip install --upgrade setuptools urllib3 requests cryptography pip==9.0.3'
  File "install.py", line 234, in run_os_command
    returncode = subprocess.check_call(command, shell=True)
  File "/usr/lib64/python2.7/subprocess.py", line 542, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command 'sudo pip install --upgrade setuptools urllib3 requests cryptography pip==9.0.3' returned non-zero exit status 1

CentOS has selinux that may be the problem? It may need to be set to ‘permissive’ For eg **UPDATE**Move /tmp/.bench error in Centos 7 & Debian 8 with install.py

Do yum remove python-requests and try executing the easy install again

After doing easy install -
created one website
removed site1.local
made the new site as default
bench restart

Which config variable/database field causes this?

Check the logs for clues to the problem - a traceback caused by an error - to post back here to troubleshoot.

frappe@ubuntu:~/frappe-bench$ find logs -name ‘*.log’ | xargs ls -alt
-rw-r–r-- 1 frappe frappe 91960 Jul 13 15:33 logs/frappe.log
-rw-r–r-- 1 root root 49243031 Jul 13 15:32 logs/worker.error.log
-rw-rw-r-- 1 frappe frappe 3528 Jul 13 10:00 logs/auto_update_log.log
-rw-r–r-- 1 root root 69398 Jul 6 18:22 logs/web.error.log
-rw-r–r-- 1 root root 23647 Jul 6 18:21 logs/node-socketio.log
-rw-r–r-- 1 root root 59987 Jul 6 18:21 logs/redis-cache.log
-rw-r–r-- 1 root root 59987 Jul 6 18:21 logs/redis-socketio.log
-rw-r–r-- 1 root root 59987 Jul 6 18:21 logs/redis-queue.log
-rw-r–r-- 1 root root 4476928 Jun 20 02:49 logs/schedule.log
-rw-r–r-- 1 frappe frappe 5428 Jun 18 22:52 logs/bench.log
-rw-r–r-- 1 root root 0 Mar 9 09:53 logs/schedule.error.log
-rw-r–r-- 1 root root 0 Mar 9 09:53 logs/worker.log
-rw-r–r-- 1 root root 0 Mar 9 09:53 logs/node-socketio.error.log
-rw-r–r-- 1 root root 0 Mar 9 09:53 logs/web.log
-rw-r–r-- 1 root root 0 Mar 9 09:53 logs/redis-socketio.error.log
-rw-r–r-- 1 root root 0 Mar 9 09:53 logs/redis-cache.error.log
-rw-r–r-- 1 root root 0 Mar 9 09:53 logs/redis-queue.error.log

1 Like

Not able to identify the issue that will cause “Don’t Panic” from the log files.

Redis log:
24892:M 12 Jul 18:14:17.860 # 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 or run the command ‘sysctl vm.overcommit_memory=1’ for this to take effect.
24892:M 12 Jul 18:14:17.861 # WARNING you have Transparent Huge Pages (THP) support enabled in your kernel. This will create latency 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 your /etc/rc.local in order to retain the setting after a reboot. Redis must be restarted after THP is disabled.

Worker Error.log
18:14:19 RQ worker u’rq:worker:ip-172-31-10-4.ap-south-1.compute.internal.24886.default’ started, version 0.11.0
18:14:19 *** Listening on default…
18:14:19 Cleaning registries for queue: default
18:14:19 RQ worker u’rq:worker:ip-172-31-10-4.ap-south-1.compute.internal.24889.short’ started, version 0.11.0
18:14:19 *** Listening on short…
18:14:19 Cleaning registries for queue: short
18:14:20 RQ worker u’rq:worker:ip-172-31-10-4.ap-south-1.compute.internal.24888.long’ started, version 0.11.0
18:14:20 *** Listening on long…
18:14:20 Cleaning registries for queue: long
18:14:20 Warm shut down requested
18:14:21 Warm shut down requested
18:14:22 Warm shut down requested
18:14:29 RQ worker u’rq:worker:ip-172-31-10-4.ap-south-1.compute.internal.25051.default’ started, version 0.11.0
18:14:29 *** Listening on default…
18:14:29 Cleaning registries for queue: default
18:14:30 RQ worker u’rq:worker:ip-172-31-10-4.ap-south-1.compute.internal.25090.long’ started, version 0.11.0
18:14:30 *** Listening on long…
18:14:30 Cleaning registries for queue: long
18:14:31 RQ worker u’rq:worker:ip-172-31-10-4.ap-south-1.compute.internal.25110.short’ started, version 0.11.0
18:14:31 *** Listening on short…
18:14:31 Cleaning registries for queue: short
18:27:50 Warm shut down requested
18:27:51 Warm shut down requested
18:27:52 Warm shut down requested
18:27:59 RQ worker u’rq:worker:ip-172-31-10-4.ap-south-1.compute.internal.25463.default’ started, version 0.11.0
18:27:59 *** Listening on default…
18:27:59 Cleaning registries for queue: default
18:28:00 RQ worker u’rq:worker:ip-172-31-10-4.ap-south-1.compute.internal.25502.long’ started, version 0.11.0
18:28:00 *** Listening on long…
18:28:00 Cleaning registries for queue: long
18:28:01 RQ worker u’rq:worker:ip-172-31-10-4.ap-south-1.compute.internal.25522.short’ started, version 0.11.0
18:28:01 *** Listening on short…
18:28:01 Cleaning registries for queue: short
18:44:46 Warm shut down requested
18:44:47 Warm shut down requested
18:44:48 Warm shut down requested
18:44:55 RQ worker u’rq:worker:ip-172-31-10-4.ap-south-1.compute.internal.25715.default’ started, version 0.11.0
18:44:55 *** Listening on default…
18:44:55 Cleaning registries for queue: default
18:44:56 RQ worker u’rq:worker:ip-172-31-10-4.ap-south-1.compute.internal.25747.long’ started, version 0.11.0
18:44:56 *** Listening on long…
18:44:56 Cleaning registries for queue: long
18:44:56 RQ worker u’rq:worker:ip-172-31-10-4.ap-south-1.compute.internal.25755.short’ started, version 0.11.0
18:44:56 *** Listening on short…
18:44:56 Cleaning registries for queue: short

Node.socketio.log
Sat, 14 Jul 2018 03:34:40 GMT express deprecated res.sendfile: Use res.sendFile instead at apps/frappe/socketio.js:31:6
Error: ENOENT: no such file or directory, stat ‘/home/bench/frappe-bench/index.html’

Auto Update Log {It was set to off for the fresh installation using bench}
/bin/sh: /home/bench/frappe-bench/env/bin/bench: No such file or directory
/bin/sh: /home/bench/frappe-bench/env/bin/bench: No such file or directory

web.log {Default site changed and site1.local was dropped using bench}
site1.local does not exist
site1.local does not exist
site1.local does not exist
site1.local does not exist

Web.error.log
[2018-07-14 17:55:30 +0000] [20008] [INFO] Booting worker with pid: 20008
[2018-07-14 18:02:58 +0000] [19486] [INFO] Worker exiting (pid: 19486)
[2018-07-14 18:02:58 +0000] [20067] [INFO] Booting worker with pid: 20067
[2018-07-14 18:18:08 +0000] [20067] [INFO] Worker exiting (pid: 20067)
[2018-07-14 18:18:08 +0000] [20098] [INFO] Booting worker with pid: 20098
[2018-07-14 18:27:18 +0000] [19729] [INFO] Worker exiting (pid: 19729)
[2018-07-14 18:27:19 +0000] [20136] [INFO] Booting worker with pid: 20136
[2018-07-14 19:26:04 +0000] [20098] [INFO] Worker exiting (pid: 20098)
[2018-07-14 19:26:04 +0000] [20252] [INFO] Booting worker with pid: 20252
[2018-07-14 19:42:24 +0000] [20136] [INFO] Worker exiting (pid: 20136)
[2018-07-14 19:42:24 +0000] [20278] [INFO] Booting worker with pid: 20278

On bench update
INFO:bench.utils:./env/bin/pip install Pillow
Requirement already satisfied: Pillow in ./env/lib/python2.7/site-packages
You are using pip version 9.0.3, however version 10.0.1 is available.
You should consider upgrading via the ‘pip install --upgrade pip’ command.

Cannot proceed with update: You have local changes in app “frappe_io” that are not committed.

Here are your choices:

  1. Merge the frappe_io app manually with “git pull” / “git pull --rebase” and fix conflicts.
  2. Temporarily remove your changes with “git stash” or discard them completely
    with “bench update --reset” or for individual repositries “git reset --hard”
  3. If your changes are helpful for others, send in a pull request via GitHub and
    wait for them to be merged in the core.

Make sure you have not made changes in your apps. If you haven’t do this:

bench update --reset

HEY! USE SCREEN -bash-4.2$ bench update --reset
INFO:bench.utils:updating bench
INFO:bench.utils:git pull
Already up-to-date.
INFO:bench.utils:./env/bin/pip install Pillow
Requirement already satisfied: Pillow in ./env/lib/python2.7/site-packages
You are using pip version 9.0.3, however version 10.0.1 is available.
You should consider upgrading via the ‘pip install --upgrade pip’ command.
INFO:bench.app:pulling frappe
INFO:bench.utils:git fetch --all
Fetching upstream
INFO:bench.utils:git reset --hard upstream/master
HEAD is now at 8ad60a2 Merge branch ‘hotfix’
INFO:bench.utils:find . -name “.pyc" -delete
INFO:bench.app:pulling frappe_io
INFO:bench.utils:git fetch --all
Fetching upstream
INFO:bench.utils:git reset --hard upstream/master
HEAD is now at ae1c05d Datatable page
INFO:bench.utils:find . -name "
.pyc” -delete
INFO:bench.app:pulling erpnext
INFO:bench.utils:git fetch --all
Fetching upstream
remote: Counting objects: 193, done.
remote: Compressing objects: 100% (13/13), done.
remote: Total 193 (delta 149), reused 155 (delta 149), pack-reused 31
Receiving objects: 100% (193/193), 49.15 KiB | 0 bytes/s, done.
Resolving deltas: 100% (150/150), completed with 106 local objects.
From GitHub - frappe/erpnext: Free and Open Source Enterprise Resource Planning (ERP)
0c51d40…656016b develop → upstream/develop
8dc4c94…3ffe896 hotfix → upstream/hotfix
INFO:bench.utils:git reset --hard upstream/master
HEAD is now at f38d6d9 Merge branch ‘hotfix’
INFO:bench.utils:find . -name “*.pyc” -delete
INFO:bench.app:pulling foundation
INFO:bench.utils:git fetch --all
Fetching upstream
remote: Counting objects: 37, done.
remote: Compressing objects: 100% (16/16), done.
remote: Total 37 (delta 17), reused 14 (delta 14), pack-reused 7
Unpacking objects: 100% (37/37), done.
From GitHub - erpnext/foundation: Website for ERPNext Foundation
74c30f7…cad7b3f master → upstream/master

  • [new branch] kennethsequeira-patch-8 → upstream/kennethsequeira-patch-8
    INFO:bench.utils:git reset --hard upstream/master
    HEAD is now at cad7b3f Merge pull request #243 from erpnext/kennethsequeira-patch-8
    INFO:bench.utils:find . -name “*.pyc” -delete
    Updating Python libraries…
    INFO:bench.utils:./env/bin/pip install --upgrade pip==9.0.3
    Cache entry deserialization failed, entry ignored
    Requirement already up-to-date: pip==9.0.3 in ./env/lib/python2.7/site-packages
    You are using pip version 9.0.3, however version 10.0.1 is available.
    You should consider upgrading via the ‘pip install --upgrade pip’ command.
    INFO:bench.utils:./env/bin/pip install -q -r /home/bench/.bench/requirements.txt
    INFO:bench.utils:./env/bin/pip install -q -r ./apps/frappe/requirements.txt
    INFO:bench.utils:./env/bin/pip install -q -r ./apps/frappe_io/requirements.txt
    INFO:bench.utils:./env/bin/pip install -q -r ./apps/erpnext/requirements.txt
    INFO:bench.utils:./env/bin/pip install -q -r ./apps/foundation/requirements.txt
    Updating node packages…
    INFO:bench.utils:npm install
    npm WARN frappe@ No description
    npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.4 (node_modules/fsevents):
    npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.4: wanted {“os”:“darwin”,“arch”:“any”} (current: {“os”:“linux”,“arch”:“x64”})

up to date in 1.751s
Backing up sites…
Patching sites…
Migrating odin
Updating DocTypes for frappe : [========================================]
Updating DocTypes for erpnext : [========================================]
Syncing help database…
/home/bench/frappe-bench/apps/frappe/frappe/build.py:106: UserWarning: Source /home/bench/frappe-bench/apps/frappe_io/frappe_io/docs does not exists.
warnings.warn(‘Source {source} does not exists.’.format(source = source))
/home/bench/frappe-bench/apps/frappe/frappe/build.py:106: UserWarning: Source /home/bench/frappe-bench/apps/foundation/foundation/docs does not exists.
warnings.warn(‘Source {source} does not exists.’.format(source = source))
SyntaxError: Unexpected end of JSON input
at JSON.parse ()
at make_build_map (/home/bench/frappe-bench/apps/frappe/frappe/build.js:193:22)
at Object. (/home/bench/frappe-bench/apps/frappe/frappe/build.js:22:17)
at Module._compile (module.js:652:30)
at Object.Module._extensions…js (module.js:663:10)
at Module.load (module.js:565:32)
at tryModuleLoad (module.js:505:12)
at Function.Module._load (module.js:497:3)
at Function.Module.runMain (module.js:693:10)
at startup (bootstrap_node.js:191:16)
Wrote css/frappe-web.css - 65.11 KB
Wrote js/frappe-web.min.js - 132.75 KB
Wrote js/control.min.js - 77.04 KB
Wrote js/dialog.min.js - 116.9 KB
Wrote css/desk.min.css - 309.04 KB
Wrote css/frappe-rtl.css - 32.49 KB
Wrote js/libs.min.js - 1.13 MB
Wrote js/desk.min.js - 462.49 KB
Wrote css/module.min.css - 2.08 KB
Wrote css/form.min.css - 4.47 KB
Wrote js/form.min.js - 196.67 KB
Wrote css/list.min.css - 13.35 KB
Wrote js/list.min.js - 154.71 KB
Wrote css/report.min.css - 7.89 KB
Wrote js/report.min.js - 260.26 KB
Wrote js/web_form.min.js - 247.55 KB
Wrote css/web_form.css - 24.42 KB
Wrote js/print_format_v3.min.js - 23.39 KB
Wrote frappe_io/js/docs.js - 1.62 KB
Wrote css/erpnext.css - 8 KB
Wrote js/erpnext-web.min.js - 3.8 KB
Wrote js/erpnext.min.js - 166.05 KB
Wrote js/item-dashboard.min.js - 8.13 KB
INFO:bench.utils:sudo supervisorctl restart frappe-bench-workers: frappe-bench-web:
frappe-bench-workers:frappe-bench-frappe-schedule: stopped
frappe-bench-workers:frappe-bench-frappe-default-worker-0: stopped
frappe-bench-workers:frappe-bench-frappe-long-worker-0: stopped
frappe-bench-workers:frappe-bench-frappe-short-worker-0: stopped
frappe-bench-web:frappe-bench-frappe-web: stopped
frappe-bench-web:frappe-bench-node-socketio: stopped
frappe-bench-workers:frappe-bench-frappe-schedule: started
frappe-bench-workers:frappe-bench-frappe-default-worker-0: started
frappe-bench-workers:frappe-bench-frappe-long-worker-0: started
frappe-bench-workers:frappe-bench-frappe-short-worker-0: started
frappe-bench-web:frappe-bench-frappe-web: started
frappe-bench-web:frappe-bench-node-socketio: started


Bench: Deployment tool for Frappe and ERPNext (https://erpnext.org).
Open source depends on your contributions, so please contribute bug reports, patches, fixes or cash and be a part of the community
()
HEY! USE SCREEN -bash-4.2$

Execute the commands and post the output

cat sites/currentsite.txt
bench setup nginx
sudo service nginx restart
1 Like

It worked - looks like nginx needs to be configured post installation {need to check nginx.conf in base}

HEY! USE SCREEN -bash-4.2$ ls
apps archived_sites config env logs node_modules package.json package-lock.json patches.txt Procfile sites
HEY! USE SCREEN -bash-4.2$ cat sites/currentsite.txt
odin
HEY! USE SCREEN -bash-4.2$ bench setup nginx
Port configuration list:

Site odin assigned port: 80
nginx.conf already exists and this will overwrite it. Do you want to continue? [y/N]: N
Aborted!
HEY! USE SCREEN -bash-4.2$ bench setup nginx
Port configuration list:

Site odin assigned port: 80
nginx.conf already exists and this will overwrite it. Do you want to continue? [y/N]: y
HEY! USE SCREEN -bash-4.2$ sudo service nginx restart
Redirecting to /bin/systemctl restart nginx.service
HEY! USE SCREEN -bash-4.2$

Thanks Mate @codingCoffee . You have been a great help in resolving this.

This installation had been stuck for over 10 days

Easy install works by itself. However, since you deleted the existing site and created a new site the issue was caused. Hence re-configuring nginx fixed it.