eclipse-sw360 / sw360

SW360 project
https://www.eclipse.org/sw360/
Other
123 stars 99 forks source link

Unable to get SW360 to work because of missing users in Couch DB #2393

Open MNesche opened 7 months ago

MNesche commented 7 months ago

Discussed in https://github.com/eclipse-sw360/sw360/discussions/2382

Originally posted by **MNesche** March 25, 2024 Hi, we've set up SW360 v18.0.0 and everything necessary via Docker according to the descriptions. Couch DB is version 3.2.3. Unfortunately, we're not able to get SW360 working, because the users are not in Couch DB and we haven't found a way, to get the users to Couch DB. The databases in SW360 have been created successfully. Importing users via file doesn't change anything. I'd be pleased for any help or hint pointing in the right direction to fix this issue. Please let me know, if you need any further informations. ![image](https://github.com/eclipse-sw360/sw360/assets/153277710/0adc7d53-018e-4da2-825c-084fcef60134) ![image](https://github.com/eclipse-sw360/sw360/assets/153277710/412b9429-0df0-49dd-adaa-d232f5e69f1c) ![image](https://github.com/eclipse-sw360/sw360/assets/153277710/94b08eae-2803-49cc-b96d-8962ff8aa80e) Kind regards. Enzo

Update from today: I have set it up a few times, all with the same result. The connection to the CouchDB (latest, 3.3) is valid, tested from sw360 container shell via curl to http://couchdb:5984. It seems that importing or creating a user via liferay just doesn't get the user created in CouchDB also.

Is it possible to create a user in the couchdb directly? Could somebody please add the resulting JSON-form from couchdb with the test-users, so that I may insert it and try again?

Thanks a lot in advance, I wanted to present sw360 for an introduction next week but so far, I'm a bit lost to get it running in time.

KoukiHama commented 7 months ago

I tried to set up by native install and was able to set users without problem. @heliocastro how do you set up users when you set sw360 via docker compose?

KoukiHama commented 7 months ago

@MNesche did you show the result when you click someone action button in not in couchdb table?

hoangnt2 commented 7 months ago

@MNesche, users will be added to couchdb when they login to sw360

MNesche commented 7 months ago

Good morning, thank you for your replies.

When updating a user inside Liferay, the following message is shown: Screenshot from 2024-04-04 09-40-01

This is the container log from sw360 after that: Screenshot from 2024-04-04 09-40-35

This is the container setup (couchdb 3.0 is used cause I thought it might've been a problem with the latest version): Screenshot from 2024-04-04 09-41-15

This is the couchdb container log: Screenshot from 2024-04-04 09-41-56

Please let me know, if you need any further screenshots or information. Kind regards. Enzo

MNesche commented 7 months ago

I did another fresh and clean setup, added one user manually and made the import afterwards. Here are the logs: sw360, preImport: sw360_logs_preImport.txt

sw360, postImport: sw360_logs_postImport.txt

Postgre: sw360_git-postgresdb-1_logs.txt

CouchDB: sw360_git-couchdb-1_logs.txt

Thanks a lot in advance for your time and efforts in helping to resolve the issue. Kind regards.

Shotaro-Yoshinaga-sti commented 7 months ago

I have same issue.

KoukiHama commented 7 months ago

@MNesche @ShotaroYoshinaga Can you click pencil icon in the screenshot?

https://private-user-images.githubusercontent.com/153277710/316575224-0adc7d53-018e-4da2-825c-084fcef60134.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTIyMjc0NTgsIm5iZiI6MTcxMjIyNzE1OCwicGF0aCI6Ii8xNTMyNzc3MTAvMzE2NTc1MjI0LTBhZGM3ZDUzLTAxOGUtNGRhMi04MjVjLTA4NGZjZWY2MDEzNC5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjQwNDA0JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI0MDQwNFQxMDM5MThaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT01OTQwNTZkNDU0NWZhODFjNzRhMmQ5Mzk5MjZjZjBkZGIxNDRiZjMxNjE3NzMzYThjZWI0MGYzNmJkYTZmOWMwJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZhY3Rvcl9pZD0wJmtleV9pZD0wJnJlcG9faWQ9MCJ9.P0XuO2Q-SLfz1AxcA4SkQw4rJ3i-7cvF1dbnQozhTGA

KoukiHama commented 7 months ago

@MNesche @ShotaroYoshinaga Can you click actions pencil icon in the screenshot?

image

MNesche commented 7 months ago

@KoukiHama, thank you for your reply. Here's the result of the actions pencil icon: Screenshot from 2024-04-04 13-14-16

Preferences look like this: Screenshot from 2024-04-04 13-14-28

KoukiHama commented 7 months ago

@MNesche Can you update user info from this page? if not, can you share logs about the operation?

MNesche commented 7 months ago

@KoukiHama Updating from this page leads to this error: Screenshot from 2024-04-04 09-40-01 The logs are in this comment: https://github.com/eclipse-sw360/sw360/issues/2393#issuecomment-2036684611

MNesche commented 7 months ago

Hello, I've done another clean install from docker (docker compose up -d) and I'm attaching the output of the whole sw360 log and couchdb log, because the issues still exists. I do still have a bit of hope to be able to get it running with your help, so that I may do the presentation to introduce sw360 within the company on friday. Thanks a lot in advance. Kind regards. Enzo couchdb_log01.txt sw360_log02.txt

heliocastro commented 7 months ago

Hi. I'm back from vacation. Let me try to catch up from the beginning, but starts with the docker version. 18.0.0 was not ok, due to invalid thrift, and java set. So, sorry for being late, but the correct version ( also tagged as latest ) is this one: image

If you please try this i'll appreciate.

MNesche commented 7 months ago

Dear heliocastro,

thank you for your reply, hope you had a great and relaxing vacation :). So here's what I did, after deleting all existing images and volumes: git clone cd sw360 git checkout sw360-18.0.2-M1 docker compose up -d

