Error in Logs.

So I just got time to take another run at setting up a Bonita Server.  Created an Ubuntu 20.04 LTS VM.  Installed Java.  Installed and configured SQL Server.  Installed and configured Bonita.  It seems to start OK.  Then I went to access the web interface and got a 500 error.  So I found and looked at the logs... here's what I found... Suggestions welcome...

2022-05-05T14:13:22,499-0400 | mixmaster | ERROR | [http-nio-8080-exec-2|47] o.a.c.c.C.[.[.[.[livingApplicationServlet] - Servlet.service() for servlet [livingApplicationServlet] in context with path [/bonita] threw exception
org.bonitasoft.console.common.server.utils.DefaultTenantIdException: Can't retrieve default tenant id
    at org.bonitasoft.console.common.server.utils.TenantsManagementUtils.getDefaultTenantId(TenantsManagementUtils.java:170) ~[console-common-7.14.0.jar:?]
    at org.bonitasoft.console.common.server.login.TenantIdAccessor.getDefaultTenantId(TenantIdAccessor.java:54) ~[console-server-7.14.0.jar:?]
    at org.bonitasoft.console.common.server.login.TenantIdAccessor.ensureTenantId(TenantIdAccessor.java:48) ~[console-server-7.14.0.jar:?]
    at org.bonitasoft.console.common.server.login.filter.AuthenticationFilter.getAuthenticationManager(AuthenticationFilter.java:208) ~[console-server-7.14.0.jar:?]
    at org.bonitasoft.console.common.server.login.filter.AuthenticationFilter.createLoginPageUrl(AuthenticationFilter.java:222) ~[console-server-7.14.0.jar:?]
    at org.bonitasoft.console.common.server.login.filter.AuthenticationFilter.doAuthenticationFiltering(AuthenticationFilter.java:111) ~[console-server-7.14.0.jar:?]
    at org.bonitasoft.console.common.server.login.filter.AuthenticationFilter.proceedWithFiltering(AuthenticationFilter.java:95) ~[console-server-7.14.0.jar:?]
    at org.bonitasoft.console.common.server.filter.ExcludingPatternFilter.doFilter(ExcludingPatternFilter.java:37) ~[console-common-7.14.0.jar:?]
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189) ~[catalina.jar:9.0.58]
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162) ~[catalina.jar:9.0.58]
    at org.bonitasoft.console.common.server.login.filter.TokenValidatorFilter.proceedWithFiltering(TokenValidatorFilter.java:73) ~[console-server-7.14.0.jar:?]
    at org.bonitasoft.console.common.server.filter.ExcludingPatternFilter.doFilter(ExcludingPatternFilter.java:37) ~[console-common-7.14.0.jar:?]
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189) ~[catalina.jar:9.0.58]
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162) ~[catalina.jar:9.0.58]
    at org.bonitasoft.console.common.server.login.filter.ContentTypeSecurityFilter.proceedWithFiltering(ContentTypeSecurityFilter.java:65) ~[console-common-7.14.0.jar:?]
    at org.bonitasoft.console.common.server.filter.ExcludingPatternFilter.doFilter(ExcludingPatternFilter.java:37) ~[console-common-7.14.0.jar:?]
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189) ~[catalina.jar:9.0.58]
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162) ~[catalina.jar:9.0.58]
    at org.bonitasoft.console.common.server.login.filter.FrameSecurityFilter.proceedWithFiltering(FrameSecurityFilter.java:66) ~[console-common-7.14.0.jar:?]
    at org.bonitasoft.console.common.server.filter.ExcludingPatternFilter.doFilter(ExcludingPatternFilter.java:37) ~[console-common-7.14.0.jar:?]
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189) ~[catalina.jar:9.0.58]
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162) ~[catalina.jar:9.0.58]
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:197) [catalina.jar:9.0.58]
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:97) [catalina.jar:9.0.58]
    at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:540) [catalina.jar:9.0.58]
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:135) [catalina.jar:9.0.58]
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92) [catalina.jar:9.0.58]
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:78) [catalina.jar:9.0.58]
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:359) [catalina.jar:9.0.58]
    at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:399) [tomcat-coyote.jar:9.0.58]
    at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65) [tomcat-coyote.jar:9.0.58]
    at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:889) [tomcat-coyote.jar:9.0.58]
    at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1735) [tomcat-coyote.jar:9.0.58]
    at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) [tomcat-coyote.jar:9.0.58]
    at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1191) [tomcat-util.jar:9.0.58]
    at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659) [tomcat-util.jar:9.0.58]
    at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) [tomcat-util.jar:9.0.58]
    at java.lang.Thread.run(Thread.java:829) [?:?]
