I am trying to do a POC for my Jira application to have a proxy pgpool which allows me to utilise both reader and writer instance of amazon aurora postgres, the final goal is to have all read only transaction to go to reader instance and remaining onto writer instance.
I have configured pgpool with below configuration:
`listen_addresses = '*'
port = 5432
backend_hostname0 = 'writerinstanceclusterendpoint'
backend_port0 = 5432
backend_flag0 = 'ALWAYS_PRIMARY|DISALLOW_TO_FAILOVER'
backend_hostname1 = 'readerinstanceclusterendpoint'
backend_port1 = 5432
backend_flag1 = 'DISALLOW_TO_FAILOVER'
backend_clustering_mode = 'streaming_replication'
enable_pool_hba = On
pool_passwd = ‘pool_passwd’
Ssl = On
replication_mode = Off
load_balance_mode = On
master_slave_mode = On
master_slave_sub_mode = Stream
sr_check_period = 0
max_pool = 350
failover_on_backend_error = Off
health_check_period = 0`
But when I try to start Jira with below dbconfig.xml
`<jira-database-config>
<name>defaultDS</name>
<delegator-name>default</delegator-name>
<database-type>postgres72</database-type>
<schema-name>public</schema-name>
<jdbc-datasource>
<url>jdbc:postgresql://pgpoolIP:5432/jiradb</url>
<driver-class>org.postgresql.Driver</driver-class>
<username>jira</username>
<password>mypass</password>
<pool-min-size>20</pool-min-size>
<pool-max-size>300</pool-max-size>
<pool-max-wait>30000</pool-max-wait>
<pool-max-idle>20</pool-max-idle>
<pool-remove-abandoned>true</pool-remove-abandoned>
<pool-remove-abandoned-timeout>300</pool-remove-abandoned-timeout>
<connection-properties>tcpKeepAlive=true;socketTimeout=240</connection-properties>
<validation-query>select version();</validation-query>
<min-evictable-idle-time-millis>60000</min-evictable-idle-time-millis>
<time-between-eviction-runs-millis>300000</time-between-eviction-runs-millis>
<pool-test-while-idle>true</pool-test-while-idle>
<pool-test-on-borrow>false</pool-test-on-borrow>
<validation-query-timeout>3</validation-query-timeout>
</jdbc-datasource>
</jira-database-config>`
I get below error in the startup logs and I can not start Jira.
`Caused by: org.ofbiz.core.entity.GenericDataSourceException: SQL Exception while executing the following:UPDATE public.clusternode SET NODE_STATE=?, TIMESTAMP=?,IP=?, CACHE_LISTENER_PORT=?, NODE_BUILD_NUMBER=?, NODE_VERSION=? WHERE NODE_ID=? (ERROR: cannot execute UPDATE in a read-only transaction)`
Any help would be appreciated.
Expected result would be that Jira should start and I should see read only traffic on my reader endpoint