Flowable Task application startup failure

Hi,

I installed Flowable on CentOS with Postgres as the DB. All applications seem to be working fine, except Flowable Task.

The log file states ‘Connections could not be acquired from the underlying database’, but no further clue as to why that may happen. The DB logs do not show anything at all.

I checked the properties file for the Task application, but it looks exactly the same as the other properties files, same user and password, same datasourse url and driver as the other applications.
I noticed that IDM, Modeler and Admin each have their own database by default, but Task uses the database ‘flowable’, I assume that is correct ?
If so, am I looking at a resource issue with my server or on the DB side, or is there a setting somewhere on the Flowable side causing this ?
No other changes have been made anywhere, both Flowable (and all applications) as well as Postgres are ‘as is’, out of the box, with the exception of the database used of course.

Thanks.

How does your jdbc connection string looks like for the task apa?

Not sure, where do you see that?

Hi Joran,

the connection string for the Task app., looks like this :

datasource.url=jdbc:postgresql://localhost:5432/flowable

Here is the stack trace of the startup failure :slight_smile:
28-Jul-2017 09:49:13.431 WARNING [localhost-startStop-1] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesThreads The web application [flowable-task] appears to have started a thread named [C3P0PooledConnectionPoolManager[identityToken->1hgf8ua9p124z2o911y7a3l|75f7bc15]-HelperThread-#1] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:
java.io.FileOutputStream.writeBytes(Native Method)
java.io.FileOutputStream.write(FileOutputStream.java:345)
java.io.BufferedOutputStream.write(BufferedOutputStream.java:122)
java.io.PrintStream.write(PrintStream.java:480)
org.apache.tomcat.util.log.SystemLogHandler.write(SystemLogHandler.java:177)
sun.nio.cs.StreamEncoder.writeBytes(StreamEncoder.java:221)
sun.nio.cs.StreamEncoder.implFlushBuffer(StreamEncoder.java:291)
sun.nio.cs.StreamEncoder.implFlush(StreamEncoder.java:295)
sun.nio.cs.StreamEncoder.flush(StreamEncoder.java:141)
java.io.OutputStreamWriter.flush(OutputStreamWriter.java:229)
org.apache.log4j.helpers.QuietWriter.flush(QuietWriter.java:59)
org.apache.log4j.WriterAppender.subAppend(WriterAppender.java:324)
org.apache.log4j.WriterAppender.append(WriterAppender.java:162)
org.apache.log4j.AppenderSkeleton.doAppend(AppenderSkeleton.java:251)
org.apache.log4j.helpers.AppenderAttachableImpl.appendLoopOnAppenders(AppenderAttachableImpl.java:66)
org.apache.log4j.Category.callAppenders(Category.java:206)
org.apache.log4j.Category.forcedLog(Category.java:391)
org.apache.log4j.Category.log(Category.java:856)
org.slf4j.impl.Log4jLoggerAdapter.warn(Log4jLoggerAdapter.java:478)
com.mchange.v2.log.slf4j.Slf4jMLog$Slf4jMLogger$WarnLogger.log(Slf4jMLog.java:223)
com.mchange.v2.log.slf4j.Slf4jMLog$Slf4jMLogger.log(Slf4jMLog.java:256)
com.mchange.v2.resourcepool.BasicResourcePool$ScatteredAcquireTask.run(BasicResourcePool.java:1911)
com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread.run(ThreadPoolAsynchronousRunner.java:696)

After further investigating this, I noticed when the Task application starts, there is a huge number of connection requests going out to Postgres, many more then any other applications. I checked the Task app DB settings, and the connection file settings are default, I do not see anything in there allowing / asking for a high number of connections at all.

I counted the number of connection requests, and it is well over 700, where as if I do not install Task, the total is well below 100 between all other applications combined …

Why is it that the Task application is requesting that many connections ?
The debug log also shows that the Connection Pool is running out of connections, which I guess makes sense if there are that many requests.
Anybody have an idea why this is, or where I can find the settings to reduce the number of connection requests within the Task application ?

Here is the entire message I am seeing when starting Flowable :

02:34:35,257 [localhost-startStop-1] INFO com.mchange.v2.c3p0.impl.AbstractPoolBackedDataSource - Initializing c3p0 pool… com.mchange.v2.c3p0.ComboPooledDataSource [ acquireIncrement -> 5, acquireRetryAttempts -> 30, acquireRetryDelay -> 1000, autoCommitOnClose -> false, automaticTestTable -> null, breakAfterAcquireFailure -> false, checkoutTimeout -> 0, connectionCustomizerClassName -> null, connectionTesterClassName -> com.mchange.v2.c3p0.impl.DefaultConnectionTester, contextClassLoaderSource -> caller, dataSourceName -> 1hgf8ua9p12f83rzxtl442|4867d7ab, debugUnreturnedConnectionStackTraces -> false, description -> null, driverClass -> org.postgresql.Driver, extensions -> {}, factoryClassLocation -> null, forceIgnoreUnresolvedTransactions -> false, forceSynchronousCheckins -> false, forceUseNamedDriverClass -> false, identityToken -> 1hgf8ua9p12f83rzxtl442|4867d7ab, idleConnectionTestPeriod -> 0, initialPoolSize -> 3, jdbcUrl -> jdbc:postgresql://localhost:5432/flowable, maxAdministrativeTaskTime -> 0, maxConnectionAge -> 0, maxIdleTime -> 1800, maxIdleTimeExcessConnections -> 1800, maxPoolSize -> 150, maxStatements -> 0, maxStatementsPerConnection -> 0, minPoolSize -> 10, numHelperThreads -> 3, preferredTestQuery -> null, privilegeSpawnedThreads -> false, properties -> {user=******, password=******}, propertyCycle -> 0, statementCacheNumDeferredCloseThreads -> 0, testConnectionOnCheckin -> true, testConnectionOnCheckout -> true, unreturnedConnectionTimeout -> 0, userOverrides -> {}, usesTraditionalReflectiveProxies -> false ]
02:34:35,267 [localhost-startStop-1] WARN com.mchange.v2.resourcepool.BasicResourcePool - Bad pool size config, start 3 < min 10. Using 10 as start.
02:35:05,550 [C3P0PooledConnectionPoolManager[identityToken->1hgf8ua9p12f83rzxtl442|4867d7ab]-HelperThread-#0] WARN com.mchange.v2.resourcepool.BasicResourcePool - com.mchange.v2.resourcepool.BasicResourcePool$ScatteredAcquireTask@55d0cbf7 – Acquisition Attempt Failed!!! Clearing pending acquires. While trying to acquire a needed new resource, we failed to succeed more than the maximum number of allowed acquisition attempts (30). Last acquisition attempt exception:
java.lang.NullPointerException: tuples must be non-null
at org.postgresql.jdbc.PgResultSet.(PgResultSet.java:144)
at org.postgresql.jdbc.PgStatement.createResultSet(PgStatement.java:158)
at org.postgresql.jdbc.PgStatement$StatementResultHandler.handleResultRows(PgStatement.java:210)
at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2034)
at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:288)
at org.postgresql.jdbc.PgStatement.executeInternal(PgStatement.java:430)
at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:356)
at org.postgresql.jdbc.PgStatement.executeWithFlags(PgStatement.java:303)
at org.postgresql.jdbc.PgStatement.executeCachedSql(PgStatement.java:289)
at org.postgresql.jdbc.PgStatement.executeWithFlags(PgStatement.java:266)
at org.postgresql.jdbc.PgConnection.execSQLUpdate(PgConnection.java:477)
at org.postgresql.jdbc.PgConnection.getTransactionIsolation(PgConnection.java:847)
at com.mchange.v2.c3p0.impl.NewPooledConnection.(NewPooledConnection.java:120)
at com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(WrapperConnectionPoolDataSource.java:240)
at com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(WrapperConnectionPoolDataSource.java:206)
at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool$1PooledConnectionResourcePoolManager.acquireResource(C3P0PooledConnectionPool.java:203)
at com.mchange.v2.resourcepool.BasicResourcePool.doAcquire(BasicResourcePool.java:1138)
at com.mchange.v2.resourcepool.BasicResourcePool.doAcquireAndDecrementPendingAcquiresWithinLockOnSuccess(BasicResourcePool.java:1125)
at com.mchange.v2.resourcepool.BasicResourcePool.access$700(BasicResourcePool.java:44)
at com.mchange.v2.resourcepool.BasicResourcePool$ScatteredAcquireTask.run(BasicResourcePool.java:1870)
at com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread.run(ThreadPoolAsynchronousRunner.java:696)
02:35:05,552 [C3P0PooledConnectionPoolManager[identityToken->1hgf8ua9p12f83rzxtl442|4867d7ab]-HelperThread-#0] WARN com.mchange.v2.resourcepool.BasicResourcePool - Having failed to acquire a resource, com.mchange.v2.resourcepool.BasicResourcePool@48500ea6 is interrupting all Threads waiting on a resource to check out. Will try again in response to new client requests.
02:35:05,553 [localhost-startStop-1] ERROR org.flowable.engine.common.AbstractEngineConfiguration - Exception while initializing Database connection
java.sql.SQLException: Connections could not be acquired from the underlying database!
at com.mchange.v2.sql.SqlUtils.toSQLException(SqlUtils.java:118)
at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool.checkoutPooledConnection(C3P0PooledConnectionPool.java:692)
at com.mchange.v2.c3p0.impl.AbstractPoolBackedDataSource.getConnection(AbstractPoolBackedDataSource.java:140)
at org.springframework.jdbc.datasource.DataSourceUtils.doGetConnection(DataSourceUtils.java:111)
at org.springframework.jdbc.datasource.TransactionAwareDataSourceProxy$TransactionAwareInvocationHandler.invoke(TransactionAwareDataSourceProxy.java:225)
at com.sun.proxy.$Proxy219.getMetaData(Unknown Source)
at org.flowable.engine.common.AbstractEngineConfiguration.initDatabaseType(AbstractEngineConfiguration.java:320)
at org.flowable.engine.impl.cfg.ProcessEngineConfigurationImpl.initDatabaseType(ProcessEngineConfigurationImpl.java:1014)
at org.flowable.engine.common.AbstractEngineConfiguration.initDataSource(AbstractEngineConfiguration.java:312)
at org.flowable.engine.impl.cfg.ProcessEngineConfigurationImpl.init(ProcessEngineConfigurationImpl.java:865)
at org.flowable.engine.impl.cfg.ProcessEngineConfigurationImpl.buildProcessEngine(ProcessEngineConfigurationImpl.java:832)
at org.flowable.spring.SpringProcessEngineConfiguration.buildProcessEngine(SpringProcessEngineConfiguration.java:68)
at org.flowable.spring.ProcessEngineFactoryBean.getObject(ProcessEngineFactoryBean.java:57)
at org.flowable.spring.ProcessEngineFactoryBean.getObject(ProcessEngineFactoryBean.java:32)
at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.doGetObjectFromFactoryBean(FactoryBeanRegistrySupport.java:168)
at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.getObjectFromFactoryBean(FactoryBeanRegistrySupport.java:103)
at org.springframework.beans.factory.support.AbstractBeanFactory.getObjectForBeanInstance(AbstractBeanFactory.java:1634)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:254)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)
at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor$2.intercept(ConfigurationClassEnhancer.java:558)
at org.flowable.spring.ProcessEngineFactoryBean$$EnhancerBySpringCGLIB$$da38e03d.getObject()
at org.flowable.app.conf.FlowableEngineConfiguration.processEngine(FlowableEngineConfiguration.java:98)
at org.flowable.app.conf.FlowableEngineConfiguration.repositoryService(FlowableEngineConfiguration.java:217)
at org.flowable.app.conf.FlowableEngineConfiguration$$EnhancerBySpringCGLIB$$c619660a.CGLIB$repositoryService$0()
at org.flowable.app.conf.FlowableEngineConfiguration$$EnhancerBySpringCGLIB$$c619660a$$FastClassBySpringCGLIB$$860e3a1a.invoke()
at org.springframework.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:228)
at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:358)
at org.flowable.app.conf.FlowableEngineConfiguration$$EnhancerBySpringCGLIB$$c619660a.repositoryService()
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:162)
at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:588)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1173)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1067)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:513)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:483)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202)
at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:208)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1138)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1066)
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:585)
at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:88)
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:366)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1264)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:553)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:483)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:761)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:867)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:543)
at org.flowable.app.servlet.WebConfigurer.contextInitialized(WebConfigurer.java:63)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4745)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5207)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:752)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:728)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:734)
at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:988)
at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1860)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
Caused by: com.mchange.v2.resourcepool.CannotAcquireResourceException: A ResourcePool could not acquire a resource from its primary factory or source.
at com.mchange.v2.resourcepool.BasicResourcePool.awaitAvailable(BasicResourcePool.java:1469)
at com.mchange.v2.resourcepool.BasicResourcePool.prelimCheckoutResource(BasicResourcePool.java:644)
at com.mchange.v2.resourcepool.BasicResourcePool.checkoutResource(BasicResourcePool.java:554)
at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool.checkoutAndMarkConnectionInUse(C3P0PooledConnectionPool.java:758)
at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool.checkoutPooledConnection(C3P0PooledConnectionPool.java:685)
… 70 more
Caused by: java.lang.NullPointerException: tuples must be non-null
at org.postgresql.jdbc.PgResultSet.(PgResultSet.java:144)
at org.postgresql.jdbc.PgStatement.createResultSet(PgStatement.java:158)
at org.postgresql.jdbc.PgStatement$StatementResultHandler.handleResultRows(PgStatement.java:210)
at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2034)
at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:288)
at org.postgresql.jdbc.PgStatement.executeInternal(PgStatement.java:430)
at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:356)
at org.postgresql.jdbc.PgStatement.executeWithFlags(PgStatement.java:303)
at org.postgresql.jdbc.PgStatement.executeCachedSql(PgStatement.java:289)
at org.postgresql.jdbc.PgStatement.executeWithFlags(PgStatement.java:266)
at org.postgresql.jdbc.PgConnection.execSQLUpdate(PgConnection.java:477)
at org.postgresql.jdbc.PgConnection.getTransactionIsolation(PgConnection.java:847)
at com.mchange.v2.c3p0.impl.NewPooledConnection.(NewPooledConnection.java:120)
at com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(WrapperConnectionPoolDataSource.java:240)
at com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(WrapperConnectionPoolDataSource.java:206)
at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool$1PooledConnectionResourcePoolManager.acquireResource(C3P0PooledConnectionPool.java:203)
at com.mchange.v2.resourcepool.BasicResourcePool.doAcquire(BasicResourcePool.java:1138)
at com.mchange.v2.resourcepool.BasicResourcePool.doAcquireAndDecrementPendingAcquiresWithinLockOnSuccess(BasicResourcePool.java:1125)
at com.mchange.v2.resourcepool.BasicResourcePool.access$700(BasicResourcePool.java:44)
at com.mchange.v2.resourcepool.BasicResourcePool$ScatteredAcquireTask.run(BasicResourcePool.java:1870)
at com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread.run(ThreadPoolAsynchronousRunner.java:696)

