linagora / linshare-core

Open Source secure files sharing
http://www.linshare.org
GNU Affero General Public License v3.0
56 stars 29 forks source link

Unable to Login #23

Closed mzch closed 4 years ago

mzch commented 4 years ago

Hi,

I setup LinShare on tomcat9 and java11. (Debian 10) I tried to login to admin panel, only login form repeatedly appears and can't login.

127.0.0.1 - - [08/Dec/2019:09:06:09 +0900] "GET /linshare/webservice/rest/user/v2/authentication/authorized HTTP/1.1" 401 1168
127.0.0.1 - - [08/Dec/2019:09:06:49 +0900] "GET /linshare/webservice/rest/admin/authentication/authorized?ignoreAuthModule=true HTTP/1.1" 200 358
127.0.0.1 - - [08/Dec/2019:09:06:50 +0900] "GET /linshare/webservice/rest/admin/authentication/version HTTP/1.1" 401 1168
127.0.0.1 - - [08/Dec/2019:09:06:50 +0900] "GET /linshare/webservice/rest/admin/upgrade_tasks HTTP/1.1" 401 1168
127.0.0.1 - - [08/Dec/2019:09:06:50 +0900] "GET /linshare/webservice/rest/admin/authentication/authorized HTTP/1.1" 401 1168
127.0.0.1 - - [08/Dec/2019:09:06:50 +0900] "GET /linshare/webservice/rest/admin/authentication/authorized?ignoreAuthModule=true HTTP/1.1" 401 1122
127.0.0.1 - - [08/Dec/2019:09:06:50 +0900] "GET /linshare/webservice/rest/admin/authentication/authorized?ignoreAuthModule=true HTTP/1.1" 401 1122
127.0.0.1 - - [08/Dec/2019:09:06:50 +0900] "GET /linshare/webservice/rest/admin/authentication/authorized?ignoreAuthModule=true HTTP/1.1" 401 1122

Anyone can help me?

mzch commented 4 years ago

And I tried to login user panel and entered default credentials, but LinShare only pop-up 'Welcome Administrator' and keeps login form. In other word...I can't login.

fred49 commented 4 years ago

Hi,

Are you trying to login into ui-admin with the account 'root@localhost.localdomain' and the default password 'adminlinshare' ?

mzch commented 4 years ago

Yes.

fred49 commented 4 years ago

Did you look at the logs of Tomcat server ? By default logs are here /var/log/tomcat9/catalina.out

mzch commented 4 years ago

When trying login ui-user, NOT FOUND: The server is temporary not responding shows. and admin panel show blank page: FireShot_Capture_015

fred49 commented 4 years ago

Could not resolve placeholder 'LINSHARE_HOME' in value "jdbc:h2:file:${LINSHARE_HOME}/var/lib/linshare/db/linshare"

It means the linshare.properties file is not read. So you should look at the /etc/default/tomcatx file to see if added the following key:

JAVA_OPTS="${JAVA_OPTS} -Djava.awt.headless=true -Xms512m -Xmx2048m" JAVA_OPTS="${JAVA_OPTS} -Dlinshare.config.path=file:/etc/linshare/" JAVA_OPTS="${JAVA_OPTS} -Dlog4j.configuration=file:/etc/linshare/log4j.properties" JAVA_OPTS="${JAVA_OPTS} -Dspring.profiles.active=default,jcloud,batches"

cf the sample file.

You can get it properly here .

mzch commented 4 years ago

Thanks, @fred49 ! It worked!

Hrsolim commented 1 year ago

Could not resolve placeholder 'LINSHARE_HOME' in value "jdbc:h2:file:${LINSHARE_HOME}/var/lib/linshare/db/linshare"

It means the linshare.properties file is not read. So you should look at the /etc/default/tomcatx file to see if added the following key:

JAVA_OPTS="${JAVA_OPTS} -Djava.awt.headless=true -Xms512m -Xmx2048m" JAVA_OPTS="${JAVA_OPTS} -Dlinshare.config.path=file:/etc/linshare/" JAVA_OPTS="${JAVA_OPTS} -Dlog4j.configuration=file:/etc/linshare/log4j.properties" JAVA_OPTS="${JAVA_OPTS} -Dspring.profiles.active=default,jcloud,batches"

cf the sample file.

You can get it properly here .

Dear Fred, I changed the Linshare.properties file.

Could you please explain the error in catalina.out:

Invalid bean definition with name 'dataSourceHibernate' defined in file [/var/lib/tomcat9/webapps/linshare/WEB-INF/classes/springContext-datasource.xml]: Could not resolve placeholder 'LINSHARE_HOME' in value "jdbc:h2:file:${LINSHARE_HOME}/var/lib/linshare/db/linshare"; nested exception is java.lang.IllegalArgumentException: Could not resolve placeholder 'LINSHARE_HOME' in value "jdbc:h2:file:${LINSHARE_HOME}/var/lib/linshare/db/linshare"

in this file : springContext-datasource.xml there is no definition for "LINSHARE_HOME"

sorry I posted many in the topics related to my problem.