Caused by: org.bonitasoft.engine.platform.LoginException: org.bonitasoft.engine.core.login.SLoginException: User name or password is not valid!
    at org.bonitasoft.engine.api.impl.LoginAPIImpl.login(LoginAPIImpl.java:64) ~[bonita-server-7.14.0.jar:?]
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:?]
    at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
    at java.lang.reflect.Method.invoke(Method.java:566) ~[?:?]
    at org.bonitasoft.engine.api.impl.ServerAPIImpl.invokeAPI(ServerAPIImpl.java:431) ~[bonita-server-7.14.0.jar:?]
    at org.bonitasoft.engine.api.impl.ServerAPIImpl.invokeAPIOutsideTransaction(ServerAPIImpl.java:277) ~[bonita-server-7.14.0.jar:?]
    at org.bonitasoft.engine.api.impl.ServerAPIImpl.invokeAPI(ServerAPIImpl.java:267) ~[bonita-server-7.14.0.jar:?]
    at org.bonitasoft.engine.api.impl.ServerAPIImpl.invokeMethod(ServerAPIImpl.java:125) ~[bonita-server-7.14.0.jar:?]
    at org.bonitasoft.engine.api.impl.ClientInterceptor.invoke(ClientInterceptor.java:79) ~[bonita-common-7.14.0.jar:?]
    at com.sun.proxy.$Proxy127.login(Unknown Source) ~[?:?]
    at org.bonitasoft.console.common.server.utils.TenantsManagementUtils.getDefaultTenantId(TenantsManagementUtils.java:165) ~[console-common-7.14.0.jar:?]
    ... 37 more
Caused by: org.bonitasoft.engine.core.login.SLoginException: User name or password is not valid!
    at org.bonitasoft.engine.core.login.SecuredLoginServiceImpl.checkIsNotBlank(SecuredLoginServiceImpl.java:133) ~[bonita-server-7.14.0.jar:?]
    at org.bonitasoft.engine.core.login.SecuredLoginServiceImpl.login(SecuredLoginServiceImpl.java:84) ~[bonita-server-7.14.0.jar:?]
    at org.bonitasoft.engine.api.impl.LoginAPIImpl.lambda$loginInternal$0(LoginAPIImpl.java:130) ~[bonita-server-7.14.0.jar:?]
    at org.bonitasoft.engine.transaction.JTATransactionServiceImpl.executeInTransaction(JTATransactionServiceImpl.java:269) ~[bonita-server-7.14.0.jar:?]
    at org.bonitasoft.engine.api.impl.LoginAPIImpl.loginInternal(LoginAPIImpl.java:130) ~[bonita-server-7.14.0.jar:?]
    at org.bonitasoft.engine.api.impl.LoginAPIImpl.loginInternal(LoginAPIImpl.java:106) ~[bonita-server-7.14.0.jar:?]
    at org.bonitasoft.engine.api.impl.LoginAPIImpl.login(LoginAPIImpl.java:60) ~[bonita-server-7.14.0.jar:?]
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:?]
    at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
    at java.lang.reflect.Method.invoke(Method.java:566) ~[?:?]
    at org.bonitasoft.engine.api.impl.ServerAPIImpl.invokeAPI(ServerAPIImpl.java:431) ~[bonita-server-7.14.0.jar:?]
    at org.bonitasoft.engine.api.impl.ServerAPIImpl.invokeAPIOutsideTransaction(ServerAPIImpl.java:277) ~[bonita-server-7.14.0.jar:?]
    at org.bonitasoft.engine.api.impl.ServerAPIImpl.invokeAPI(ServerAPIImpl.java:267) ~[bonita-server-7.14.0.jar:?]
    at org.bonitasoft.engine.api.impl.ServerAPIImpl.invokeMethod(ServerAPIImpl.java:125) ~[bonita-server-7.14.0.jar:?]
    at org.bonitasoft.engine.api.impl.ClientInterceptor.invoke(ClientInterceptor.java:79) ~[bonita-common-7.14.0.jar:?]
    at com.sun.proxy.$Proxy127.login(Unknown Source) ~[?:?]
    at org.bonitasoft.console.common.server.utils.TenantsManagementUtils.getDefaultTenantId(TenantsManagementUtils.java:165) ~[console-common-7.14.0.jar:?]
    ... 37 more
2022-05-05T14:13:22,503-0400 | mixmaster | INFO  | [http-nio-8080-exec-2|47] o.b.c.c.s.s.ErrorPageServlet - Displaying error page with code 500

Hello,

 

