linshare icon indicating copy to clipboard operation
linshare copied to clipboard

Admin interface not showing login dialog. New login page returns An unexpected error happened!

Open cheegui opened this issue 3 years ago • 15 comments

Hi All

We installed linshare 6.0.2 on Ubuntu 20.0.4. When we went to the Admin Interface http://linshare-admin.local, we did not see any login dialog. We had to click New Admin Portal to go to a login page but when we tried to login as [email protected] with adminlinshare password, we got a "An unexpected error happened!". This is similar to https://github.com/linagora/linshare-thumbnail-server/issues/2 We checked the apache and tomcat logs and there were no errors.

Thank you very much in anticipation

UPDATE: We installed linshare 6.0.2 on Debian 11 and followed the instructions in the documentation "LinShare Installation on Debian". Now we are able to login as [email protected] but only at the /new/login page. BUT when we go to http://linshare-admin.local, the "legacy" page quickly redirects to the /new/login page. Is this the correct behavior? Maybe linshare wants everybody to use the new login?

cheegui avatar Mar 05 '23 14:03 cheegui

Okay we found out the problem. mongod wasn't running. The documentation for "LinShare Installation on Debian" is missing this step : systemctl enable mongod

cheegui avatar Mar 07 '23 12:03 cheegui

Hello @functioneer,

Great, thanks a lot, I will improve the documentation to add it.

Regards, Fabien

fabienmoyon avatar Mar 07 '23 13:03 fabienmoyon

I followed your solution (systemctl enable mongod), still have the problem: when logging in, "An unexpected error happened!" installed v6.0.1 on Debian 11.1.0

Hrsolim avatar Mar 12 '23 08:03 Hrsolim

I followed your solution (systemctl enable mongod), still have the problem: when logging in, "An unexpected error happened!" installed v6.0.1 on Debian 11.1.0

Is mongod running?
systemctl start mongod systemctl status mongod

cheegui avatar Mar 12 '23 09:03 cheegui

I followed your solution (systemctl enable mongod), still have the problem: when logging in, "An unexpected error happened!" installed v6.0.1 on Debian 11.1.0

Is mongod running? systemctl start mongod systemctl status mongod

Dear functioneer, Yes, it's running. I tried to downgrade to v5.1.1, but the same error occurs. Is there any VM pack with v6 installed to download and test? I saw only v2 is in download section.

Hrsolim avatar Mar 12 '23 10:03 Hrsolim

for tracing the problem: org.springframework.beans.factory.BeanDefinitionStoreException: 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"

Could you please light me to solve this?

Hrsolim avatar Mar 15 '23 14:03 Hrsolim

Hi there,

I exactly have the same issue following upgrade from 5.1.0 to 6.0.0, i can't login anymore on admin web console (message "An unexpected error happened!").

All services are UP (apache, tomcat, postgre, mongo). I exactly follow the upgrade procedure, i note that "upgrade database script" is not mentioned in the procedure, but the 5.1.0 to 6.0.0 upgrade script exists in downloaded archive. So i tried to apply to upgrade script and i always have the issue.

I have a lot of same error in Catalina.out concerning bean creation in the same way that "Hrsolim" indicated in his last comment.

In addition, i can't log on the user portal, when i'm validating the login screen, nothing happen and the error message appeared.

Can you help us to understand the root cause of this issue ?

FLeroyAliasNT avatar Mar 21 '23 15:03 FLeroyAliasNT

Hi there,

I finally found the problem... so strange :

  • when we installed Linshare, we use 5.0.0 version.
  • after that we upgraded to 5.1.0 version.
  • finally we upgraded to 6.0.0 version today.

I found that the 3 credential fields for MongoDB wasn't completed in lineshare.properties file. That so strange because without credential, the 5.0.0 et 5.1.0 has been work correctly.

I finish my comment with a complementary information about previous comment "i note that upgrade database script is not mentioned in the procedure" : that's the case in english version, but the upgrade database script part is present in french version.

FLeroyAliasNT avatar Mar 21 '23 21:03 FLeroyAliasNT

Hi there,

I finally found the problem... so strange :

* when we installed Linshare, we use 5.0.0 version.

* after that we upgraded to 5.1.0 version.

* finally we upgraded to 6.0.0 version today.

I found that the 3 credential fields for MongoDB wasn't completed in lineshare.properties file. That so strange because without credential, the 5.0.0 et 5.1.0 has been work correctly.

I finish my comment with a complementary information about previous comment "i note that upgrade database script is not mentioned in the procedure" : that's the case in english version, but the upgrade database script part is present in french version.

Hi FLeroy, could you tell us what to do to solve the error?

Hrsolim avatar Apr 11 '23 10:04 Hrsolim

catalina.out.txt this is my newest log file

Hrsolim avatar Apr 11 '23 12:04 Hrsolim

seems nobody takes care of users...

Hrsolim avatar Apr 18 '23 10:04 Hrsolim

Hi,

If the admin interface is not showing the login dialog, it means the admin application was not able to reach the backend, either the backend is not running properly (See tomcat's logs) or there is a proxy pass issue in the Apache HTTP configuration (see its logs) or there is a mongodb issue in the mongo configuration (see its logs) like @functioneer said : https://github.com/linagora/linshare/issues/264#issuecomment-1458055142

You have to following error message: "Could not resolve placeholder 'LINSHARE_HOME'". This means you did not setup properly the external configuration file, so linshare is reading the default embedded configuration file.

You must follow this guide. You have to edit the file /etc/sysconfig/tomcat to add at the end the following options:

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

Regards, Fabien

fabienmoyon avatar Apr 18 '23 13:04 fabienmoyon

Hi Fabien. I have just tried to test again with your solution. I do not see this: /etc/sysconfig/tomcat I am on Debian 11

Hrsolim avatar Apr 29 '23 12:04 Hrsolim

Hello Hrsolim,

I've just updated our test linshare version from 5.1.2 to 6.0.0

Thanks to @FLeroyAliasNT : i had to change two lines in linshare.properties, credential fields for MongoDB that wasn't required in previous versions: linshare.mongo.data.credentials=<mongo_user>:<mongo_password>@admin linshare.mongo.smallfiles.credentials=<mongo_user>:<mongo_password>@admin

I think upgrade documentation should mention it.

Best regards,

PhidarkMM avatar Oct 23 '23 09:10 PhidarkMM

Bonjour Messieurs, ravi de vous contacter, je me permet de solliciter votre aide pour l'installation de linshare sur Debian 11 j'ai essayé moi meme et je renctre un problème sur la page de connexion de l'interface adminitrateur lors que j'essaie de me connecter avec les identifiants par défauts cela me retourne un message qui dit : <<Une erreur inattendue s'est produite ! >> comment faire ? l'installation elle t'elle correcte ? je suis novice besoin d'aide s'il vous plait

fredsneck avatar Aug 29 '25 14:08 fredsneck