Tying to upgrade a perfectly running v11 erpnext install on Ubuntu 16.04. to Ubuntu 18.04
running:
sudo apt update
sudo apt upgrade
sudo do-release-upgrade
all works fine. However when I go to
supervisorctl start all
I get 5 fatal errors.
root@erpnextv12-4:/home/frappe/frappe-bench/logs# supervisorctl start all
frappe-bench-workers:frappe-bench-frappe-default-worker-0: ERROR (spawn error)
frappe-bench-web:frappe-bench-frappe-web: ERROR (spawn error)
frappe-bench-workers:frappe-bench-frappe-long-worker-0: ERROR (spawn error)
frappe-bench-workers:frappe-bench-frappe-short-worker-0: ERROR (spawn error)
frappe-bench-workers:frappe-bench-frappe-schedule: ERROR (spawn error)
frappe-bench-web:frappe-bench-node-socketio: started
frappe-bench-redis:frappe-bench-redis-queue: started
frappe-bench-redis:frappe-bench-redis-cache: started
frappe-bench-redis:frappe-bench-redis-socketio: started
my first problem seems to come in web.error.log
systems@erpnextv12-4:/home/frappe/frappe-bench/logs$ cat web.error.log
[2022-03-15 13:58:46 +0000] [5605] [INFO] Starting gunicorn 19.9.0
[2022-03-15 13:58:46 +0000] [5605] [INFO] Listening at: http://127.0.0.1:8000 (5605)
[2022-03-15 13:58:46 +0000] [5605] [INFO] Using worker: sync
[2022-03-15 13:58:46 +0000] [5667] [INFO] Booting worker with pid: 5667
[2022-03-15 13:58:46 +0000] [5668] [INFO] Booting worker with pid: 5668
[2022-03-15 13:58:46 +0000] [5692] [INFO] Booting worker with pid: 5692
[2022-03-15 13:58:46 +0000] [5693] [INFO] Booting worker with pid: 5693
[2022-03-15 13:58:46 +0000] [5694] [INFO] Booting worker with pid: 5694
[2022-03-15 13:58:46 +0000] [5696] [INFO] Booting worker with pid: 5696
[2022-03-15 13:58:46 +0000] [5697] [INFO] Booting worker with pid: 5697
[2022-03-15 13:58:46 +0000] [5698] [INFO] Booting worker with pid: 5698
[2022-03-15 14:05:55 +0000] [5605] [INFO] Handling signal: term
[2022-03-15 14:05:55 +0000] [5696] [INFO] Worker exiting (pid: 5696)
[2022-03-15 14:05:55 +0000] [5667] [INFO] Worker exiting (pid: 5667)
[2022-03-15 14:05:55 +0000] [5697] [INFO] Worker exiting (pid: 5697)
[2022-03-15 14:05:55 +0000] [5698] [INFO] Worker exiting (pid: 5698)
[2022-03-15 14:05:55 +0000] [5668] [INFO] Worker exiting (pid: 5668)
[2022-03-15 14:05:55 +0000] [5692] [INFO] Worker exiting (pid: 5692)
[2022-03-15 14:05:55 +0000] [5693] [INFO] Worker exiting (pid: 5693)
[2022-03-15 14:05:55 +0000] [5694] [INFO] Worker exiting (pid: 5694)
[2022-03-15 14:05:56 +0000] [5605] [INFO] Shutting down: Master
Could not find platform independent libraries <prefix>
Could not find platform dependent libraries <exec_prefix>
Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>]
Fatal Python error: Py_Initialize: Unable to get the locale encoding
ImportError: No module named 'encodings'
Current thread 0x00007ff5d84c3740 (most recent call first):
Could not find platform independent libraries <prefix>
Could not find platform dependent libraries <exec_prefix>
Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>]
Fatal Python error: Py_Initialize: Unable to get the locale encoding
ImportError: No module named 'encodings'
Current thread 0x00007fbd6a951740 (most recent call first):
Could not find platform independent libraries <prefix>
Could not find platform dependent libraries <exec_prefix>
Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>]
Fatal Python error: Py_Initialize: Unable to get the locale encoding
ImportError: No module named 'encodings'
Current thread 0x00007fb1e91fa740 (most recent call first):
Could not find platform independent libraries <prefix>
Could not find platform dependent libraries <exec_prefix>
Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>]
Fatal Python error: Py_Initialize: Unable to get the locale encoding
ImportError: No module named 'encodings'
Now this last makes me think something in the upgrade has messed up my python settings. I am thinking that if I can fix that, the other errors will fall away ?
So can anyone suggest the best way to fix this ? I have already looked at just “fixing python” but that’s a huge topic with no single answer.