Can you please check the SQL server configuration. It can be possible that no user name or password has been selected. 
https://documentation.bonitasoft.com/bonita/2022.1/runtime/database-configuration
Have you specified a user for the database?

Let me know.

 

Kind regards,

Soham

Both the Platform Administrator login (in a single file) and the Tenant Administrator login were customized by me (in 2 files). There is still no "current" config directory present despite numerous attempts to start Bonita. When it comes to the tenant administrator... in the file platform-tenant-config.properties file. https://documentation.bonitasoft.com/bonita/2022.1/identity/tenant-admin-credentials#_important_notice_only_for_default_tenant basket random

Did you update the tenant file configuration? In that case, I urge you to read this documentation.

I must admit that I found the instructions on your link the most confusing part of the setup, since they are assuming that SQL Server 2019 is running on Windows, and yet I'm running it on Ubuntu... so I just did my best.

Nonetheless, I have opted to use SQL Server 2019's "sa" account to access Bonita, and configured /opt/Bonita/BonitaCommunity-2022.1-u0/setup/database.properties as such...

#########################################
# Bonita database properties
#########################################

# valid values are (h2, postgres, sqlserver, oracle, mysql)
db.vendor=sqlserver
# when using h2, no server or port setting is needed since connexion is made using file protocol mode u>
db.server.name=127.0.0.1
db.server.port=1433
# if your database name contains a backslash (\) character, you must double it (\\):
db.database.name=BonitaInternal
db.user=sa
# if your database password contains a backslash (\) character, you must double it (\\):
db.password=RedactedPassword

###################################
# Business Data database properties
###################################
# valid values are (h2, postgres, sqlserver, oracle, mysql)
bdm.db.vendor=sqlserver
bdm.db.server.name=127.0.0.1
bdm.db.server.port=1433
bdm.db.database.name=BonitaBusinessData
bdm.db.user=sa
bdm.db.password=RedactedPassword


# IMPORTANT NOTE regarding H2 database:
# in case you move whole setup folder to another directory, you must change property below
# to point to original folder containing h2 database folder
# new value can be relative or absolute since it still points to the right folder
# WARNING for Windows users: keep forward slashes like below (instead of backslashes):
h2.database.dir=../h2_database


I can also validate that the database is working correctly, since I can connect to it using that same "sa" account using SQL Server's Management Studio (from a separate PC).  Incidentally, I have made no other accounts in SQL Server.

Suggestions?

Hello,

 

Did you change the tenant file configuration? If so I would advice you to please read this documentation: https://documentation.bonitasoft.com/bonita/2022.1/identity/tenant-admin-credentials

Please let me know. Thanks.

 

Kind regards,

Soham

Hello, 

I got some suggestions from our R&D:

The database properties are ok, the problem does not come from here.

  • 1st suggestion is to ask if he had correctly configured his SQL Server database to support XA transactions (as described in the documentation you already linked). Concerning his comment on running SQL Server on Ubuntu. Indeed it's possible but most of the time clients want to install a SQL Server on a Windows distribution.
  • 2nd suggestion is to ask if he had changed the username/password of the "tenant technical user". There are actually 2 property files to update, maybe he forget to setup one (cf. https://documentation.bonitasoft.com/bonita/2022.1/identity/tenant-admin-credentials#_important_notice_only_for_default_tenant)

Let me know. Thanks.

 

Kind regards,

Soham

Hello Soham

1.  I've attempted to get XA transactions working properly under linux Ubuntu, but the process seems VERY different, and I have yet to validate it's actually working... I guess I'll try to hammer on Google for more answers on this.

2.  Under the install directions at:

 https://documentation.bonitasoft.com/bonita/2022.1/runtime/tomcat-bundle#_change_the_default_credentials_optional_recommended_for_production 

... as instructed, I customized the Platform Administrator login (in one file) and the Tenant Administrator login (in 2 files).  Despite several attempts to run Bonita, no "current" config directory has been created yet.  Regarding the tenant administrator... in the file platform-tenant-config.properties file, I uncommented and customized the platform.tenant.default.username and password lines... but I merely uncommented the platform.tenant.default.id line and left it equal to 0.  Is this correct?  The documentation is not specific on this...

Thanks in advance!

Frank.

Hello,

Would you mind getting in touch with our sales/pre-sales engineer considering that you want to use Bonita for your firm. I present you the contact form here: https://www.bonitasoft.com/contact-us

The setup you are trying to do is not usual. SQL Server on Ubuntu is not common. We need to see the necessary configuration with Bonita - it won't be for now. So, since the objective of the community is to help us discover new use cases, please dig a bit deeper on your side and maybe share their results with us.

Hope this helps. Please keep me informed. Have a nice day.

 

Kind regards,

Soham