部署Thingworx时无法连上Postgres数据库
数据库连接配置:
"PostgresPersistenceProviderPackage": {
"ConnectionInformation": {
"acquireIncrement": 5,
"acquireRetryAttempts": 3,
"acquireRetryDelay": 10000,
"checkoutTimeout": 1000000,
"driverClass": "org.postgresql.Driver",
"fetchSize": 5000,
"idleConnectionTestPeriod": 60,
"initialPoolSize": 5,
"jdbcUrl": "jdbc:postgresql://localhost:5432/thingworx",
"maxConnectionAge": 0,
"maxIdleTime": 0,
"maxIdleTimeExcessConnections": 300,
"maxPoolSize": 100,
"maxStatements": 100,
"minPoolSize": 5,
"numHelperThreads": 8,
"password": "twadmin",
"testConnectionOnCheckout": false,
"unreturnedConnectionTimeout": 0,
"username": "twadmin"
},
日志:
2018-07-24 18:10:55.906+0800 [L: INFO] [O: c.t.s.ThingWorxBootstrapper] [I: ] [U: SuperUser] [S: ] [T: http-nio-80-exec-16] WebApp starting...
2018-07-24 18:10:55.906+0800 [L: WARN] [O: c.t.s.ThingWorxBootstrapper] [I: ] [U: SuperUser] [S: ] [T: http-nio-80-exec-16] Please note. Default character is set to GBK. It should be [UTF-8]. Please use the VM argument [-Dfile.encoding=UTF-8] in your application server startup script
2018-07-24 18:10:56.301+0800 [L: INFO] [O: c.t.s.ThingWorxServer] [I: ] [U: SuperUser] [S: ] [T: http-nio-80-exec-16] HA mode not enabled. Initializing and starting in standalone mode.
2018-07-24 18:10:56.302+0800 [L: INFO] [O: c.t.s.ThingWorxPersistenceHandler] [I: ] [U: SuperUser] [S: ] [T: http-nio-80-exec-16] Default Persistence Provider Name = ThingworxPersistenceProvider
2018-07-24 18:10:56.302+0800 [L: INFO] [O: c.t.s.ThingWorxPersistenceHandler] [I: ] [U: SuperUser] [S: ] [T: http-nio-80-exec-16] Default Persistence Provider Package Name = PostgresPersistenceProviderPackage
2018-07-24 18:10:56.307+0800 [L: INFO] [O: c.t.p.p.PostgresDatasource] [I: ] [U: SuperUser] [S: ] [T: http-nio-80-exec-16] Reading configuration from configTableCol
2018-07-24 18:10:56.435+0800 [L: INFO] [O: c.t.s.ThingWorxServer] [I: ] [U: SuperUser] [S: ] [T: http-nio-80-exec-16] Managers...INITIALIZED
2018-07-24 18:10:56.437+0800 [L: INFO] [O: c.t.s.ThingWorxServer] [I: ] [U: SuperUser] [S: ] [T: http-nio-80-exec-16] Database initialization started...
2018-07-24 18:11:26.740+0800 [L: WARN] [O: c.m.v.r.BasicResourcePool] [I: ] [U: SuperUser] [S: ] [T: C3P0PooledConnectionPoolManager[identityToken->1hge0yt9w1kjel0n10g7zey|4f0a12e6]-HelperThread-#4] com.mchange.v2.resourcepool.BasicResourcePool$ScatteredAcquireTask@d553f34 -- 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 (3). Last acquisition attempt exception:
2018-07-24 18:11:26.740+0800 [L: WARN] [O: c.m.v.r.BasicResourcePool] [I: ] [U: SuperUser] [S: ] [T: C3P0PooledConnectionPoolManager[identityToken->1hge0yt9w1kjel0n10g7zey|4f0a12e6]-HelperThread-#3] com.mchange.v2.resourcepool.BasicResourcePool$ScatteredAcquireTask@45feb462 -- 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 (3). Last acquisition attempt exception:
2018-07-24 18:11:26.742+0800 [L: WARN] [O: c.m.v.r.BasicResourcePool] [I: ] [U: SuperUser] [S: ] [T: C3P0PooledConnectionPoolManager[identityToken->1hge0yt9w1kjel0n10g7zey|4f0a12e6]-HelperThread-#4] Having failed to acquire a resource, com.mchange.v2.resourcepool.BasicResourcePool@68da485 is interrupting all Threads waiting on a resource to check out. Will try again in response to new client requests.
2018-07-24 18:11:26.742+0800 [L: WARN] [O: c.m.v.r.BasicResourcePool] [I: ] [U: SuperUser] [S: ] [T: C3P0PooledConnectionPoolManager[identityToken->1hge0yt9w1kjel0n10g7zey|4f0a12e6]-HelperThread-#3] Having failed to acquire a resource, com.mchange.v2.resourcepool.BasicResourcePool@68da485 is interrupting all Threads waiting on a resource to check out. Will try again in response to new client requests.
2018-07-24 18:11:26.743+0800 [L: WARN] [O: c.m.v.r.BasicResourcePool] [I: ] [U: SuperUser] [S: ] [T: C3P0PooledConnectionPoolManager[identityToken->1hge0yt9w1kjel0n10g7zey|4f0a12e6]-HelperThread-#0] com.mchange.v2.resourcepool.BasicResourcePool$ScatteredAcquireTask@2171d6e7 -- 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 (3). Last acquisition attempt exception:
2018-07-24 18:11:26.743+0800 [L: WARN] [O: c.m.v.r.BasicResourcePool] [I: ] [U: SuperUser] [S: ] [T: C3P0PooledConnectionPoolManager[identityToken->1hge0yt9w1kjel0n10g7zey|4f0a12e6]-HelperThread-#0] Having failed to acquire a resource, com.mchange.v2.resourcepool.BasicResourcePool@68da485 is interrupting all Threads waiting on a resource to check out. Will try again in response to new client requests.
2018-07-24 18:11:26.745+0800 [L: ERROR] [O: c.t.s.ThingWorxServer] [I: ] [U: SuperUser] [S: ] [T: http-nio-80-exec-16] [message: Connections could not be acquired from the underlying database!]
2018-07-24 18:11:26.747+0800 [L: INFO] [O: c.t.p.p.PersistenceProvider] [I: ] [U: SuperUser] [S: ] [T: http-nio-80-exec-16] Connection ThingworxPersistenceProvider, type PostgresPersistenceProviderPackage stopped
2018-07-24 18:11:26.747+0800 [L: WARN] [O: c.t.p.p.PersistenceProvider] [I: ] [U: SuperUser] [S: ] [T: http-nio-80-exec-16] Could not find persistenceProviderPackage PostgresPersistenceProviderPackage and thus could not stop data processing
2018-07-24 18:11:26.749+0800 [L: ERROR] [O: c.t.s.ThingWorxBootstrapper] [I: ] [U: SuperUser] [S: ] [T: http-nio-80-exec-16] [message: Unable to initialize and start system: Connections could not be acquired from the underlying database!]
2018-07-24 18:11:26.749+0800 [L: ERROR] [O: c.t.s.ThingWorxBootstrapper] [I: ] [U: SuperUser] [S: ] [T: http-nio-80-exec-16] *** Web Application STATE is being set to ERROR! ***
2018-07-24 18:11:26.755+0800 [L: WARN] [O: c.m.v.r.BasicResourcePool] [I: ] [U: SuperUser] [S: ] [T: C3P0PooledConnectionPoolManager[identityToken->1hge0yt9w1kjel0n10g7zey|4f0a12e6]-HelperThread-#2] com.mchange.v2.resourcepool.BasicResourcePool$ScatteredAcquireTask@130050d1 -- 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 (3). Last acquisition attempt exception:
2018-07-24 18:11:26.756+0800 [L: WARN] [O: c.m.v.r.BasicResourcePool] [I: ] [U: SuperUser] [S: ] [T: C3P0PooledConnectionPoolManager[identityToken->1hge0yt9w1kjel0n10g7zey|4f0a12e6]-HelperThread-#2] Having failed to acquire a resource, com.mchange.v2.resourcepool.BasicResourcePool@68da485 is interrupting all Threads waiting on a resource to check out. Will try again in response to new client requests.
2018-07-24 18:11:26.775+0800 [L: WARN] [O: c.m.v.r.BasicResourcePool] [I: ] [U: SuperUser] [S: ] [T: C3P0PooledConnectionPoolManager[identityToken->1hge0yt9w1kjel0n10g7zey|4f0a12e6]-HelperThread-#5] com.mchange.v2.resourcepool.BasicResourcePool$ScatteredAcquireTask@3708611a -- 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 (3). Last acquisition attempt exception:
2018-07-24 18:11:26.775+0800 [L: WARN] [O: c.m.v.r.BasicResourcePool] [I: ] [U: SuperUser] [S: ] [T: C3P0PooledConnectionPoolManager[identityToken->1hge0yt9w1kjel0n10g7zey|4f0a12e6]-HelperThread-#5] Having failed to acquire a resource, com.mchange.v2.resourcepool.BasicResourcePool@68da485 is interrupting all Threads waiting on a resource to check out. Will try again in response to new client requests.
2018-07-24 18:12:05.964+0800 [L: ERROR] [O: c.t.s.a.AuthenticationFilter] [I: ] [U: ] [S: ] [T: http-nio-80-exec-32] Could not handle request