That is really odd, this is the configuration for the connection pool for the task app: https://github.com/flowable/flowable-engine/blob/master/modules/flowable-ui-task/flowable-ui-task-conf/src/main/java/org/flowable/app/conf/DatabaseConfiguration.java#L67

as you can see, it should be 10 by default, and max 100 under a high load.

There is logging when booting up:

LOGGER.info(“Configuring Datasource with following properties (omitted password for security)”);
LOGGER.info(“datasource driver : {}”, dataSourceDriver);
LOGGER.info(“datasource url : {}”, dataSourceUrl);
LOGGER.info(“datasource user name : {}”, dataSourceUsername);
LOGGER.info(“Min pool size | Max pool size | acquire increment : {} | {} | {}”, minPoolSize, maxPoolSize, acquireIncrement);

What do you see in those logs for the pool settings?

Joram,

yes it is strange.

Below is part of the flowable-ui-app.properties file for the Task application. In there you can see I set ‘datasource.max-pool-size’ to 150. I did so on purposes after running into the issue I described before, to see what kind of effect it would have. The end result is still the same. When the Task application starts, it looks like it tries to allocate several DB connections at the time, and it will keep doing that, until it fails. It almost looks like it requests the connections in small batches, until failure :

security.rememberme.key=testkey

DATABASE

