Connection to primary data sources

Hi,

We made a migration of the database and we made the required changes on appian-ds .

And the Jboss has deployed successfully but now we are having errors like:

-ERROR org.hibernate.util.JDBCExceptionReporter - Closed Connection

- ERROR org.hibernate.transaction.JDBCTransaction - JDBC rollback failed java.sql.SQLRecoverableException: Closed Connection

- FATAL: The primary datasource cannot be reached. Access to the primary datasource is required. The Appian application will fail to deploy. Details: could not execute query In attach appian-ds and server.log This team is impacting all the persists in database

Note: The database services are running OK!

<?xml version="1.0" encoding="UTF-8"?>
<datasources
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xsi:noNamespaceSchemaLocation="http://www.jboss.org/ironjacamar/schema/datasources_1_0.xsd">
  <!-- Primary Datasource -->
  <xa-datasource
	  jndi-name="java:/jdbc/PrimaryDS"
	  pool-name="MyDS"
	  enabled="true"
	  use-java-context="true">
	<xa-datasource-property name="URL">jdbc:oracle:thin:@srvdbsprd-scan:1521/APNPRD</xa-datasource-property>
	<xa-datasource-class>oracle.jdbc.xa.client.OracleXADataSource</xa-datasource-class>
	<driver>oracle.jdbc</driver>
	<security>
	  <security-domain>ds-name-security-primary</security-domain>
	</security>
	<transaction-isolation>TRANSACTION_READ_COMMITTED</transaction-isolation>
	<xa-pool>
	  <min-pool-size>5</min-pool-size>
	  <max-pool-size>100</max-pool-size>
	</xa-pool>
	<timeout>
	  <blocking-timeout-millis>5000</blocking-timeout-millis>
	  <idle-timeout-minutes>5</idle-timeout-minutes>
	</timeout>
  </xa-datasource>
  
  <!-- Secondary Datasource -->
  <xa-datasource
	  jndi-name="java:/jdbc/OracleDS"
	  pool-name="MyDS2"
	  enabled="true"
	  use-java-context="true">
	<xa-datasource-property name="URL">jdbc:oracle:thin:@srvdbsprd-scan:1521/APNPRD</xa-datasource-property>
	<xa-datasource-class>oracle.jdbc.xa.client.OracleXADataSource</xa-datasource-class>
	<driver>oracle.jdbc</driver>
	<security>
	  <security-domain>ds-name-security-business</security-domain>
	</security>
	<transaction-isolation>TRANSACTION_READ_COMMITTED</transaction-isolation>
	<xa-pool>
	  <min-pool-size>5</min-pool-size>
	  <max-pool-size>100</max-pool-size>
	</xa-pool>
	<timeout>
	  <blocking-timeout-millis>5000</blocking-timeout-millis>
	  <idle-timeout-minutes>5</idle-timeout-minutes>
	</timeout>
  </xa-datasource>
</datasources>

 

