Exception in thread "main" org.h2.jdbc.JdbcSQLException: IO Exception: null


#1

I met the following error when “docker-compose up”.( build docker images success )

datasourcemanager_1  | Exception in thread "main" org.h2.jdbc.JdbcSQLException: IO Exception: null [90028-192]
datasourcemanager_1  | 	at org.h2.message.DbException.getJdbcSQLException(DbException.java:345)
datasourcemanager_1  | 	at org.h2.message.DbException.get(DbException.java:168)
datasourcemanager_1  | 	at org.h2.mvstore.db.MVTableEngine$Store.convertIllegalStateException(MVTableEngine.java:191)
datasourcemanager_1  | 	at org.h2.mvstore.db.MVTableEngine$Store.open(MVTableEngine.java:167)
datasourcemanager_1  | 	at org.h2.mvstore.db.MVTableEngine.init(MVTableEngine.java:99)
datasourcemanager_1  | 	at org.h2.engine.Database.getPageStore(Database.java:2463)
datasourcemanager_1  | 	at org.h2.engine.Database.open(Database.java:692)
datasourcemanager_1  | 	at org.h2.engine.Database.openDatabase(Database.java:270)
datasourcemanager_1  | 	at org.h2.engine.Database.<init>(Database.java:264)
datasourcemanager_1  | 	at org.h2.engine.Engine.openSession(Engine.java:64)
datasourcemanager_1  | 	at org.h2.engine.Engine.openSession(Engine.java:176)
datasourcemanager_1  | 	at org.h2.engine.Engine.createSessionAndValidate(Engine.java:154)
datasourcemanager_1  | 	at org.h2.engine.Engine.createSession(Engine.java:137)
datasourcemanager_1  | 	at org.h2.server.TcpServerThread.run(TcpServerThread.java:148)
datasourcemanager_1  | 	at java.lang.Thread.run(Thread.java:745)
datasourcemanager_1  | Caused by: java.lang.IllegalStateException: Could not open file nio:/opt/h2-data/datasourcemanager.mv.db [1.4.192/1]
datasourcemanager_1  | 	at org.h2.mvstore.DataUtils.newIllegalStateException(DataUtils.java:773)
datasourcemanager_1  | 	at org.h2.mvstore.FileStore.open(FileStore.java:178)
datasourcemanager_1  | 	at org.h2.mvstore.MVStore.<init>(MVStore.java:344)
datasourcemanager_1  | 	at org.h2.mvstore.MVStore$Builder.open(MVStore.java:2893)
datasourcemanager_1  | 	at org.h2.mvstore.db.MVTableEngine$Store.open(MVTableEngine.java:154)
datasourcemanager_1  | 	... 11 more
datasourcemanager_1  | Caused by: java.io.FileNotFoundException: /opt/h2-data/datasourcemanager.mv.db (Permission denied)
datasourcemanager_1  | 	at java.io.RandomAccessFile.open0(Native Method)
datasourcemanager_1  | 	at java.io.RandomAccessFile.open(RandomAccessFile.java:316)
datasourcemanager_1  | 	at java.io.RandomAccessFile.<init>(RandomAccessFile.java:243)
datasourcemanager_1  | 	at java.io.RandomAccessFile.<init>(RandomAccessFile.java:124)
datasourcemanager_1  | 	at org.h2.store.fs.FileNio.<init>(FilePathNio.java:43)
datasourcemanager_1  | 	at org.h2.store.fs.FilePathNio.open(FilePathNio.java:23)
datasourcemanager_1  | 	at org.h2.mvstore.FileStore.open(FileStore.java:153)
datasourcemanager_1  | 	... 14 more
datasourcemanager_1  | 
datasourcemanager_1  | 	at org.h2.engine.SessionRemote.done(SessionRemote.java:624)
datasourcemanager_1  | 	at org.h2.engine.SessionRemote.initTransfer(SessionRemote.java:143)
datasourcemanager_1  | 	at org.h2.engine.SessionRemote.connectServer(SessionRemote.java:448)
datasourcemanager_1  | 	at org.h2.engine.SessionRemote.connectEmbeddedOrServer(SessionRemote.java:329)
datasourcemanager_1  | 	at org.h2.jdbc.JdbcConnection.<init>(JdbcConnection.java:107)
datasourcemanager_1  | 	at org.h2.jdbc.JdbcConnection.<init>(JdbcConnection.java:91)
datasourcemanager_1  | 	at org.h2.Driver.connect(Driver.java:72)
datasourcemanager_1  | 	at slick.jdbc.DriverDataSource.getConnection(DriverDataSource.scala:98)
datasourcemanager_1  | 	at slick.jdbc.DataSourceJdbcDataSource.createConnection(JdbcDataSource.scala:64)
datasourcemanager_1  | 	at slick.jdbc.JdbcBackend$BaseSession.conn$lzycompute(JdbcBackend.scala:415)
datasourcemanager_1  | 	at slick.jdbc.JdbcBackend$BaseSession.conn(JdbcBackend.scala:414)
datasourcemanager_1  | 	at slick.jdbc.JdbcBackend$SessionDef$class.force(JdbcBackend.scala:374)
datasourcemanager_1  | 	at slick.jdbc.JdbcBackend$BaseSession.force(JdbcBackend.scala:407)
datasourcemanager_1  | 	at ai.deepsense.seahorse.datasource.db.Database$.forceInitialization(Database.scala:35)
datasourcemanager_1  | 	at ai.deepsense.seahorse.datasource.server.JettyMain$.start(JettyMain.scala:30)
datasourcemanager_1  | 	at ai.deepsense.seahorse.datasource.server.JettyMain$.main(JettyMain.scala:27)
datasourcemanager_1  | 	at ai.deepsense.seahorse.datasource.server.JettyMain.main(JettyMain.scala)

#2

Problem solved. execute setenforce 0 close selinux and startup success.