eclipse-sw360 / sw360

SW360 project
https://www.eclipse.org/sw360/
Other
122 stars 98 forks source link

default userid & password not working for sw360 installed via source #1107

Closed dineshr93 closed 3 years ago

dineshr93 commented 3 years ago

The sw360Version=13.0.0 java 11 (11.0.9.1 2020-11-04) couchdb-lucene 2.1.0 thrift 0.13.0 postgresql 42.2.9 Ubuntu 18.04 CouchDB 2.1.2~bionic

Steps followed Deploy-Natively-11

03-Feb-2021 18:59:25.929 INFO [main] org.apache.catalina.startup.Catalina.start Server startup in [114,061] milliseconds
2021-02-03 19:00:41 INFO  FossologyCheckConnectionOnStartupHook:46 - Fossology connection state: FAILED
2021-02-03 19:00:43.724 INFO  [http-nio-8080-exec-7][BuildInfoTemplateContextContributor:60] Build Info Context Contributor: attribute buildTime=2021-02-03T18:53:13Z
2021-02-03 19:00:43.725 INFO  [http-nio-8080-exec-7][BuildInfoTemplateContextContributor:60] Build Info Context Contributor: attribute sw360Version=13.0.0
2021-02-03 19:00:43.725 INFO  [http-nio-8080-exec-7][BuildInfoTemplateContextContributor:60] Build Info Context Contributor: attribute buildNumber=db6be28
2021-02-03 19:00:43.725 INFO  [http-nio-8080-exec-7][BuildInfoTemplateContextContributor:60] Build Info Context Contributor: attribute gitBranch=UNKNOWN
2021-02-03 19:00:53.829 WARN  [http-nio-8080-exec-5][PortalImpl:1036] Redirect URL http://denue6pr251.ebgroup.elektrobit.com:8080/web/guest/home?p_p_id=com_liferay_login_web_portlet_LoginPortlet&p_p_lifecycle=0&p_p_state=normal&p_p_state_rcv=1 is not allowed
2021-02-03 19:01:19.174 WARN  [http-nio-8080-exec-3][PortalImpl:1036] Redirect URL http://denue6pr251.ebgroup.elektrobit.com:8080/web/guest/home?p_p_id=com_liferay_login_web_portlet_LoginPortlet&p_p_lifecycle=0&p_p_state=normal&p_p_state_rcv=1 is not allowed

image

**portal-ext.properties**

include-and-override=/etc/sw360/portal-ext.properties

jdbc.default.driverClassName=org.postgresql.Driver
jdbc.default.url=jdbc:postgresql://localhost:5432/lportal
jdbc.default.username=lportal
jdbc.default.password=lportal

company.default.name=Elektrobit
company.default.web.id=elektrobit.com
system.site.roles=Clearing Admin, Clearing Expert, ECC Admin, Security Admin, SW360 Admin
default.landing.page.path=/group/guest/home
browser.launcher.url=
setup.wizard.enabled=false
users.reminder.queries.enabled=false
terms.of.use.required=false
portlet.css.enabled=false
session.tracker.memory.enabled=false
# Set the default admin password.
default.admin.password=sw360fossy
# Set the default admin screen name prefix.
default.admin.screen.name=setup
# Set the default admin email address prefix.
default.admin.email.address.prefix=setup
# Set the default admin first name.
default.admin.first.name=Setup
# Set the default admin last name.
default.admin.last.name=Administrator
cat setenv.sh
CATALINA_OPTS="$CATALINA_OPTS -Dfile.encoding=UTF-8 -Djava.locale.providers=JRE,COMPAT,CLDR -Djava.net.preferIPv4Stack=true -Duser.timezone=GMT -Xms8g -Xmx16g -XX:MaxNewSize=1536m -XX:MaxMetaspaceSize=768m -XX:MetaspaceSize=768m -XX:NewSize=1536m -XX:SurvivorRatio=7"
couchdb.properties

couchdb.url = http://localhost:5984
couchdb.user =
couchdb.password =
couchdb.database = sw360db
couchdb.usersdb = sw360users
couchdb.attachments = sw360attachments
couchdb.change_logs = sw360changelogs
couchdb.config = sw360config
couchdb.vulnerability_management = sw360vm
lucenesearch.limit = 150
couchdb.lucene.url = http://localhost:8080/couchdb-lucene