11:35:19,416 INFO [stdout] (Appian Timer - 1) 2018-06-04 11:35:19,416 [Appian Timer - 1] ERROR org.hibernate.util.JDBCExceptionReporter - Closed Connection
11:35:19,417 INFO [stdout] (Appian Timer - 1) 2018-06-04 11:35:19,417 [Appian Timer - 1] ERROR org.hibernate.transaction.JDBCTransaction - JDBC rollback failed
11:35:19,417 INFO [stdout] (Appian Timer - 1) java.sql.SQLRecoverableException: Closed Connection
11:35:19,417 INFO [stdout] (Appian Timer - 1) at oracle.jdbc.driver.PhysicalConnection.rollback(PhysicalConnection.java:3694)
11:35:19,417 INFO [stdout] (Appian Timer - 1) at oracle.jdbc.OracleConnectionWrapper.rollback(OracleConnectionWrapper.java:145)
11:35:19,417 INFO [stdout] (Appian Timer - 1) at org.jboss.jca.adapters.jdbc.BaseWrapperManagedConnection.jdbcRollback(BaseWrapperManagedConnection.java:1117)
11:35:19,417 INFO [stdout] (Appian Timer - 1) at org.jboss.jca.adapters.jdbc.WrappedConnection.rollback(WrappedConnection.java:779)
11:35:19,417 INFO [stdout] (Appian Timer - 1) at org.hibernate.transaction.JDBCTransaction.rollbackAndResetAutoCommit(JDBCTransaction.java:213)
11:35:19,417 INFO [stdout] (Appian Timer - 1) at org.hibernate.transaction.JDBCTransaction.rollback(JDBCTransaction.java:192)
11:35:19,417 INFO [stdout] (Appian Timer - 1) at org.hibernate.ejb.TransactionImpl.rollback(TransactionImpl.java:107)
11:35:19,418 INFO [stdout] (Appian Timer - 1) at org.springframework.orm.jpa.JpaTransactionManager.doRollback(JpaTransactionManager.java:539)
11:35:19,418 INFO [stdout] (Appian Timer - 1) at org.springframework.transaction.support.AbstractPlatformTransactionManager.processRollback(AbstractPlatformTransactionManager.java:845)
11:35:19,418 INFO [stdout] (Appian Timer - 1) at org.springframework.transaction.support.AbstractPlatformTransactionManager.rollback(AbstractPlatformTransactionManager.java:822)
11:35:19,418 INFO [stdout] (Appian Timer - 1) at org.springframework.transaction.interceptor.TransactionAspectSupport.completeTransactionAfterThrowing(TransactionAspectSupport.java:405)
11:35:19,418 INFO [stdout] (Appian Timer - 1) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:114)
11:35:19,418 INFO [stdout] (Appian Timer - 1) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
11:35:19,418 INFO [stdout] (Appian Timer - 1) at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:90)
11:35:19,418 INFO [stdout] (Appian Timer - 1) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
11:35:19,418 INFO [stdout] (Appian Timer - 1) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
11:35:19,418 INFO [stdout] (Appian Timer - 1) at com.sun.proxy.$Proxy143.getRecordTypeStats(Unknown Source)
11:35:19,418 INFO [stdout] (Appian Timer - 1) at com.appiancorp.common.monitoring.AggregatedDataTimer$1.run(AggregatedDataTimer.java:183)
11:35:19,418 INFO [stdout] (Appian Timer - 1) at com.appiancorp.security.auth.SpringSecurityContextHelper.runAsAdmin(SpringSecurityContextHelper.java:105)
11:35:19,418 INFO [stdout] (Appian Timer - 1) at com.appiancorp.common.monitoring.AggregatedDataTimer.timeout(AggregatedDataTimer.java:179)
11:35:19,418 INFO [stdout] (Appian Timer - 1) at com.appiancorp.core.timer.AppianTimerSystem.run(AppianTimerSystem.java:59)
11:35:19,419 INFO [stdout] (Appian Timer - 1) 2018-06-04 11:35:19,419 [Appian Timer - 1] ERROR org.springframework.transaction.interceptor.TransactionInterceptor - Application exception overridden by rollback exception
11:35:19,419 INFO [stdout] (Appian Timer - 1) com.appiancorp.suiteapi.common.exceptions.AppianException: FATAL: The primary datasource cannot be reached. Access to the primary datasource is required. The Appian application will fail to deploy. Details: could not execute query (APNX-1-4179-002)
11:35:19,419 INFO [stdout] (Appian Timer - 1) at com.appiancorp.suiteapi.common.exceptions.AppianRuntimeException.<init>(AppianRuntimeException.java:52)
11:35:19,419 INFO [stdout] (Appian Timer - 1) at com.appiancorp.rdbms.common.DataSourceConnectionException.<init>(DataSourceConnectionException.java:25)
11:35:19,420 INFO [stdout] (Appian Timer - 1) at com.appiancorp.rdbms.hb.DataSourceManagerHbImpl.handleConnectionErrors(DataSourceManagerHbImpl.java:879)
11:35:19,420 INFO [stdout] (Appian Timer - 1) at com.appiancorp.rdbms.hb.DataSourceManagerHbImpl.access$400(DataSourceManagerHbImpl.java:94)
11:35:19,420 INFO [stdout] (Appian Timer - 1) at com.appiancorp.rdbms.hb.DataSourceManagerHbImpl$DaoInvocationHandler.invoke(DataSourceManagerHbImpl.java:324)
11:35:19,420 INFO [stdout] (Appian Timer - 1) at com.sun.proxy.$Proxy120.getRecordTypeStats(Unknown Source)

  Discussion posts and replies are publicly visible

Parents Reply
  • Not sure which version of Appian you are using.
    But looking at the error logs you shared and the Appian documentation
    docs.appian.com/.../Configuring_Relational_Databases.html

    You have below error in the log which indicate the configuration problem or DB server is not reachable.

    APNX-1-4179-002
    FATAL: The Appian data source cannot be reached. Access to the Appian data source is required. The Appian application will fail to deploy.

    here is what documentation says --
    The Appian web application will fail to deploy during application server start-up if the Appian data source is not configured in custom.properties or is unreachable due to an error.

    Best to recheck the configuration once as well as check the connectivity from machine on which Appian is installed to the DB server using PING/TELNET.
Children
No Data