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

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

Open
MNesche opened this issue Apr 3, 2024 Discussed in #2382 · 19 comments
Open

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

MNesche opened this issue Apr 3, 2024 Discussed in #2382 · 19 comments

Comments

@MNesche
Copy link

MNesche commented Apr 3, 2024

Discussed in #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
image
image

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
Copy link
Member

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
Copy link
Member

KoukiHama commented Apr 3, 2024

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

@hoangnt2
Copy link
Contributor

hoangnt2 commented Apr 4, 2024

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

@MNesche
Copy link
Author

MNesche commented Apr 4, 2024

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
Copy link
Author

MNesche commented Apr 4, 2024

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
Copy link

I have same issue.

@KoukiHama
Copy link
Member

KoukiHama commented Apr 4, 2024

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

image

@MNesche
Copy link
Author

MNesche commented Apr 4, 2024

@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
Copy link
Member

KoukiHama commented Apr 4, 2024

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

@MNesche
Copy link
Author

MNesche commented Apr 4, 2024

@KoukiHama
Updating from this page leads to this error:
Screenshot from 2024-04-04 09-40-01
The logs are in this comment:
#2393 (comment)

@MNesche
Copy link
Author

MNesche commented Apr 8, 2024

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
Copy link
Contributor

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
Copy link
Author

MNesche commented Apr 8, 2024

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
Copy link
Contributor

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
Copy link
Author

MNesche commented Apr 9, 2024

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
Copy link
Contributor

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:

  • Login as setup@sw360.org
  • Create one or two users, one as admin
  • logout and login with your new admin user

I guess this will work.

@KoukiHama
Copy link
Member

yes
documents are outdated.
we can renewal this after release 18.1
eclipse-sw360/sw360.website#55

@MNesche
Copy link
Author

MNesche commented Apr 9, 2024

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.

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

5 participants