Background:
We have configured a basic microservices setup for a preview environment. We are able to start all the microservices (session content, preview, discovery, deployer-combined), which are running on a Linux box. We've implemented a very basic topology, to allow one Target Type to use for publishing. We're running all databases on Oracle RAC and we have several content brokers, each corresponding to a different web application, as several sites' content is being managed in the same Tridion CMS instance. Our CD databases are copies of Tridion 2013 SP1 HR1 databases that we've updated to Web 8.5, and we are planning to use the updated broker database for the state store.
Error:
When we attempt to publish something very basic, like a simple component, the publishing package gets placed in the incoming folder, but then we immediately get the following error:
[ERROR] [04/13/2018 17:00:31.882] [ProcessingAkkaSpringContext-akka.actor.default-dispatcher-6] [akka://ProcessingAkkaSpringContext/user/$a] Could not open JPA EntityManager for transaction; nested exception is org.hibernate.exception.GenericJDBCException: Unable to acquire JDBC Connection
org.springframework.transaction.CannotCreateTransactionException: Could not open JPA EntityManager for transaction; nested exception is org.hibernate.exception.GenericJDBCException: Unable to acquire JDBC Connection
at org.springframework.orm.jpa.JpaTransactionManager.doBegin(JpaTransactionManager.java:431)
at org.springframework.transaction.support.AbstractPlatformTransactionManager.getTransaction(AbstractPlatformTransactionManager.java:373)
at org.springframework.transaction.interceptor.TransactionAspectSupport.createTransactionIfNecessary(TransactionAspectSupport.java:430)
at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:276)
at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:96)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:213)
at com.sun.proxy.$Proxy124.setExecutionState(Unknown Source)
at com.sdl.delivery.deployer.engine.pipeline.actor.ExecutionActor.storeStatus(ExecutionActor.scala:75)
at com.sdl.delivery.deployer.engine.pipeline.actor.ExecutionActor$$anonfun$receive$1.applyOrElse(ExecutionActor.scala:52)
at akka.actor.Actor$class.aroundReceive(Actor.scala:480)
at com.sdl.delivery.deployer.engine.pipeline.actor.ExecutionActor.aroundReceive(ExecutionActor.scala:22)
at akka.actor.ActorCell.receiveMessage(ActorCell.scala:526)
at akka.actor.ActorCell.invoke(ActorCell.scala:495)
at akka.dispatch.Mailbox.processMailbox(Mailbox.scala:257)
at akka.dispatch.Mailbox.run(Mailbox.scala:224)
at akka.dispatch.Mailbox.exec(Mailbox.scala:234)
at scala.concurrent.forkjoin.ForkJoinTask.doExec(ForkJoinTask.java:260)
at scala.concurrent.forkjoin.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1339)
at scala.concurrent.forkjoin.ForkJoinPool.runWorker(ForkJoinPool.java:1979)
at scala.concurrent.forkjoin.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:107)
Caused by: org.hibernate.exception.GenericJDBCException: Unable to acquire JDBC Connection
at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:47)
at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:111)
at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:97)
at org.hibernate.resource.jdbc.internal.LogicalConnectionManagedImpl.acquireConnectionIfNeeded(LogicalConnectionManagedImpl.java:102)
at org.hibernate.resource.jdbc.internal.LogicalConnectionManagedImpl.getPhysicalConnection(LogicalConnectionManagedImpl.java:129)
at org.hibernate.resource.jdbc.internal.LogicalConnectionManagedImpl.getConnectionForTransactionManagement(LogicalConnectionManagedImpl.java:247)
at org.hibernate.resource.jdbc.internal.LogicalConnectionManagedImpl.begin(LogicalConnectionManagedImpl.java:254)
at org.hibernate.resource.transaction.backend.jdbc.internal.JdbcResourceLocalTransactionCoordinatorImpl$TransactionDriverControlImpl.begin(JdbcResourceLocalTransactionCoordinatorImpl.java:203)
at org.hibernate.engine.transaction.internal.TransactionImpl.begin(TransactionImpl.java:56)
at org.springframework.orm.jpa.vendor.HibernateJpaDialect.beginTransaction(HibernateJpaDialect.java:189)
at org.springframework.orm.jpa.JpaTransactionManager.doBegin(JpaTransactionManager.java:380)
... 20 more
Caused by: org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (Listener refused the connection with the following error:
ORA-12505, TNS:listener does not currently know of SID given in connect descriptor
)
at org.apache.commons.dbcp.BasicDataSource.createPoolableConnectionFactory(BasicDataSource.java:1549)
at org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1388)
at org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:1044)
at org.hibernate.engine.jdbc.connections.internal.DatasourceConnectionProviderImpl.getConnection(DatasourceConnectionProviderImpl.java:122)
at org.hibernate.internal.NonContextualJdbcConnectionAccess.obtainConnection(NonContextualJdbcConnectionAccess.java:35)
at org.hibernate.resource.jdbc.internal.LogicalConnectionManagedImpl.acquireConnectionIfNeeded(LogicalConnectionManagedImpl.java:99)
... 27 more
Caused by: java.sql.SQLException: Listener refused the connection with the following error:
ORA-12505, TNS:listener does not currently know of SID given in connect descriptor
at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:743)
at oracle.jdbc.driver.PhysicalConnection.connect(PhysicalConnection.java:666)
at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:32)
at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:566)
at org.apache.commons.dbcp.DriverConnectionFactory.createConnection(DriverConnectionFactory.java:38)
at org.apache.commons.dbcp.PoolableConnectionFactory.makeObject(PoolableConnectionFactory.java:582)
at org.apache.commons.dbcp.BasicDataSource.validateConnectionFactory(BasicDataSource.java:1556)
at org.apache.commons.dbcp.BasicDataSource.createPoolableConnectionFactory(BasicDataSource.java:1545)
... 32 more
Caused by: oracle.net.ns.NetException: Listener refused the connection with the following error:
ORA-12505, TNS:listener does not currently know of SID given in connect descriptor
at oracle.net.ns.NSProtocolStream.negotiateConnection(NSProtocolStream.java:275)
at oracle.net.ns.NSProtocol.connect(NSProtocol.java:264)
at oracle.jdbc.driver.T4CConnection.connect(T4CConnection.java:1452)
at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:496)
... 39 more
We suspect the issue is with our deployer-conf.xml. Because we are running Oracle RAC databases, we're not sure how to complete the storages section. We've tried many different combinations, but nothing seems to work:
<State>
<Storage Adapter="oracle" driver="oracle.jdbc.driver.OracleDriver">
<Property Name="host" Value="<our_host>" />
<Property Name="port" Value="<our_port>" />
<Property Name="database" Value="<our_service_name>" />
<Property Name="user" Value="<our_db_user>" />
<Property Name="password" Value="<our_db_password>" />
</Storage>
</State>
It is not clear what these fields should be, since other parts of the documentation say to use "serviceName" instead of "database" for Oracle RAC, etc. And we're wondering whether we need something like here as well:
<Property Name="driverType" Value="thin"/>
<Property Name="networkProtocol" Value="tcp"/>
A few other things to note:
- The CMS is still DXA 1.2, as we have not yet been able to successfully run the upgrade script for DXA 1.7/1.8. But my understanding is that this should not affect publishing.
- The Linux box we're using for the microservices is CentOS. We are aware that the requirement here is Redhat, but we've consulted with several parties that tell us CentOS should be fine for this environment.
- There are one or two other microservices to install, but again, I don't think it should affect publishing (CID, context).
- We haven't run the script to switch from old to newly published statuses. Again, I don't see how this would affect us at this point.
- Our topology uses some stubbed values for the website/web application/mapping, which are not in place yet.