# Warning: If you enable lucene leading wildcards you have to enable this configuration also in couchdb-lucene.ini
# leading wildcard search is disabled as default because its a expensive operation.
# couchdb-lucene.ini (is part of the couchdb-lucene .war package)
# [lucene]
# allowLeadingWildcard=true
# see more: https://wiki.apache.org/lucene-java/LuceneFAQ#What_wildcard_search_support_is_available_from_Lucene.3F
lucenesearch.leading.wildcard = true
sw360.properties

backend.url= http://localhost:8080

## API Token generation sw360.properties

rest.apitoken.generator.enable=true
rest.apitoken.read.validity.days=90
rest.apitoken.write.validity.days=30
rest.apitoken.hash.salt=$2a$04$Software360RestApiSalt
dineshr93 commented 3 years ago

Hi @mcjaeger Can you help me on this? Is there any issue in my above properties? There is no error in the log. Everything is smooth. except i cant login with default user id & pwd

dineshr93 commented 3 years ago

Even username test@liferay.com & password: test is not working as mentioned in https://learn.liferay.com/dxp/7.x/en/getting-started/introduction-to-the-admin-account.html

KoukiHama commented 3 years ago

How about this? Mail : setup@sw360.org pass: test

dineshr93 commented 3 years ago

Hi @KoukiHama Thanks for the suggestion. It shows same Error:Authentication failed. Please try again.

I tried to create an account with my gmail & company id. it moves to send verification code page. but I didnt receive any code. When I check the log Below error exists

2021-02-05 15:13:11.549 WARN  [liferay/mail-2][MailMessageListener:135] Email test@domain.invalid will be ignored because it is included in mail.send.blacklist
2021-02-05 15:13:11.550 WARN  [liferay/mail-2][MailMessageListener:52] Skipping email because the sender is not specified
2021-02-05 15:14:16.536 WARN  [liferay/mail-4][MailMessageListener:135] Email test@domain.invalid will be ignored because it is included in mail.send.blacklist
2021-02-05 15:14:16.546 WARN  [liferay/mail-4][MailMessageListener:52] Skipping email because the sender is not specified
2021-02-05 15:14:31.143 WARN  [liferay/mail-4][MailMessageListener:135] Email test@domain.invalid will be ignored because it is included in mail.send.blacklist
2021-02-05 15:14:31.143 WARN  [liferay/mail-4][MailMessageListener:52] Skipping email because the sender is not specified
KoukiHama commented 3 years ago

Ah, your company name and webid are not sw360.org in portal-ext.property

If you change this property like default one and setup@sw360.org (pass test) , Or Use address setup@elektrobit.com with pass "test", you may login .

Default property setting https://github.com/eclipse/sw360/blob/master/frontend/configuration/portal-ext.properties

company.default.name=SW360 company.default.web.id=sw360.org

dineshr93 commented 3 years ago

@KoukiHama Thanks for pointing that. I have tried the above password as you mentioned. It didnt work. So I changed back the portal-ext.properties to default values as mentioned in the link

company.default.name=SW360 company.default.web.id=sw360.org

And restarted the tomcat. It still did not work. :(

dineshr93 commented 3 years ago

@KoukiHama I changed the default database from hypersonic to postgres. Will this cause a problem in default login?

KoukiHama commented 3 years ago

I guess database is not related to this login issue. I recommend to set account manually from scratch.

If you change this parameter in portal-ext.properties

setup.wizard.enabled=true

You can set admin user info on browser.

After setting and restart tomcat and setting like this

Setup image Then you may login by. setup@sw360.org and pass test.

KoukiHama commented 3 years ago

And can you share portal-setup-wizard.properties in liferay folder? It is made by liferay automatically after setting and start of tomcat .

dineshr93 commented 3 years ago

Hi @KoukiHama I didn't have such file in my liferay folder. But I have noticed that such file in deed exists in liferay folder of my older instance. I think my current liferay is not creating it. Shall I create them my self or anyother way?

KoukiHama commented 3 years ago

Hi @dineshr93 I am little confused because your liferay instance don't make setup wizard. But I think if you make portal-setup-wizard.properties by yourself , you can set admin user info property and login liferay.

In my blog, i wrote my setting of setting wizard. https://qiita.com/K-Hama/items/1582b4e1bf248025eabb

(Written in japanese but you can find it soon)

dineshr93 commented 3 years ago

Hi @KoukiHama Thanks for the article. After adding the portal-setup-wizard.properties too the login didn't work. So I deleted the postgres lportal db & re-created a blank db lportal & tried again it worked then!

After creating 2 sample components I tried to Search the components, it did not work. But after following https://github.com/eclipse/sw360/issues/940#issuecomment-725336280 it worked.