Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ERPNext] install hrms on erpnext 14 #1180

Closed
anthonylkm0613 opened this issue Oct 9, 2023 · 14 comments
Closed

[ERPNext] install hrms on erpnext 14 #1180

anthonylkm0613 opened this issue Oct 9, 2023 · 14 comments
Assignees
Labels
erpnext solved stale 15 days without activity tech-issues The user has a technical issue about an application triage Triage is needed

Comments

@anthonylkm0613
Copy link

Platform

AWS

bndiagnostic ID know more about bndiagnostic ID

i have no ideas

bndiagnostic output

ERROR: /home/bitnami is not a valid bench directory. Run with --init-bench if you'd like to create a Bench too.
Traceback (most recent call last):
File "/opt/bitnami/erpnext/bin/bench", line 8, in
sys.exit(cli())
File "/opt/bitnami/erpnext/bench/bench/cli.py", line 127, in cli
bench_command()
File "/opt/bitnami/erpnext/venv/lib/python3.10/site-packages/click/core.py", line 1130, in call
return self.main(*args, **kwargs)
File "/opt/bitnami/erpnext/venv/lib/python3.10/site-packages/click/core.py", line 1055, in main
rv = self.invoke(ctx)
File "/opt/bitnami/erpnext/venv/lib/python3.10/site-packages/click/core.py", line 1657, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/opt/bitnami/erpnext/venv/lib/python3.10/site-packages/click/core.py", line 1404, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/opt/bitnami/erpnext/venv/lib/python3.10/site-packages/click/core.py", line 760, in invoke
return __callback(*args, **kwargs)
File "/opt/bitnami/erpnext/bench/bench/commands/make.py", line 159, in get_app
get_app(
File "/opt/bitnami/erpnext/bench/bench/app.py", line 385, in get_app
raise NotInBenchDirectoryError(
bench.exceptions.NotInBenchDirectoryError: /home/bitnami is not a valid bench directory. Run with --init-bench if you'd like to create a Bench too.
INFO: A newer version of bench is available: 5.16.2 → 5.17.2

bndiagnostic was not useful. Could you please tell us why?

i have no ideas

Describe your issue as much as you can

After i use the AMI on aws to create the erpnext 14.21.0.0 (ami name : bitnami-erpnext-14.21.0-0-linux-debian-11-x86_64-hvm-ebs-nami), i try to login via ssh to install the hrms.
i tried the command bench get-app hrms

it says : ERROR: /home/bitnami is not a valid bench directory. Run with --init-bench if you'd like to create a Bench too.

how can i correctly install the hrms ? thank you

@anthonylkm0613 anthonylkm0613 added the tech-issues The user has a technical issue about an application label Oct 9, 2023
@bitnami-bot bitnami-bot added this to Triage in Support Oct 9, 2023
@github-actions github-actions bot added the triage Triage is needed label Oct 9, 2023
@jotamartos
Copy link
Collaborator

bench.exceptions.NotInBenchDirectoryError: /home/bitnami is not a valid bench directory. Run with --init-bench if you'd like to create a Bench too.

That's a specific error of the bench tool. You need to run it in the correct directory. Please change directories before running the bench command

cd /opt/bitnami/frappe-bench

@jotamartos jotamartos changed the title ERPNext 14 - install hrms on erpnext 14 [ERPNext] install hrms on erpnext 14 Oct 9, 2023
@github-actions github-actions bot moved this from Triage to Pending in Support Oct 9, 2023
@anthonylkm0613
Copy link
Author

thank you. i now at the correct rappe-bench directory and can run the get-app command. and it went well. however, when i need to execute below command, what should i put at to replace the mysite.localhost(i saw an example from youtube and they put "mysite.localhost" as the parrameter. how can i set this parameter correct? e.g. the url to acess my erpnext is www. unitedexpress.com)

command:
bitnami@ip-172-31-38-221:~/stack/erpnext/frappe-bench$ bench --sites mysite.localhost install-app hrms

@bitnami-bot bitnami-bot moved this from Pending to Triage in Support Oct 10, 2023
@anthonylkm0613
Copy link
Author

and i would like the hr module is part of the erpnext menu. so could you let me know what the SITE Name i should create ?

@jotamartos
Copy link
Collaborator

how can i set this parameter correct? e.g. the url to acess my erpnext is www. unitedexpress.com)

command:
bitnami@ip-172-31-38-221:~/stack/erpnext/frappe-bench$ bench --sites mysite.localhost install-app hrms

You should use your domain name when running the command.

and i would like the hr module is part of the erpnext menu. so could you let me know what the SITE Name i should create ?

That's a app-specific question. Please take a look at the app's forums and documentation to know what you need to do to achieve what you want.

@github-actions github-actions bot moved this from Triage to Pending in Support Oct 10, 2023
@anthonylkm0613
Copy link
Author

anthonylkm0613 commented Oct 10, 2023

i can go futher on bench new-site command and below are what i executed and results with some error. when i run the command, it ask me the mysql root password. still have problem

bitnami@ip-172-31-43-101:/opt/bitnami/erpnext/frappe-bench/sites$ bench --site dragonwinmotors.online install-app hrms
An error occurred while installing hrms: (1045, "Access denied for user '_8b1fa960deb3aed2'@'127.0.0.1' (using password: YES)")
Traceback (most recent call last):
File "apps/frappe/frappe/utils/caching.py", line 55, in wrapper
return frappe.local.request_cache[func][args_key]
KeyError: 5740354900026072187

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "apps/frappe/frappe/utils/caching.py", line 55, in wrapper
return frappe.local.request_cache[func][args_key]
KeyError: 1378205473383944229

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "apps/frappe/frappe/commands/site.py", line 416, in install_app
_install_app(app, verbose=context.verbose, force=force)
File "apps/frappe/frappe/installer.py", line 261, in install_app
frappe.clear_cache()
File "apps/frappe/frappe/init.py", line 884, in clear_cache
frappe.cache_manager.clear_user_cache()
File "apps/frappe/frappe/cache_manager.py", line 90, in clear_user_cache
clear_global_cache()
File "apps/frappe/frappe/cache_manager.py", line 103, in clear_global_cache
clear_website_cache()
File "apps/frappe/frappe/website/utils.py", line 387, in clear_website_cache
clear_cache(path)
File "apps/frappe/frappe/website/utils.py", line 382, in clear_cache
for method in frappe.get_hooks("website_clear_cache"):
File "apps/frappe/frappe/init.py", line 1498, in get_hooks
hooks = _dict(cache().get_value("app_hooks", _load_app_hooks))
File "apps/frappe/frappe/utils/redis_wrapper.py", line 81, in get_value
val = generator()
File "apps/frappe/frappe/utils/caching.py", line 57, in wrapper
return_val = func(*args, **kwargs)
File "apps/frappe/frappe/init.py", line 1461, in _load_app_hooks
apps = [app_name] if app_name else get_installed_apps(ensure_on_bench=True)
File "apps/frappe/frappe/utils/caching.py", line 57, in wrapper
return_val = func(*args, **kwargs)
File "apps/frappe/frappe/init.py", line 1417, in get_installed_apps
installed = json.loads(db.get_global("installed_apps") or "[]")
File "apps/frappe/frappe/database/database.py", line 961, in get_global
return self.get_default(key, user)
File "apps/frappe/frappe/database/database.py", line 965, in get_default
d = self.get_defaults(key, parent)
File "apps/frappe/frappe/database/database.py", line 981, in get_defaults
defaults = frappe.defaults.get_defaults_for(parent)
File "apps/frappe/frappe/defaults.py", line 218, in get_defaults_for
frappe.qb.from
(table)
File "apps/frappe/frappe/query_builder/utils.py", line 76, in execute_query
return frappe.db.sql(query, params, *args, **kwargs) # nosemgrep
File "apps/frappe/frappe/database/database.py", line 200, in sql
self.connect()
File "apps/frappe/frappe/database/database.py", line 114, in connect
self._conn = self.get_connection()
File "apps/frappe/frappe/database/mariadb/database.py", line 98, in get_connection
conn = self._get_connection()
File "apps/frappe/frappe/database/mariadb/database.py", line 104, in _get_connection
return self.create_connection()
File "apps/frappe/frappe/database/mariadb/database.py", line 107, in create_connection
return pymysql.connect(**self.get_connection_settings())
File "env/lib/python3.10/site-packages/pymysql/connections.py", line 352, in init
self.connect()
File "env/lib/python3.10/site-packages/pymysql/connections.py", line 636, in connect
self._request_authentication()
File "env/lib/python3.10/site-packages/pymysql/connections.py", line 911, in _request_authentication
auth_packet = self._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.OperationalError: (1045, "Access denied for user '_8b1fa960deb3aed2'@'127.0.0.1' (using password: YES)")

@bitnami-bot bitnami-bot moved this from Pending to Triage in Support Oct 10, 2023
@jotamartos
Copy link
Collaborator

pymysql.err.OperationalError: (1045, "Access denied for user '_8b1fa960deb3aed2'@'127.0.0.1' (using password: YES)")

That's not a user/password we configure. Did you modify something in the configuration? If you continue running into issues, please contact the plugin's developer.

@github-actions github-actions bot moved this from Triage to Pending in Support Oct 10, 2023
@anthonylkm0613
Copy link
Author

i didn't modify the configuration. :<

@bitnami-bot bitnami-bot moved this from Pending to Triage in Support Oct 10, 2023
@jotamartos
Copy link
Collaborator

jotamartos commented Oct 10, 2023

Everything worked as expected for me. Please remember to move to the frappe-bench directory and activate the venv

cd /opt/bitnami/erpnext/frappe-bench/
. ../venv/bin/activate
# Install nodejs and yarn
bench get-app hrms --branch v14.13.0
sudo su daemon -s /bin/bash -c "bench --site erpnext install-app hrms"

I installed it in the default site and the installation succeeded

(venv) bitnami@ip-172-31-85-108:/opt/bitnami/erpnext/frappe-bench$ sudo su daemon -s /bin/bash -c "bench --site erpnext install-app hrms"
App erpnext already installed

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

Patching Existing Data...
rename_field: kra_title not found in table for: Appraisal Template
rename_field: kra_template not found in table for: Appraisal
Thank you for installing Frappe HR!
Updating Dashboard for hrms

Please remember to use daemon if you get a permission-related error. If you continue running into issues when installing the app in your site, please check that the database credentials are correct and that your site was deployed correctly. Remember to contact the plugin's developer if you continue running into issues.

@github-actions github-actions bot moved this from Triage to Pending in Support Oct 10, 2023
@jotamartos jotamartos removed the triage Triage is needed label Oct 10, 2023
@anthonylkm0613
Copy link
Author

thank you i shall try this and get back you the result. thank you for your help

@bitnami-bot bitnami-bot moved this from Pending to Triage in Support Oct 11, 2023
@github-actions github-actions bot added the triage Triage is needed label Oct 11, 2023
@jotamartos jotamartos moved this from Triage to Pending in Support Oct 11, 2023
@jotamartos jotamartos removed the triage Triage is needed label Oct 11, 2023
@anthonylkm0613
Copy link
Author

anthonylkm0613 commented Oct 12, 2023

thank you again jotamartos

i try your comments and it shows exactly results of your post and seems it is installed. however, when i try to login back the erpnext which i expect i can see all modules and the new HR module on the manual. it shows error page.. it allows me to login the erpnext but after login it. it show below screen.

螢幕截圖 2023-10-12 上午10 07 42

also i show you the installation results as below :
螢幕截圖 2023-10-12 上午10 08 26

Or, should i install it on a new site rather than "erpnext" which maybe overwritten ?

Thank you again for your advices.

@bitnami-bot bitnami-bot moved this from Pending to Triage in Support Oct 12, 2023
@github-actions github-actions bot added the triage Triage is needed label Oct 12, 2023
@jotamartos
Copy link
Collaborator

You will need to review the app's logs and get more information about the error. The app's developers will probably provide more information about this error and how to solve it.

Thanks

@github-actions github-actions bot moved this from Triage to Pending in Support Oct 12, 2023
@github-actions
Copy link

This Issue has been automatically marked as "stale" because it has not had recent activity (for 15 days). It will be closed if no further activity occurs. Thanks for the feedback.

@github-actions github-actions bot added the stale 15 days without activity label Oct 28, 2023
Copy link

github-actions bot commented Nov 2, 2023

Due to the lack of activity in the last 5 days since it was marked as "stale", we proceed to close this Issue. Do not hesitate to reopen it later if necessary.

@github-actions github-actions bot added the solved label Nov 2, 2023
@bitnami-bot bitnami-bot closed this as not planned Won't fix, can't repro, duplicate, stale Nov 2, 2023
@bitnami-bot bitnami-bot moved this from Pending to Solved in Support Nov 2, 2023
@anthonylkm0613
Copy link
Author

hi all,
i just like to update the result. we try thoese recommended steps and it works well in another aws account. then we make the successful instance as private image and then i install it on my aws account which have errors shown when i tried those steps.

Now it works well. thank you jotamartos and all.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
erpnext solved stale 15 days without activity tech-issues The user has a technical issue about an application triage Triage is needed
Projects
None yet
Development

No branches or pull requests

3 participants