#datasource.driver=org.h2.Driver
#datasource.url=jdbc:h2:mem:flowable;DB_CLOSE_DELAY=-1

#datasource.driver=com.mysql.jdbc.Driver
#datasource.url=jdbc:mysql://127.0.0.1:3306/flowable?characterEncoding=UTF-8

datasource.driver=org.postgresql.Driver
datasource.url=jdbc:postgresql://localhost:5432/flowable

#datasource.driver=com.microsoft.sqlserver.jdbc.SQLServerDriver
#datasource.url=jdbc:sqlserver://localhost:1433;databaseName=flowablea

#datasource.driver=oracle.jdbc.driver.OracleDriver
#datasource.url=jdbc:oracle:thin:@localhost:1521:FLOWABLE

#datasource.driver=com.ibm.db2.jcc.DB2Driver
#datasource.url=jdbc:db2://localhost:50000/flowable

datasource.username=flowable
datasource.password=flowable

JNDI CONFIG

If uncommented, the datasource will be looked up using the configured JNDI name.

This will have preference over any datasource configuration done below that doesn’t use JNDI

Eg for JBoss: java:jboss/datasources/flowableDS

#datasource.jndi.name=jdbc/flowableDS

Set whether the lookup occurs in a J2EE container, i.e. if the prefix “java:comp/env/” needs to be added if the JNDI

