I guess you skipped this step:
Just used @Muzzy install method and now get:
PLAY RECAP *********************************************************************************************************
localhost : ok=88 changed=52 unreachable=0 failed=0 skipped=59 rescued=0 ignored=0
Bench + Frappe + ERPNext has been successfully installed!
…
should I now be able to access on my www.[123].com?
Hello @bkm
I incorrectly posted this in the previous “easy” install script, but re-post it here in the correct topic.
Thanks so much for your ongoing focus on helping to install ERPNext.
I followed your instructions to the tee. However, I get errors when “install-app erpnext”. The error has to do with “cannot import name ‘clear cache’”. I fear it has something to do with Python vesions. The latest Debian 10.11 bundles Python 3.7, rather than 3.6 which is known to work. Do you know which minor version of Debian 10 had Python 3.6. We can then select the correct Debian iso from https://cdimage.debian.org/mirror/cdimage/archive/
Kindest regards
Further to my above comments, I’ve uncovered that Debian 10 bundled Python 3.7 ever since Debian 10.0. So it cannot be the Python version which causes the following errors.
1 During the bench get-app --branch version-13 erpnext
command I get the following error
ERROR: pip’s dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
frappe 13.16.0 requires PyJWT~=1.7.1, but you have pyjwt 2.3.0 which is incompatible.
However, the command continues and a bit later the following warning
Browserslist: caniuse-lite is outdated. Please run:
npx browserslist@latest --update-db
Browserslist: caniuse-lite is outdated. Please run next commandyarn upgrade caniuse-lite browserslist
The command then finishes successfully.
2 I then invoke the following command bench --site site1.local install-app erpnext
This command immediately terminates with this error
Module import failed for Payment Request (erpnext.accounts.doctype.payment_request.payment_request Error: cannot import name ‘clear_cache’ from ‘frappe.website.utils’ (/home/unmeep/frappe-bench/apps/frappe/frappe/website/utils.py))
Any help would be much appreciated as I (and I presume all of us) now have no way of installing ERPNext other than the Docker method.
Did you follow the suggested fix:
These suggestions are usually the correct path to getting things to work. At this point is has been just over 2 months since I have had to do a fresh install. During the coming weekend break I will revisit this instruction set to see how is it holding up.
BKM
Hello @bkm
Oh certainly, I tried every suggestion and also the recommendations on this forum:
1 I have no idea of what to do about the PyJWT incompatible versions. There are many forum topics about this but they are 2 to 3 years old.
2 I applied the 2 recommendations in both orders, and in both cases it succeeds, however it has no impact on the latter error.
3 The “cannot import name ‘clear_cache’” error has come up frequently in the past few days, and there are at least 5 forum topics on it, however, and sadly so, no second post to shed any light on the issue. The only glimmer of hope was from a post by @Suresh_Thakor in Error when running bench "update --patch" after fresh install However this also did not alleviate the error.
Please try using following command.
bench get-app erpnext GitHub - frappe/erpnext: Free and Open Source Enterprise Resource Planning (ERP) --branch version-13
Thanks @Suresh_Thakor
Your recommendation helped with alleviating the PyJWT error and the command completes successfully, however the caniuse warnings are still present.
I then run bench start
but the caniuse issue seems to prevent startup.
06:49:22 watch.1 | Watching…
06:49:22 watch.1 | Browserslist: caniuse-lite is outdated. Please run:
06:49:22 watch.1 | npx browserslist@latest --update-db
06:49:23 watch.1 | Error in: undefined
06:49:23 watch.1 | Error: ENOSPC: System limit for number of file watchers reached, watch ‘/home/unmeep/frappe-bench/apps/frappe/frappe/public/less/variables.less’
06:49:23 watch.1 | at FSWatcher. (internal/fs/watchers.js:243:19)
06:49:23 watch.1 | at Object.watch (fs.js:1586:34)
06:49:23 watch.1 | at new FileWatcher (/home/unmeep/frappe-bench/apps/frappe/node_modules/rollup/dist/rollup.js:37956:33)
06:49:23 watch.1 | at addTask (/home/unmeep/frappe-bench/apps/frappe/node_modules/rollup/dist/rollup.js:37890:36)
06:49:23 watch.1 | at Task.watchFile (/home/unmeep/frappe-bench/apps/frappe/node_modules/rollup/dist/rollup.js:38209:9)
06:49:23 watch.1 | at /home/unmeep/frappe-bench/apps/frappe/node_modules/rollup/dist/rollup.js:38188:39
06:49:23 watch.1 | at Array.forEach ()
06:49:23 watch.1 | at /home/unmeep/frappe-bench/apps/frappe/node_modules/rollup/dist/rollup.js:38187:58
06:49:23 watch.1 | at Array.forEach ()
06:49:23 watch.1 | at /home/unmeep/frappe-bench/apps/frappe/node_modules/rollup/dist/rollup.js:38185:41
Hi,
I’ve followed the installation step by step until
bench --site site1.local enable-scheduler
and rebooted the server and upon typing the ip adress in the browser, I got the below message:
Sorry!
We will be back soon.
Don’t panic. It’s not you, it’s us.
Most likely, our engineers are updating the code, and it should take a minute for the new code to load into memory.
Try refreshing after a minute or two.
And then ran the command bench start
Then I was finally able to see the erpnext login screen in the browser.
But how can I set erpnext to autostart on server reboot?
@mnabil777 I want to welcome you to the ERPNext community!! It is always good to see new users.
It is unfortunate that you had to encounter trouble while using one of my Tutorials. However, the problem is NOT of your making. It is one that has recently started happening after recent Debian updates.
At this point I do not have an answer.
I have also been struggling with this very same issue since Friday of last week. I have a friend that jumped in to help after I had struggled for 3 days trying to get a working server. He explained that for some reason the Supervisor was not running.
It should have started with the command:
sudo bench setup production [USER]
However something failed that had previously been working just fine.
The clue to this was found by running the following command:
sudo lsof -nP -iTCP -sTCP:LISTEN
The results indicated that no tasks were listening on port 8000, 11000, 12,000 or 13,000. With Supervisor not running then Redis and ERPNext do not launch.
The fix for my server was to copy a configuration file from the ERPNext configs directory to an appropriate location and restart Supervisor. (Again I do not have the exact details for this).
Please understand, I did not fix this myself. I had to call in help so I could get a test server active to allow me to test a new app that I had been waiting for this week. I am not familiar with the details of the fix.
I will try to work on how to avoid this after the holidays. I believe it has something to do with recent changes to the Debian 10 sources.
For now, I am extremely busy testing this new app and working out how to implement it for the first week of January. So, I do not have time to dig deeper into the source of the failure.
Hopefully I have provided enough information here that someone else might have time to investigate. If not, then I will try to get to it in mid-January once I have meet my current and urgent contractual obligations.
I am sorry that I do not have any additional information to share at this time. I was fortunate enough to have a good friend, that is also quite busy at this time, and he was able to give me a few minutes of his time to get my server running. I hope to work with him again when both our schedules quiet down sometime after the holidays to track down the source of the problem and possibly a way to avoid it in the future.
Thank you for further confirming that the errors myself and others have encountered are running across multiple VPS services and not just the one I was using.
BKM
Hi,
Thanks a lot for the warm welcome and for your help. I would be eagerly awaiting your advise regarding this when you’re available.
However, in the meantime, since I’m new to Frappe and ErpNext, I would like to understand the complete architecture of Frappe form a technical & implementation perspective.
I come from a technical and programming background. Have been in the infrastructure, software development & ERP consultation & deployment for the past 15 Years.
Hence, would like to request if you could guide me in the right direction & resources to understand the basic technical architecture of this and how this works. For eg. how can I spin up multiple instances of erpnext on the same server etc.
Thanks
Simply do a search of the forum for the topic: “Multitenant” or “Multi-tenant”
It is a method of hosting multiple ERPNext instances from a single installation. I have used it to host 5 or 6 individual kiosk businesses from a single VPS server with no issues.
But this thread is really for installing ERPNext for the first time and getting it running with little or no troubles. So, for now, I need to find the current trouble in my tutorial and get it corrected to match the new Debian updates.
If you want to ask questions about other topics kindly open new topic threads. You would be surprised how helpful the community can be.
BKM
@mnabil777 I wanted to let you know that after a few minutes of experimenting this morning, I have found a way to make the install work again. I have already edited the procedure at the top of the thread to include the fix for not being able to get to a login screen (and not really getting to anything that looked like ERPNext).
Some process that is part of the sudo bench setup production [USER]
step was not properly placing a configuration file in the right place. I have added steps to check for the file and then copy it to the right location if it is not already done.
This should take care of the problem you were facing and it will allow the system to run without having to always run the bench start
command.
BKM
Generated an error about accounting closing vouchers (Module import failed for Period Closing Voucher (erpnext.accounts.doctype.period_closing_voucher.period_closing_voucher Error: cannot import name ‘clear_cache’ from ‘frappe.website.utils’ (/home/frappe/frappe-bench/apps/frappe/frappe/website/utils.py))
). So we issued:
bench uninstall-app erpnext
bench get-app erpnext https://github.com/frappe/erpnext --branch version-13
We’ve also faced this error:
frappe 13.17.1 requires PyJWT~=1.7.1, but you have pyjwt 2.3.0 which is incompatible.
We solved it by
pip3 install -U PyJWT==1.7.1
i am getting following error while using your step-
TASK [bench : python3 bench init for production] *********************************************************************************************
task path: /tmp/.bench/bench/playbooks/roles/bench/tasks/main.yml:44
<127.0.0.1> ESTABLISH LOCAL CONNECTION FOR USER: root
<127.0.0.1> EXEC /bin/sh -c ‘echo ~root && sleep 0’
<127.0.0.1> EXEC /bin/sh -c ‘( umask 77 && mkdir -p “echo /var/tmp
”&& mkdir /var/tmp/ansible-tmp-1640363489.6695516-42545-235599272452764 && echo ansible-tmp-1640363489.6695516-42545-235599272452764=“echo /var/tmp/ansible-tmp-1640363489.6695516-42545-235599272452764
” ) && sleep 0’
Using module file /usr/local/lib/python3.8/dist-packages/ansible/modules/commands/command.py
<127.0.0.1> PUT /root/.ansible/tmp/ansible-local-39163vuwgm1u9/tmpuhmlm5e6 TO /var/tmp/ansible-tmp-1640363489.6695516-42545-235599272452764/AnsiballZ_command.py
<127.0.0.1> EXEC /bin/sh -c ‘setfacl -m u:global:r-x /var/tmp/ansible-tmp-1640363489.6695516-42545-235599272452764/ /var/tmp/ansible-tmp-1640363489.6695516-42545-235599272452764/AnsiballZ_command.py && sleep 0’
<127.0.0.1> EXEC /bin/sh -c ‘chmod u+x /var/tmp/ansible-tmp-1640363489.6695516-42545-235599272452764/ /var/tmp/ansible-tmp-1640363489.6695516-42545-235599272452764/AnsiballZ_command.py && sleep 0’
<127.0.0.1> EXEC /bin/sh -c ‘chown global /var/tmp/ansible-tmp-1640363489.6695516-42545-235599272452764/ /var/tmp/ansible-tmp-1640363489.6695516-42545-235599272452764/AnsiballZ_command.py && sleep 0’
<127.0.0.1> EXEC /bin/sh -c ‘sudo -H -S -n -u global /bin/sh -c ‘"’“‘echo BECOME-SUCCESS-nkycjnutoqdluwhrypxfexjmuxmxempf ; /usr/bin/python3 /var/tmp/ansible-tmp-1640363489.6695516-42545-235599272452764/AnsiballZ_command.py’”’“’ && sleep 0’
<127.0.0.1> EXEC /bin/sh -c ‘rm -f -r /var/tmp/ansible-tmp-1640363489.6695516-42545-235599272452764/ > /dev/null 2>&1 && sleep 0’
fatal: [localhost]: FAILED! => {
“changed”: true,
“cmd”: [
“bench”,
“init”,
“~global/frappe-bench”,
“–frappe-path”,
“GitHub - frappe/frappe: Low code web framework for real world applications, in Python and Javascript”,
“–frappe-branch”,
“version-13”,
“–python”,
“python3”
],
“delta”: “0:00:00.271657”,
“end”: “2021-12-24 16:31:30.158539”,
“invocation”: {
“module_args”: {
“_raw_params”: “bench init ~global/frappe-bench --frappe-path GitHub - frappe/frappe: Low code web framework for real world applications, in Python and Javascript --frappe-branch version-13 --python python3”,
“_uses_shell”: false,
“argv”: null,
“chdir”: null,
“creates”: “/home/global/frappe-bench”,
“executable”: null,
“removes”: null,
“stdin”: null,
“stdin_add_newline”: true,
“strip_empty_ends”: true,
“warn”: true
}
},
“msg”: “non-zero return code”,
“rc”: 1,
“start”: “2021-12-24 16:31:29.886882”,
“stderr”: “Traceback (most recent call last):\n File "/usr/bin/bench", line 33, in \n sys.exit(load_entry_point(‘frappe-bench’, ‘console_scripts’, ‘bench’)())\n File "/usr/bin/bench", line 22, in importlib_load_entry_point\n for entry_point in distribution(dist_name).entry_points\n File "/usr/lib/python3.8/importlib/metadata.py", line 503, in distribution\n return Distribution.from_name(distribution_name)\n File "/usr/lib/python3.8/importlib/metadata.py", line 177, in from_name\n raise PackageNotFoundError(name)\nimportlib.metadata.PackageNotFoundError: frappe-bench”,
“stderr_lines”: [
“Traceback (most recent call last):”,
" File "/usr/bin/bench", line 33, in ”,
" sys.exit(load_entry_point(‘frappe-bench’, ‘console_scripts’, ‘bench’)())“,
" File "/usr/bin/bench", line 22, in importlib_load_entry_point”,
" for entry_point in distribution(dist_name).entry_points",
" File "/usr/lib/python3.8/importlib/metadata.py", line 503, in distribution",
" return Distribution.from_name(distribution_name)“,
" File "/usr/lib/python3.8/importlib/metadata.py", line 177, in from_name”,
" raise PackageNotFoundError(name)",
“importlib.metadata.PackageNotFoundError: frappe-bench”
],
“stdout”: “”,
“stdout_lines”:
}PLAY RECAP ***********************************************************************************************************************************
localhost : ok=65 changed=15 unreachable=0 failed=1 skipped=64 rescued=0 ignored=0
i tried manual method above too , and i get a redissearch
module import error in e_commerce
module ,
i tried installing redissearch manually and tried again, and still same error .
trying on ubuntu 20.04
It’s failing for me as well on fresh Ubuntu 20 server with python 3.8 error. Try this manual method
Not working for me as well. the issue is with the sudo. i tried with simple user and removed bench with sudo pip3 uninstall bench and then installed bench without sudo it worked well but when i tried to run it from bench it throw same error. erros seems to because of some directory issue previously bench was located in /usr/local/bin/bench and now bench have a changed directory and have /usr/bin/bench. i tried to moving /usr/bin/bench to /usr/local/bin/bench but error won’t goes away. pip version is same seems something changed or updated with in setuptools
i fixed it by
sudo pip3 uninstall setuptools
sudo pip3 install setuptools==59.6.0
sudo pip3 install -e /home/erp/.bench/
Installed step by step and works perfectly in vps hetzner with Ubuntu 20.04
The installation completed perfectly with SSL also in place.
I got stuck with setting the email ( SMTP ) setting , tried all possible ways for Gmail ( Main Password, App Password ) and all it says is Request Timed Out .
I tried other email services also but same. Any Help will be appreciated .