Can't retrieve default tenant id

1
0
-1

Bonita BPM Community 6.2.2 bundled with Tomcat

Ubuntu 12.10 64bit with Oracle Java version 7.51
Tomcat is running, when I access http://localhost:8080 I get the default tomcat home page, add /bonita I get the following error message;
HTTP Status 500 - org.bonitasoft.console.common.server.utils.DefaultTenantIdException: Can't retrieve default tenant id
Reviewing the log I find

Feb 27, 2014 10:42:09 AM org.apache.naming.NamingContext lookup
WARNING: Unexpected exception resolving reference
org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (Connection is broken: "java.net.ConnectException: Connection refused: localhost:9091" [90067-170])

Further down in the log I find this;

aused by: org.h2.jdbc.JdbcSQLException: Connection is broken: "java.net.ConnectException: Connection refused: localhost:9091" [90067-170]<br />
 at org.h2.message.DbException.getJdbcSQLException(DbException.java:329)<br />
 at org.h2.message.DbException.get(DbException.java:158)<br />
 at org.h2.engine.SessionRemote.connectServer(SessionRemote.java:399)<br />
 at org.h2.engine.SessionRemote.connectEmbeddedOrServer(SessionRemote.java:287)<br />
 at org.h2.jdbc.JdbcConnection.<init>(JdbcConnection.java:109)<br />
 at org.h2.jdbc.JdbcConnection.<init>(JdbcConnection.java:93)<br />
 at org.h2.Driver.connect(Driver.java:72)

I have completely removed reference to the H2 listener from server.xml, following is the line I removed;

I'm connecting to a mysql database on an external server, I have updated bitronix-resources.properties to point to my sql server as shown;

esource.ds1.className=com.mysql.jdbc.jdbc2.optional.MysqlXADataSource<br />
resource.ds1.driverProperties.user=xxxx<br />
resource.ds1.driverProperties.password=xxxx<br />
resource.ds1.driverProperties.URL=jdbc:mysql://srvmysql:3306/bonita?dontTrackOpenResources=true&useUnicode=true&characterEncoding=UTF-8<br />
resource.ds1.driverProperties.testQuery=SELECT 1

And my bonita.xml been update;

auth="Container"
type="javax.sql.DataSource"
maxActive="17"
minIdle="5"
maxWait="10000"
initialSize="3"
maxPoolSize="15"
minPoolSize="3"
maxConnectionAge="0"
maxIdleTime="1800"
maxIdleTimeExcessConnections="120"
idleConnectionTestPeriod="30"
acquireIncrement="3"
validationQuery="SELECT 1"
validationInterval="30000"
testConnectionOnCheckout="true"
removeAbandoned="true"
logAbandoned="true"
username="xxxxxx"
password="xxxxx"
driverClassName="com.mysql.jdbc.Driver"
url="jdbc:mysql://srvmysql:3306/bonita?dontTrackOpenResources=true&useUnicode=true&characterEncoding=UTF-8"/>

Finally setup the xetevn.sh with the proper database type; B_OPTS="-Dsysprop.bonita.db.vendor=mysql". Added mysql-connector-java-5.1.29-bin.jar to the /lib directory. I have went into platform-tenant-config.porperties and added the line platform.create=true.

What else am I missing? Happy to supply my log but like to know what is the best way to share it?

Thanks for your help.

 

5 answers

1
0
-1

I had the same problem and also in log file there was an ERROR which said "packet for query is too large".
By adding max_allowed_packet = 32M in my.cnf file bellow** [mysqld] **and restarting mysql server I could connect to portal and load login page.

1
0
-1

I don't understand, I was postive I posted a solution to my issue, but now I don't see it. It would appear I owe you an apology. Want I found out in the inst. located here http://documentation.bonitasoft.com/tomcat-bundle was to add the following line

Note: add to the appropriate section in the file bitronix-resources.properties

resource.ds1.driverProperties.testquery=Select 1 (or "Select 1 from Dual" for oracle)
When I commented this line out it started working.

Comments

Submitted by DeclanMcGarry on Thu, 03/13/2014 - 20:46

And sorry I was away from the thread for so long - I'm glad you got it sorted out.

Strange that the commend vanished. if it happens again we can refer it to the admin on this site.

1
0
-1

Found the issue with my setup, under the setup insturcations there is this

Note: add to the appropriate section in the file bitronix-resources.properties

resource.ds1.driverProperties.testquery=Select 1 (or "Select 1 from Dual" for oracle)
I comment it out and now connecting to mysql and i can access the default web page.

1
0
-1

Tested the user and password set in bonita by logging into the mysql database from the bonita server. I was able to login with the designated user, create tables. I did have to issue command "use BonitaV6" before I could create a table. How does this user know which database to use or is it expected that this user be able to create the database?

Comments

Submitted by DeclanMcGarry on Fri, 02/28/2014 - 20:57

the database to use is in the connect string (the URL in the config file). in the example you posted you are looking for the database called bonita - it is what is directly after the portnumber/ in the URL. if it's called bonita here, and bonitaV6 on your server, that might be the problem.

otherwise, can we see the log file? (you can post it here, or if you have a dropbox you can share).

1
0
-1

Hi TheB2B,

there are a bunch of things on the checklist for server setup. I read your submission and I think you've covered most of them. Have you created the (empty) bonita DB on srvmysql and given user xxxxxx admin rights to it?

try starting up and see what the log says the problem is.

and you can post the log entry here if you like - just take care to truncate it so that it is only the bit from the startup.

thx,

-declan

Comments

Submitted by TheB2B on Wed, 03/05/2014 - 20:34

Preformed the points suggested, still unable to successfully get Bonita running.

Any further suggestions? I'm open to try most anything at this point, provide more information, looking for some help here please.

Submitted by DeclanMcGarry on Wed, 03/05/2014 - 21:53

can you post the log file here, or put it in a dropbox location and share it with me?

i've configured bonita lots of times to use different databases, including mySQL. the problems are usually diagnosed in the log file, but the log file can is not structured very well, so it can be difficult to figure out where the error is. that's why getting a look at the log file would (i think) ne useful.

-declan

Submitted by TheB2B on Wed, 03/05/2014 - 21:59

Here is what I believe you are looking for;

https://db.tt/33fCceB0

If not let me know, thanks for the help!

Submitted by DeclanMcGarry on Thu, 03/13/2014 - 16:43

Hi TheB2B,

so, apologies for getting back to you so late - i was swamped on a project.

Thanks for posting the log file. I think key line from the log is :

Caused by: bitronix.tm.utils.PropertyException: no writeable property 'testQuery' in class 'com.mysql.jdbc.jdbc2.optional.MysqlXADataSource'

so look at the line :

resource.ds1.driverProperties.URL=jdbc:mysql://srvmysql:3306/bonita?dontTrackOpenResources=true&useUnicode=true&characterEncoding=UTF-8 resource.ds1.driverProperties.testQuery=SELECT 1
in the bitronix resource properties file. Are there any issues with it? driverProperties for the mySQL driver allow a testQuery property, so my best guess, without looking at the file is that there is a stray character here. check that all the properties are on a new line, and that there are no trailing spaces.
let me know if that helps?
thx,
-declan
Submitted by TheB2B on Fri, 03/14/2014 - 13:08

Found source of the problem, in the setup inst there is a line to add the following;

Note: add to the appropriate section in the file bitronix-resources.properties

resource.ds1.driverProperties.testquery=Select 1 (or "Select 1 from Dual" for oracle)
When I commented the line, I was able to connect to the sql server and web page now loads. I my case this part of the inst is invalid, wonder if anybody else has had similar experinces?
Notifications