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

Missing password field under database in Ansible/ansible_collections/jfrog/platform/roles/insight/defaults/main.yml #408

Closed
gjlam95 opened this issue Aug 28, 2024 · 8 comments

Comments

@gjlam95
Copy link

gjlam95 commented Aug 28, 2024

Is this a request for help?: Yes


Is this a BUG REPORT or FEATURE REQUEST? (choose one): BUG REPORT

Which installer: Ansible

Which product and version (eg: ansible & collection version - 7.24.2): ansible core 2.17.3

Which operating system and version(eg: ubuntu & version - 20.4): ubuntu 22.04

Which product license (Enterprise/Pro): Enterprise

JFrog support reference (if already raised with support team): NIL

What happened: Referencing Ansible/ansible_collections/jfrog/platform/roles/insight/defaults/main.yml, is it intentional that the database has no password indicated? I'm using this ansible playbook to deploy insight and I'm getting a password authentication failed error. Suspecting it is due to this issue

What you expected to happen: No issues with authentication as password has been parsed properly

How to reproduce it (as minimally and precisely as possible): Try to deploy Insight via Ansible

Anything else we need to know: NIL

@RobinDuhan
Copy link

Thanks for reporting @gjlam95, could you please share any customization that you may have made to the vars.yaml or your setup, and the logs that indicated the error?

@gjlam95
Copy link
Author

gjlam95 commented Aug 29, 2024

Thanks for reporting @gjlam95, could you please share any customization that you may have made to the vars.yaml or your setup, and the logs that indicated the error?

Hi @RobinDuhan , the only customisation I've done so far is to modify the values provided under Ansible/ansible_collections/jfrog/platform/group_vars/all/vars.yml and changing all the relevant insight_db values.

# Insight DB details
insight_db_type: postgresql
insight_db_driver: org.postgresql.Driver
insight_db_name: "${insight_db_name}"
insight_db_user: "${insight_db_user}"
insight_db_password: "${insight_db_password}"
insight_db_url: "${insight_db_url}"

The error message shown on the server hosting insight is as follow:
Unable to obtain connection from database: FATAL: password authentication failed for user "insightadmin"
Message : FATAL: password authentication failed for user "insightadmin"
Caused by: org.postgresql.util.PSQLException: FATAL: password authentication failed for user "insightadmin"

@RobinDuhan
Copy link

RobinDuhan commented Aug 29, 2024

@gjlam95 Thanks.
Which ansible task did it fail at, please share those logs as well. Also, please share the system.yaml that must have been generated, $JFROG_HOME/insight/var/etc/system.yaml (Insight's host).

@gjlam95
Copy link
Author

gjlam95 commented Aug 30, 2024

@gjlam95 Thanks. Which ansible task did it fail at, please share those logs as well. Also, please share the system.yaml that must have been generated, $JFROG_HOME/insight/var/etc/system.yaml (Insight's host).

insight-server-service.log
system.yaml.txt
console.log

Attached files as requested. It failed at the task 'Make sure insight is up and running'

@RobinDuhan
Copy link

System.yaml doesn't seem to have the password configured for the database. We suspect TASK [jfrog.platform.insight : Interactive with expect] to be failing, which is responsible for overriding system.yaml with the custom values. As a workaround, you could set insight_systemyaml_override: true in insight/default/main.yml - and add password: "{{ insight_db_password }}" under database section in the same (main.yml) file.

If it still doesn't work, and you have support as part of your JFrog subscription - please open a support ticket and our support engineers will work with you up to resolution. If that is not the case, I'll ask you share the ansible log, collection, and insight version that you are using, and we will try to assist as much as we can.

@gjlam95 gjlam95 closed this as completed Sep 4, 2024
@chukka
Copy link
Collaborator

chukka commented Sep 4, 2024

@gjlam95 can you please let us know, what was the issue and what has fixed your issue ?

@gjlam95
Copy link
Author

gjlam95 commented Sep 4, 2024

@gjlam95 can you please let us know, what was the issue and what has fixed your issue ?
The issue was exactly as mentioned by @RobinDuhan that the TASK [jfrog.platform.insight : Interactive with expect] was failing. I fixed the issue by taking his recommendation of setting insight_systemyaml_override: true in insight/default/main.yml - and adding password: "{{ insight_db_password }}" under database section in the same (main.yml) file.

@chukka
Copy link
Collaborator

chukka commented Sep 4, 2024

Thanks :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants