this is a kernel upgrade specific to ubuntu 22.04 that requires that the machine is rebooted after the update is installed. it randomly makes this request after update and it cannot be dismissed. so there’s no way to handle it within the install script except you run apt update and apt upgrade and then reboot before using the script. Only option you have is to reboot the machine, go to the frappe-bench directory and drop the created site and then delete the frappe-bench folder before re-running the script.
Hi,
Thanks for reply, before i started the script, i run update and upgrade command then i started the script, while script running this screens appeared couple of times, and i passed it by pressing “ok”, but as i said when scripts came to line 275 it freeze at that stage, but later i restarted the machine and re-run the script, script passed the previous works as already installed and continued where it is left (i don’t know if this is on purpose) now it is working without any problem.
what if script would not continue where it is left and produce many errors? would i re-install the machine? because before i started the script bench command did not work properly, would it be enough if i delete the bench folder?
After running update and upgrade, reboot the machine before you start the script.
This would be enough as it seems the site had not been created before the script was interrupted.
Hi,
Ok, i see, thank you very much, script is great by the way, installing ERPNext is like a pain in the *** but you made it very easy, is it good enough to install for a client?
Thank you!
Yes it is.
after installing while trying to access the ip:8000 it says site cant be reached i am trying it on azure vm let me know if i have to check any firewall or did I miss anything after bench start it says successfully runnuing and all but not able to access ip
Thanks for the detailed steps, really helpful.
I was able to successfully install everything without any error,below is the screenshot of the log i got after “sudo supervisorctl restart all”
But the site didn’t load at the public IP, It shows the site can’t be reached message, please suggest what could be the possible miss?
Hi @Kunal_Bandekar.
Recently, I have also installed the ERPNext v14 in my Ubuntu v22 laptop successfully. I had to struggle a lot with version compatibility issues and finally got the success. The app running at localhost:8000 as for the purpose of testing and learning.
I just wanted to share with you and others that I have followed the step by step instructions in the link: GitHub - D-codE-Hub/Frappe-ERPNext-Version-14--in-Ubuntu-22.04-LTS: A complete Guide to Install Frappe/ERPNext version 14 in Ubuntu 22.04 LTS
Hi,
Here is a link to install the ERPNext 14 on Ubuntu Server 22.04.3 LTS without banging into any error.
from time to time i try this script, for last 2, i had strange problems.
1st it did install ERPNext but installation is not completed, i cannot install hrms, it says installation is not completed but ERPNext installed. So i tried bench reinstall command to finish installation.
2nd if you enter FQDN as “erp.local” even installation is success you will have problems like accessing to ERPNext, your FQDN should be like “erp” or “erplocal” do not sperate words.
3rd This is NOT script issue but i will mention this, if you install hrms without giving version number you will get hrms v15 (development) version on ERPNext v14 and this will break many things, you have to mention hrms’s version. “bench get-app --branch v14.10.3 hrms https://github.com/frappe/hrms
”
Did you get the chance to see what the error was?
always check to ensure the site you enter is in the correct format. sometimes some autocorrect keyboards tend to add a space after the . and if you don’t notice it then your site name will have issues.
This is specifically mentioned in the installation guide for HRMS and the flag is version-14 and not v14.10.3. using the version-14 flag ensures you are connected to the repo branch and not a specific commit version.
Im having frappe version 13 and erpnext version 13 as well, Im not able to excecute this hrms installation on to this,
bench get-app hrms
Getting hrms
$ git clone https://github.com/frappe/hrms.git --depth 1 --origin upstream
Cloning into 'hrms'...
remote: Enumerating objects: 1327, done.
remote: Counting objects: 100% (1327/1327), done.
remote: Compressing objects: 100% (1108/1108), done.
remote: Total 1327 (delta 319), reused 743 (delta 155), pack-reused 0
Receiving objects: 100% (1327/1327), 2.85 MiB | 15.92 MiB/s, done.
Resolving deltas: 100% (319/319), done.
ERROR: [Errno 2] No such file or directory: '/home/prerana/Desktop/hrms/apps/hrms/setup.py'
Traceback (most recent call last):
File "/usr/local/bin/bench", line 8, in <module>
sys.exit(cli())
File "/usr/local/lib/python3.8/dist-packages/bench/cli.py", line 121, in cli
raise e
File "/usr/local/lib/python3.8/dist-packages/bench/cli.py", line 111, in cli
bench_command()
File "/home/prerana/.local/lib/python3.8/site-packages/click/core.py", line 1157, in __call__
return self.main(*args, **kwargs)
File "/home/prerana/.local/lib/python3.8/site-packages/click/core.py", line 1078, in main
rv = self.invoke(ctx)
File "/home/prerana/.local/lib/python3.8/site-packages/click/core.py", line 1688, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/home/prerana/.local/lib/python3.8/site-packages/click/core.py", line 1434, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/home/prerana/.local/lib/python3.8/site-packages/click/core.py", line 783, in invoke
return __callback(*args, **kwargs)
File "/usr/local/lib/python3.8/dist-packages/bench/commands/make.py", line 156, in get_app
get_app(
File "/usr/local/lib/python3.8/dist-packages/bench/app.py", line 420, in get_app
app.install(verbose=verbose, skip_assets=skip_assets, restart_bench=restart_bench)
File "/usr/local/lib/python3.8/dist-packages/bench/utils/render.py", line 110, in wrapper_fn
return fn(*args, **kwargs)
File "/usr/local/lib/python3.8/dist-packages/bench/app.py", line 217, in install
app_name = get_app_name(self.bench.name, self.app_name)
File "/usr/local/lib/python3.8/dist-packages/bench/utils/app.py", line 224, in get_app_name
with open(app_path, "rb") as f:
FileNotFoundError: [Errno 2] No such file or directory: '/home/prerana/Desktop/hrms/apps/hrms/setup.py'
if i run ```
ill get this error
If i specify version 13 like so
bench get-app hrms
bench get-app --branch version-13 hrms
Getting hrms
$ git clone https://github.com/frappe/hrms.git --branch version-13 --depth 1 --origin upstream
Cloning into 'hrms'...
warning: Could not find remote branch version-13 to clone.
fatal: Remote branch version-13 not found in upstream upstream
ERROR:
Traceback (most recent call last):
File "/usr/local/bin/bench", line 8, in <module>
sys.exit(cli())
File "/usr/local/lib/python3.8/dist-packages/bench/cli.py", line 121, in cli
raise e
File "/usr/local/lib/python3.8/dist-packages/bench/cli.py", line 111, in cli
bench_command()
File "/home/prerana/.local/lib/python3.8/site-packages/click/core.py", line 1157, in __call__
return self.main(*args, **kwargs)
File "/home/prerana/.local/lib/python3.8/site-packages/click/core.py", line 1078, in main
rv = self.invoke(ctx)
File "/home/prerana/.local/lib/python3.8/site-packages/click/core.py", line 1688, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/home/prerana/.local/lib/python3.8/site-packages/click/core.py", line 1434, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/home/prerana/.local/lib/python3.8/site-packages/click/core.py", line 783, in invoke
return __callback(*args, **kwargs)
File "/usr/local/lib/python3.8/dist-packages/bench/commands/make.py", line 156, in get_app
get_app(
File "/usr/local/lib/python3.8/dist-packages/bench/app.py", line 413, in get_app
app.get()
File "/usr/local/lib/python3.8/dist-packages/bench/utils/render.py", line 110, in wrapper_fn
return fn(*args, **kwargs)
File "/usr/local/lib/python3.8/dist-packages/bench/app.py", line 184, in get
self.bench.run(
File "/usr/local/lib/python3.8/dist-packages/bench/bench.py", line 47, in run
return exec_cmd(cmd, cwd=cwd or self.cwd)
File "/usr/local/lib/python3.8/dist-packages/bench/utils/__init__.py", line 153, in exec_cmd
raise CommandFailedError
bench.exceptions.CommandFailedError
I got this please help
I am a newbie and im stuck in installation itself
Does hrms work for version 13 as well?
Am i going wrong there?
can anyone help me with this
Hey i am running erpnext in two sites in same ubuntu machine and i tried to host the two sites and i am able to succeed in that but while using after some time one of the site is going blank
any help or suggestions is appreciated
Im trying to install hrms app into my site called hrms.site, i have installed it before but due to verision issues i uninstalled it but when i try reinstalling the correct version im getting this error
App erpnext already installed
Installing hrms...
Updating DocTypes for hrms : [========================================] 100%
Setting up Frappe HR...
Installation for Frappe HR app failed due to an error. Please try re-installing the app or report the issue on https://github.com/frappe/hrms/issues/new if not resolved.
An error occurred while installing hrms: ('Role Profile', 'HR', IntegrityError(1062, "Duplicate entry 'HR' for key 'PRIMARY'"))
Traceback (most recent call last):
File "apps/frappe/frappe/model/base_document.py", line 517, in db_insert
frappe.db.sql(
File "apps/frappe/frappe/database/database.py", line 220, in sql
self._cursor.execute(query, values)
File "env/lib/python3.10/site-packages/pymysql/cursors.py", line 158, in execute
result = self._query(query)
File "env/lib/python3.10/site-packages/pymysql/cursors.py", line 325, in _query
conn.query(q)
File "env/lib/python3.10/site-packages/pymysql/connections.py", line 549, in query
self._affected_rows = self._read_query_result(unbuffered=unbuffered)
File "env/lib/python3.10/site-packages/pymysql/connections.py", line 779, in _read_query_result
result.read()
File "env/lib/python3.10/site-packages/pymysql/connections.py", line 1157, in read
first_packet = self.connection._read_packet()
File "env/lib/python3.10/site-packages/pymysql/connections.py", line 729, in _read_packet
packet.raise_for_error()
File "env/lib/python3.10/site-packages/pymysql/protocol.py", line 221, in raise_for_error
err.raise_mysql_exception(self._data)
File "env/lib/python3.10/site-packages/pymysql/err.py", line 143, in raise_mysql_exception
raise errorclass(errno, errval)
pymysql.err.IntegrityError: (1062, "Duplicate entry 'HR' for key 'PRIMARY'")
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "apps/frappe/frappe/commands/site.py", line 415, in install_app
_install_app(app, verbose=context.verbose, force=force)
File "apps/frappe/frappe/installer.py", line 307, in install_app
frappe.get_attr(after_install)()
File "apps/hrms/hrms/install.py", line 21, in after_install
raise e
File "apps/hrms/hrms/install.py", line 9, in after_install
setup()
File "apps/hrms/hrms/setup.py", line 22, in after_install
create_default_role_profiles()
File "apps/hrms/hrms/setup.py", line 712, in create_default_role_profiles
role_profile.insert(ignore_permissions=True)
File "apps/frappe/frappe/model/document.py", line 272, in insert
self.db_insert(ignore_if_duplicate=ignore_if_duplicate)
File "apps/frappe/frappe/model/base_document.py", line 544, in db_insert
raise frappe.DuplicateEntryError(self.doctype, self.name, e)
frappe.exceptions.DuplicateEntryError: ('Role Profile', 'HR', IntegrityError(1062, "Duplicate entry 'HR' for key 'PRIMARY'"))
Please help me resolve the issue
Bench version is :
erpnext 14.43.0
frappe 14.51.0
payments 0.0.1
I want hrms 14.13.0
bench get-app hrms --branch version-14
is there any mistake
do the following things:
- Turn on Developer Mode (if you are on a production server)
bench remove-app hrms
bench --site [your site] uninstall-app hrms
bench clear-cache
bench clear-website-cache
bench update --migrate
bench get-app --branch version-14 hrms
bench --site [your site] install-app hrms
If you have not setup the production mode of your setup, then your must keep the bench running in another terminal. Make sure that the bench is not stopped during the installation of hrms app or you will keep facing an error.
Moreover, you may refer to this video for step by step guidance of Installing ERPNext on Ubuntu Server:
For me installation worked when collation_server was updated in file /etc/mysql/mariadb.conf.d/50-server.cnf
I tried the steps in the video in another directory, even installed the packages again so that i dont miss out, but after installation of the bench if i start it to create new site its stoping immediately
bench start
11:34:36 system | redis_cache.1 started (pid=54810)
11:34:36 system | redis_queue.1 started (pid=54814)
11:34:36 system | web.1 started (pid=54818)
11:34:36 system | socketio.1 started (pid=54819)
11:34:36 system | watch.1 started (pid=54826)
11:34:36 system | schedule.1 started (pid=54827)
11:34:36 redis_queue.1 | 54817:C 10 Oct 2023 11:34:36.423 # WARNING Memory overcommit must be enabled! Without it, a background save or replication may fail under low memory condition. Being disabled, it can also cause failures without low memory condition, see https://github.com/jemalloc/jemalloc/issues/1328. 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.
11:34:36 system | worker.1 started (pid=54832)
11:34:36 redis_cache.1 | 54813:C 10 Oct 2023 11:34:36.423 # WARNING Memory overcommit must be enabled! Without it, a background save or replication may fail under low memory condition. Being disabled, it can also cause failures without low memory condition, see https://github.com/jemalloc/jemalloc/issues/1328. 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.
11:34:36 redis_queue.1 | 54817:C 10 Oct 2023 11:34:36.423 * oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
11:34:36 redis_cache.1 | 54813:C 10 Oct 2023 11:34:36.423 * oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
11:34:36 redis_queue.1 | 54817:C 10 Oct 2023 11:34:36.423 * Redis version=7.2.1, bits=64, commit=00000000, modified=0, pid=54817, just started
11:34:36 redis_cache.1 | 54813:C 10 Oct 2023 11:34:36.423 * Redis version=7.2.1, bits=64, commit=00000000, modified=0, pid=54813, just started
11:34:36 redis_queue.1 | 54817:C 10 Oct 2023 11:34:36.423 * Configuration loaded
11:34:36 redis_cache.1 | 54813:C 10 Oct 2023 11:34:36.423 * Configuration loaded
11:34:36 redis_queue.1 | 54817:M 10 Oct 2023 11:34:36.424 * Increased maximum number of open files to 10032 (it was originally set to 1024).
11:34:36 redis_queue.1 | 54817:M 10 Oct 2023 11:34:36.424 * monotonic clock: POSIX clock_gettime
11:34:36 redis_cache.1 | 54813:M 10 Oct 2023 11:34:36.424 * Increased maximum number of open files to 10032 (it was originally set to 1024).
11:34:36 redis_cache.1 | 54813:M 10 Oct 2023 11:34:36.424 * monotonic clock: POSIX clock_gettime
11:34:36 redis_queue.1 | 54817:M 10 Oct 2023 11:34:36.424 * Running mode=standalone, port=11000.
11:34:36 redis_queue.1 | 54817:M 10 Oct 2023 11:34:36.424 # Warning: Could not create server TCP listening socket 127.0.0.1:11000: bind: Address already in use
11:34:36 redis_queue.1 | 54817:M 10 Oct 2023 11:34:36.424 # Failed listening on port 11000 (tcp), aborting.
11:34:36 redis_cache.1 | 54813:M 10 Oct 2023 11:34:36.424 * Running mode=standalone, port=13000.
11:34:36 redis_cache.1 | 54813:M 10 Oct 2023 11:34:36.424 # Warning: Could not create server TCP listening socket 127.0.0.1:13000: bind: Address already in use
11:34:36 redis_cache.1 | 54813:M 10 Oct 2023 11:34:36.424 # Failed listening on port 13000 (tcp), aborting.
11:34:36 system | redis_queue.1 stopped (rc=1)
11:34:36 system | sending SIGTERM to redis_cache.1 (pid 54810)
11:34:36 system | sending SIGTERM to web.1 (pid 54818)
11:34:36 system | sending SIGTERM to socketio.1 (pid 54819)
11:34:36 system | sending SIGTERM to watch.1 (pid 54826)
11:34:36 system | sending SIGTERM to schedule.1 (pid 54827)
11:34:36 system | sending SIGTERM to worker.1 (pid 54832)
11:34:36 system | redis_cache.1 stopped (rc=1)
11:34:36 system | watch.1 stopped (rc=-15)
11:34:36 system | web.1 stopped (rc=-15)
11:34:36 system | schedule.1 stopped (rc=-15)
11:34:36 system | worker.1 stopped (rc=-15)
11:34:36 system | socketio.1 stopped (rc=-15)
any help from your side would be appreciated, Im not able to detect the error why is my bench suddenly stopping this way