According to the docker-compose file, it uses image: "ghcr.io/eclipse-sw360/sw360:latest" for the build. However, in sw360, the version number is: Screenshot from 2024-04-08 15-45-19

The issue is still the same, the log is attached. Thanks a lot in advance for having a look. sw360-18.0.2-M1_log.txt

heliocastro commented 7 months ago

Version is correct, as is done in a post stage of 18.0.0. We did not make an official release because we're waiting from 18.1.0 be tagged soon.

Back to the issue, i smell some discrepancy on documentation and execution. On the logs are clear that there are multiple attempts to fetch users. By default, a zeroed sw360 has one single user, the liferay admin, setup@sw360.org, meaning you are importing users before use, or creating some users by hand.

So, help me here, how you effectively created the users after installed and configured from zero ?

I want to reproduce in a clean VM

MNesche commented 7 months ago

Good morning heliocastro, thank you for your reply. The setup of liferay is done according to this description: https://eclipse.dev/sw360/docs/deployment/legacy/deploy-liferay7.4/

After import of the LAR-files, I've imported the users from the file, described in section "Import User Accounts for Testing". This is the user page after user import, logout of setup user and login as admin user: image

Clicking on the pencil icon to update the user leads to this: image

And clicking on update user follows: image

However, none of these actions leads to an entry in the couchdb log, that's why I guessed there's no connection, but when I logged into the container shell of sw360 and made a request to the couchdb via curl to http://couchdb:5984, it was ok.

heliocastro commented 7 months ago

There we go, again the import issue coming from documentation. @ag4ums @KoukiHama Same issue presented weeks ago by different user, the template of import users are not ok and information on website is outdated.

@MNesche I would ask to you if possible, to remove the database and postgres volumes, restart and reconfigure but:

and DO NOT import users from the test template, just create some users by hand:

I guess this will work.

KoukiHama commented 7 months ago

yes documents are outdated. we can renewal this after release 18.1 https://github.com/eclipse-sw360/sw360.website/pull/55

MNesche commented 7 months ago

Dear Heliocastro and KoukiHama, thank you for your messages. I've done a clean install, imported the suggested LAR-Files and added two users.

This is the message after creating the admin with setup@sw360.org-user: Screenshot from 2024-04-09 17-23-49 This is how it looks in user view: Screenshot from 2024-04-09 17-24-11 Same happened after creating the user: Screenshot from 2024-04-09 17-25-22

This is again, when trying to update the user after log in with previously created admin user account: Screenshot from 2024-04-09 17-26-36

Here's the log. First, the download of the LAR-files was not right, that's why I got an "java.util.zip.ZipException: zip END header not found" in line 1196. However, that's a good marker in the log, cause after this, I did the import after redownloading, setup of admin & user, logged out and logged back in with admin. sw360_log090424_1734.txt

Hope that helps & please let me know, if you need any further informations. Kind regards and thanks a lot in advance.