Piotr created NIFI-11055:
----------------------------

             Summary: [H2] access to nifi-flow-audit
                 Key: NIFI-11055
                 URL: https://issues.apache.org/jira/browse/NIFI-11055
             Project: Apache NiFi
          Issue Type: Bug
          Components: NiFi Stateless
    Affects Versions: 1.19.1, 1.19.0, 1.18.0
         Environment: software platform
            Reporter: Piotr


After Nifi upgrade from version 1.16.3 to 1.18 and 1.19 we are not able to read 
embeded h2 database nifi-flow-audit. 


In our solution we used embeded h2 in Automatic mix mode (AUTO_SERVER=TRUE in 
nifi.properties)

*# H2 Settings*
*nifi.database.directory=./database_repository*
*nifi.h2.url.append=;LOCK_TIMEOUT=25000;WRITE_DELAY=0;AUTO_SERVER=TRUE*

But now we are receiving below error and nifi don't want start:
*FactoryBean threw exception on object creation; nested exception is 
org.h2.jdbc.JdbcSQLFeatureNotSupportedException: Feature not supported: 
"AUTO_SERVER=TRUE && DB_CLOSE_ON_EXIT=FALSE" [50100-214]*


When we set AUTO_SERVER=FALSE, ** nifi works correctly, but we are not able to 
read data from database, and we are receiving error thath file is locked:



QueryDatabaseTableRecord[id=*] Processing failed: 
org.apache.nifi.processor.exception.ProcessException: java.sql.SQLException: 
Cannot create PoolableConnectionFactory (Database may be already in use: 
"/opt/nifi/nifi-1.19.1/database_repository/nifi-flow-audit.mv.db". Possible 
solutions: close all other connection(s); use the server mode [90020-214])
- Caused by: java.sql.SQLException: Cannot create PoolableConnectionFactory 
(Database may be already in use: 
"/opt/nifi/nifi-1.19.1/database_repository/nifi-flow-audit.mv.db". Possible 
solutions: close all other connection(s); use the server mode [90020-214])
- Caused by: org.h2.jdbc.JdbcSQLNonTransientConnectionException: Database may 
be already in use: 
"/opt/nifi/nifi-1.19.1/database_repository/nifi-flow-audit.mv.db". Possible 
solutions: close all other connection(s); use the server mode [90020-214]
- Caused by: org.h2.mvstore.MVStoreException: The file is locked: 
/opt/nifi/nifi-1.19.1/database_repository/nifi-flow-audit.mv.db [2.1.214/7]
- Caused by: java.nio.channels.OverlappingFileLockException



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to