name doesn’t already contain it. Default is “true”.

#datasource.jndi.resourceRef=true

Connection pool (see http://www.mchange.com/projects/c3p0/#configuration)

#datasource.min-pool-size=5
datasource.max-pool-size=150
#datasource.acquire-increment=5

test query for H2, MySQL, PostgreSQL and Microsoft SQL Server

#datasource.preferred-test-query=select 1

test query for Oracle

#datasource.preferred-test-query=SELECT 1 FROM DUAL

test query for DB2

#datasource.preferred-test-query=SELECT current date FROM sysibm.sysdummy1
#datasource.test-connection-on-checkin=true
#datasource.test-connection-on-checkout=true
#datasource.max-idle-time=1800
#datasource.max-idle-time-excess-connections=1800

.

Below is the output of the startup. As you can see, it does read the properties file correctly, as the pool setting of 150 does show up in here :

list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
03:13:28,407 [localhost-startStop-1] INFO org.flowable.app.conf.AsyncConfiguration - Creating Async Task Executor
03:13:28,677 [localhost-startStop-1] INFO org.flowable.app.conf.DatabaseConfiguration - Configuring Datasource
03:13:28,833 [localhost-startStop-1] INFO org.flowable.app.conf.DatabaseConfiguration - Configuring Datasource with following properties (omitted password for security)
03:13:28,835 [localhost-startStop-1] INFO org.flowable.app.conf.DatabaseConfiguration - datasource driver : org.postgresql.Driver
03:13:28,835 [localhost-startStop-1] INFO org.flowable.app.conf.DatabaseConfiguration - datasource url : jdbc:postgresql://localhost:5432/flowable
03:13:28,836 [localhost-startStop-1] INFO org.flowable.app.conf.DatabaseConfiguration - datasource user name : flowable
03:13:28,836 [localhost-startStop-1] INFO org.flowable.app.conf.DatabaseConfiguration - Min pool size | Max pool size | acquire increment : 10 | 150 | 5
03:13:28,924 [MLog-Init-Reporter] INFO com.mchange.v2.log.MLog - MLog clients using slf4j logging.
03:13:28,937 [localhost-startStop-1] INFO com.mchange.v2.c3p0.C3P0Registry - Initializing c3p0-0.9.5.2 [built 08-December-2015 22:06:04 -0800; debug? true; trace: 10]
03:13:28,938 [localhost-startStop-1] WARN com.mchange.v2.c3p0.management.ActiveManagementCoordinator - A C3P0Registry mbean is already registered. This probably means that an application using c3p0 was undeployed, but not all PooledDataSources were closed prior to undeployment. This may lead to resource leaks over time. Please take care to close all PooledDataSources.
03:13:30,755 [localhost-startStop-1] INFO org.flowable.engine.impl.cfg.ProcessEngineConfigurationImpl - Found 3 Process Engine Configurators in total:
03:13:30,755 [localhost-startStop-1] INFO org.flowable.engine.impl.cfg.ProcessEngineConfigurationImpl - class org.flowable.dmn.spring.configurator.SpringDmnEngineConfigurator (priority:200000)
03:13:30,755 [localhost-startStop-1] INFO org.flowable.engine.impl.cfg.ProcessEngineConfigurationImpl - class org.flowable.form.spring.configurator.SpringFormEngineConfigurator (priority:300000)
03:13:30,755 [localhost-startStop-1] INFO org.flowable.engine.impl.cfg.ProcessEngineConfigurationImpl - class org.flowable.content.spring.configurator.SpringContentEngineConfigurator (priority:400000)
03:13:30,755 [localhost-startStop-1] INFO org.flowable.engine.impl.cfg.ProcessEngineConfigurationImpl - Executing beforeInit() of class org.flowable.dmn.spring.configurator.SpringDmnEngineConfigurator (priority:200000)
03:13:30,794 [localhost-startStop-1] INFO org.flowable.engine.impl.cfg.ProcessEngineConfigurationImpl - Executing beforeInit() of class org.flowable.form.spring.configurator.SpringFormEngineConfigurator (priority:300000)
03:13:30,800 [localhost-startStop-1] INFO org.flowable.engine.impl.cfg.ProcessEngineConfigurationImpl - Executing beforeInit() of class org.flowable.content.spring.configurator.SpringContentEngineConfigurator (priority:400000)
03:13:30,837 [localhost-startStop-1] INFO com.mchange.v2.c3p0.impl.AbstractPoolBackedDataSource - Initializing c3p0 pool… com.mchange.v2.c3p0.ComboPooledDataSource [ acquireIncrement -> 5, acquireRetryAttempts -> 30, acquireRetryDelay -> 1000, autoCommitOnClose -> false, automaticTestTable -> null, breakAfterAcquireFailure -> false, checkoutTimeout -> 0, connectionCustomizerClassName -> null, connectionTesterClassName -> com.mchange.v2.c3p0.impl.DefaultConnectionTester, contextClassLoaderSource -> caller, dataSourceName -> 1hgf8ua9p15bhv8hgzshm1|1fea7083, debugUnreturnedConnectionStackTraces -> false, description -> null, driverClass -> org.postgresql.Driver, extensions -> {}, factoryClassLocation -> null, forceIgnoreUnresolvedTransactions -> false, forceSynchronousCheckins -> false, forceUseNamedDriverClass -> false, identityToken -> 1hgf8ua9p15bhv8hgzshm1|1fea7083, idleConnectionTestPeriod -> 0, initialPoolSize -> 3, jdbcUrl -> jdbc:postgresql://localhost:5432/flowable, maxAdministrativeTaskTime -> 0, maxConnectionAge -> 0, maxIdleTime -> 1800, maxIdleTimeExcessConnections -> 1800, maxPoolSize -> 150, maxStatements -> 0, maxStatementsPerConnection -> 0, minPoolSize -> 10, numHelperThreads -> 3, preferredTestQuery -> null, privilegeSpawnedThreads -> false, properties -> {user=******, password=******}, propertyCycle -> 0, statementCacheNumDeferredCloseThreads -> 0, testConnectionOnCheckin -> true, testConnectionOnCheckout -> true, unreturnedConnectionTimeout -> 0, userOverrides -> {}, usesTraditionalReflectiveProxies -> false ]
03:13:30,847 [localhost-startStop-1] WARN com.mchange.v2.resourcepool.BasicResourcePool - Bad pool size config, start 3 < min 10. Using 10 as start.

After this message, it will sit for a few minutes (this is when it is requesting the DB connections in a loop), and ultimately it will fail with the message I have posted earlier in this thread …

Sadly, no luck here in reproducing:

  1. downloaded latest zip from flowable.org

  2. unzipped, put all war files in/webapps of a fresh Tomcat

  3. Added flowable-ui-app.properties with following content to /lib of Tomcat:

    datasource.driver=org.postgresql.Driver
    datasource.url=jdbc:postgresql://localhost:5432/flowable
    datasource.username=flowable
    datasource.password=flowable

  4. Booted up Tomcat

  5. added postgres driver to /lib

I kept an eye out for the number of connections in postgres, but it keeps steady around 35 for me. I tried adding some processes with timers, but it kept stable and I’m seeing a few hundred process instances being started.

So I’m not sure what is going on your system :frowning:
What postgres version are you running? What database driver?
If you could, could you try and swap it with a mysql and see what happens there?

The exact same things happen when I follow your steps 1 -5.
I started out with a brand new installation, and followed your steps. When I start Tomcat, every application starts, except Task, and it gives me the exact same error as before.

I am running Postgres 9.5 AS and the driver is version 42.1.3.jre7

Joram,

I changed to Postgres 9.6 with the same driver and am able to get everything started …however, now I have the same issue I had before and that is when I try to login to IDM, Admin, Task etc, it always tells me the username / password is incorrect. The screen show up, but it just will not let me in at all …?

To add to this, here is some more info :

I noticed that the default IDM flowable-ui-app.properties file contains the credentials for the admin user. I added those to the file in the Tomcat/lib folder, but that does not seem to have any effect.
I also noticed that the admin user account did NOT exist in the act_id_user table, so I manually added it, but again, it did not solve the issue, even after restarting everything.

Looking at the ‘developer tool’ output in the browser, I just end up with a 401 error. To me it seems that the application does not ‘know’ about any users at all, thus is fails to let me in.

Any ideas ?

Did you add a flowable-ui-app.properties in tomcat lib? All apps will look for that one file (you don’t need multiple ones) and use those settings.

Yes I did indeed do that. So every app indeed starts up fine, however I just cannot login to any of them at all with the default credentials (admin/test.).
The default flowable-ui-app.properties files for each app are still at their default location, but I have not touched them at all, since it will use the one in the /lib folder anyway.

Not sure what’s going wrong in your setup, I’m afraid :s. I retested it here with a mysql and all wars one one tomcat, and it works out of the box. I did have a user in de database … so maybe something went wrong during the setup? It probably needs a group and/or privileges too to be a fully enabled user.

That is what I thought too, so the user has ‘all privileges’ for the DB. I got it to work using separate databases for each application, using the same user however, and granting all privileges to that user, but as soon as I combine everything into one DB, I end up with this failure …