Problem installing hrms HR module on site

I am having problem while installing hrms HR module on site, please find the following details. Any solution or suggestion? what am i doing wrong?

erpnext@erpnext:~/frappe-bench$ bench --site install-app hrms
App erpnext already installed

Installing hrms...
Updating DocTypes for hrms          : [========================================] 100%
Setting up Frappe HR...

Patching Existing Data...
Installation for Frappe HR app failed due to an error. Please try re-installing the app or report the issue on if not resolved.
An error occurred while installing hrms: Error 111 connecting to localhost:13000. Connection refused.
Traceback (most recent call last):
  File "env/lib/python3.10/site-packages/redis/", line 559, in connect
    sock = self._connect()
  File "env/lib/python3.10/site-packages/redis/", line 615, in _connect
    raise err
  File "env/lib/python3.10/site-packages/redis/", line 603, in _connect
ConnectionRefusedError: [Errno 111] Connection refused

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "apps/frappe/frappe/commands/", line 416, in install_app
    _install_app(app, verbose=context.verbose, force=force)
  File "apps/frappe/frappe/", line 304, in install_app
  File "apps/hrms/hrms/", line 21, in after_install
    raise e
  File "apps/hrms/hrms/", line 9, in after_install
  File "apps/hrms/hrms/", line 23, in after_install
  File "apps/hrms/hrms/", line 662, in run_post_install_patches
  File "apps/hrms/hrms/patches/post_install/", line 10, in execute
    rename_field("HR Settings", "stop_birthday_reminders", "send_birthday_reminders")
  File "apps/frappe/frappe/model/utils/", line 55, in rename_field
    update_user_settings(doctype, old_fieldname, new_fieldname)
  File "apps/frappe/frappe/model/utils/", line 166, in update_user_settings
  File "apps/frappe/frappe/model/utils/", line 49, in sync_user_settings
    for key, data in frappe.cache().hgetall("_user_settings").items():
  File "apps/frappe/frappe/utils/", line 177, in hgetall
    value = super().hgetall(self.make_key(name))
  File "env/lib/python3.10/site-packages/redis/", line 3014, in hgetall
    return self.execute_command('HGETALL', name)
  File "env/lib/python3.10/site-packages/redis/", line 898, in execute_command
    conn = self.connection or pool.get_connection(command_name, **options)
  File "env/lib/python3.10/site-packages/redis/", line 1192, in get_connection
  File "env/lib/python3.10/site-packages/redis/", line 563, in connect
    raise ConnectionError(self._error_message(e))
redis.exceptions.ConnectionError: Error 111 connecting to localhost:13000. Connection refused.

Best of my understanding, I think it happened in the migration from v13 to v14. Because the HR module Def is Already exists. So You can directly remove the HR from the Module Def List. After you can install. It works for me Thank You

hrms is not in list of module def


While installing app hrms, are you sure that the bench in running in another terminal using bench start command?

follow this video for an easy and error free installation of ERPNext on Ubuntu 22.04.3.