diff --git a/hisense_dh.db b/hisense_dh.db index 19266bf..9d241e3 100644 Binary files a/hisense_dh.db and b/hisense_dh.db differ diff --git a/logs/app-error.log.20221118-1 b/logs/app-error.log.20221118-1 deleted file mode 100644 index 8d55c87..0000000 --- a/logs/app-error.log.20221118-1 +++ /dev/null @@ -1,85 +0,0 @@ -2022-11-18 16:16:18,193 ERROR [io.vertx.core.impl.ContextBase]-[vert.x-eventloop-thread-1] Unhandled exception -org.jetbrains.exposed.exceptions.ExposedSQLException: java.sql.SQLException: Query returns results - at org.jetbrains.exposed.sql.statements.Statement.executeIn$exposed_core(Statement.kt:64) ~[exposed-core-0.40.1.jar:?] - at org.jetbrains.exposed.sql.Transaction.exec(Transaction.kt:140) ~[exposed-core-0.40.1.jar:?] - at org.jetbrains.exposed.sql.Transaction.exec(Transaction.kt:126) ~[exposed-core-0.40.1.jar:?] - at org.jetbrains.exposed.sql.Transaction.exec(Transaction.kt:108) ~[exposed-core-0.40.1.jar:?] - at org.jetbrains.exposed.sql.Transaction.exec(Transaction.kt:94) ~[exposed-core-0.40.1.jar:?] - at org.jetbrains.exposed.sql.Transaction.exec$default(Transaction.kt:93) ~[exposed-core-0.40.1.jar:?] - at org.jetbrains.exposed.sql.SchemaUtils.execStatements(SchemaUtils.kt:251) ~[exposed-core-0.40.1.jar:?] - at org.jetbrains.exposed.sql.SchemaUtils.createMissingTablesAndColumns(SchemaUtils.kt:321) ~[exposed-core-0.40.1.jar:?] - at org.jetbrains.exposed.sql.SchemaUtils.createMissingTablesAndColumns$default(SchemaUtils.kt:306) ~[exposed-core-0.40.1.jar:?] - at com.hisense.dahua_video.MainVerticle$exposed$1.invoke(MainVerticle.kt:160) ~[classes/:?] - at com.hisense.dahua_video.MainVerticle$exposed$1.invoke(MainVerticle.kt:157) ~[classes/:?] - at org.jetbrains.exposed.sql.transactions.ThreadLocalTransactionManagerKt.inTopLevelTransaction$run(ThreadLocalTransactionManager.kt:214) ~[exposed-core-0.40.1.jar:?] - at org.jetbrains.exposed.sql.transactions.ThreadLocalTransactionManagerKt.access$inTopLevelTransaction$run(ThreadLocalTransactionManager.kt:1) ~[exposed-core-0.40.1.jar:?] - at org.jetbrains.exposed.sql.transactions.ThreadLocalTransactionManagerKt$inTopLevelTransaction$1.invoke(ThreadLocalTransactionManager.kt:240) ~[exposed-core-0.40.1.jar:?] - at org.jetbrains.exposed.sql.transactions.ThreadLocalTransactionManagerKt.keepAndRestoreTransactionRefAfterRun(ThreadLocalTransactionManager.kt:248) ~[exposed-core-0.40.1.jar:?] - at org.jetbrains.exposed.sql.transactions.ThreadLocalTransactionManagerKt.inTopLevelTransaction(ThreadLocalTransactionManager.kt:239) ~[exposed-core-0.40.1.jar:?] - at org.jetbrains.exposed.sql.transactions.ThreadLocalTransactionManagerKt$transaction$1.invoke(ThreadLocalTransactionManager.kt:189) ~[exposed-core-0.40.1.jar:?] - at org.jetbrains.exposed.sql.transactions.ThreadLocalTransactionManagerKt.keepAndRestoreTransactionRefAfterRun(ThreadLocalTransactionManager.kt:248) ~[exposed-core-0.40.1.jar:?] - at org.jetbrains.exposed.sql.transactions.ThreadLocalTransactionManagerKt.transaction(ThreadLocalTransactionManager.kt:159) ~[exposed-core-0.40.1.jar:?] - at org.jetbrains.exposed.sql.transactions.ThreadLocalTransactionManagerKt.transaction(ThreadLocalTransactionManager.kt:146) ~[exposed-core-0.40.1.jar:?] - at org.jetbrains.exposed.sql.transactions.ThreadLocalTransactionManagerKt.transaction$default(ThreadLocalTransactionManager.kt:145) ~[exposed-core-0.40.1.jar:?] - at com.hisense.dahua_video.MainVerticle.exposed(MainVerticle.kt:157) ~[classes/:?] - at com.hisense.dahua_video.MainVerticle.start$lambda$4(MainVerticle.kt:51) ~[classes/:?] - at io.vertx.core.impl.future.FutureImpl$3.onSuccess(FutureImpl.java:141) ~[vertx-core-4.3.4.jar:4.3.4] - at io.vertx.core.impl.future.FutureImpl$ListenerArray.onSuccess(FutureImpl.java:262) ~[vertx-core-4.3.4.jar:4.3.4] - at io.vertx.core.impl.future.FutureBase.emitSuccess(FutureBase.java:60) ~[vertx-core-4.3.4.jar:4.3.4] - at io.vertx.core.impl.future.FutureImpl.tryComplete(FutureImpl.java:211) ~[vertx-core-4.3.4.jar:4.3.4] - at io.vertx.core.impl.future.Mapping.onSuccess(Mapping.java:40) ~[vertx-core-4.3.4.jar:4.3.4] - at io.vertx.core.impl.future.FutureBase.emitSuccess(FutureBase.java:60) ~[vertx-core-4.3.4.jar:4.3.4] - at io.vertx.core.impl.future.FutureImpl.tryComplete(FutureImpl.java:211) ~[vertx-core-4.3.4.jar:4.3.4] - at io.vertx.core.impl.future.Mapping.onSuccess(Mapping.java:40) ~[vertx-core-4.3.4.jar:4.3.4] - at io.vertx.core.impl.future.FutureBase.emitSuccess(FutureBase.java:60) ~[vertx-core-4.3.4.jar:4.3.4] - at io.vertx.core.impl.future.FutureImpl.tryComplete(FutureImpl.java:211) ~[vertx-core-4.3.4.jar:4.3.4] - at io.vertx.core.impl.future.CompositeFutureImpl.trySucceed(CompositeFutureImpl.java:163) ~[vertx-core-4.3.4.jar:4.3.4] - at io.vertx.core.impl.future.CompositeFutureImpl.lambda$all$0(CompositeFutureImpl.java:38) ~[vertx-core-4.3.4.jar:4.3.4] - at io.vertx.core.impl.future.FutureImpl$3.onSuccess(FutureImpl.java:141) ~[vertx-core-4.3.4.jar:4.3.4] - at io.vertx.core.impl.future.FutureBase.emitSuccess(FutureBase.java:60) ~[vertx-core-4.3.4.jar:4.3.4] - at io.vertx.core.impl.future.FutureImpl.tryComplete(FutureImpl.java:211) ~[vertx-core-4.3.4.jar:4.3.4] - at io.vertx.core.impl.future.Composition$1.onSuccess(Composition.java:62) ~[vertx-core-4.3.4.jar:4.3.4] - at io.vertx.core.impl.future.FutureBase.emitSuccess(FutureBase.java:60) ~[vertx-core-4.3.4.jar:4.3.4] - at io.vertx.core.impl.future.SucceededFuture.addListener(SucceededFuture.java:88) ~[vertx-core-4.3.4.jar:4.3.4] - at io.vertx.core.impl.future.Composition.onSuccess(Composition.java:43) ~[vertx-core-4.3.4.jar:4.3.4] - at io.vertx.core.impl.future.FutureBase.emitSuccess(FutureBase.java:60) ~[vertx-core-4.3.4.jar:4.3.4] - at io.vertx.core.impl.future.FutureImpl.tryComplete(FutureImpl.java:211) ~[vertx-core-4.3.4.jar:4.3.4] - at io.vertx.core.impl.future.Composition$1.onSuccess(Composition.java:62) ~[vertx-core-4.3.4.jar:4.3.4] - at io.vertx.core.impl.future.FutureBase.emitSuccess(FutureBase.java:60) ~[vertx-core-4.3.4.jar:4.3.4] - at io.vertx.core.impl.future.FutureImpl.addListener(FutureImpl.java:196) ~[vertx-core-4.3.4.jar:4.3.4] - at io.vertx.core.impl.future.PromiseImpl.addListener(PromiseImpl.java:23) ~[vertx-core-4.3.4.jar:4.3.4] - at io.vertx.core.impl.future.Composition.onSuccess(Composition.java:43) ~[vertx-core-4.3.4.jar:4.3.4] - at io.vertx.core.impl.future.FutureImpl$ListenerArray.onSuccess(FutureImpl.java:262) ~[vertx-core-4.3.4.jar:4.3.4] - at io.vertx.core.impl.future.FutureBase.lambda$emitSuccess$0(FutureBase.java:54) ~[vertx-core-4.3.4.jar:4.3.4] - at io.netty.util.concurrent.AbstractEventExecutor.runTask(AbstractEventExecutor.java:174) [netty-common-4.1.82.Final.jar:4.1.82.Final] - at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:167) [netty-common-4.1.82.Final.jar:4.1.82.Final] - at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:470) [netty-common-4.1.82.Final.jar:4.1.82.Final] - at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:569) [netty-transport-4.1.82.Final.jar:4.1.82.Final] - at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:997) [netty-common-4.1.82.Final.jar:4.1.82.Final] - at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74) [netty-common-4.1.82.Final.jar:4.1.82.Final] - at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30) [netty-common-4.1.82.Final.jar:4.1.82.Final] - at java.lang.Thread.run(Thread.java:834) [?:?] -Caused by: java.sql.SQLException: Query returns results - at org.sqlite.jdbc3.JDBC3PreparedStatement.executeLargeUpdate(JDBC3PreparedStatement.java:106) ~[sqlite-jdbc-3.39.4.0.jar:?] - at org.sqlite.jdbc3.JDBC3PreparedStatement.executeUpdate(JDBC3PreparedStatement.java:98) ~[sqlite-jdbc-3.39.4.0.jar:?] - at com.zaxxer.hikari.pool.ProxyPreparedStatement.executeUpdate(ProxyPreparedStatement.java:61) ~[HikariCP-4.0.3.jar:?] - at com.zaxxer.hikari.pool.HikariProxyPreparedStatement.executeUpdate(HikariProxyPreparedStatement.java) ~[HikariCP-4.0.3.jar:?] - at org.jetbrains.exposed.sql.statements.jdbc.JdbcPreparedStatementImpl.executeUpdate(JdbcPreparedStatementImpl.kt:26) ~[exposed-jdbc-0.40.1.jar:?] - at org.jetbrains.exposed.sql.Transaction$exec$2.executeInternal(Transaction.kt:113) ~[exposed-core-0.40.1.jar:?] - at org.jetbrains.exposed.sql.statements.Statement.executeIn$exposed_core(Statement.kt:62) ~[exposed-core-0.40.1.jar:?] - ... 58 more -2022-11-18 16:17:57,609 ERROR [com.hisense.dahua_video.util.MonitorSessionUtil]-[vert.x-eventloop-thread-17] 创建会话失败 -io.netty.channel.AbstractChannel$AnnotatedConnectException: Connection timed out: no further information: /10.132.191.3:8314 -Caused by: java.net.ConnectException: Connection timed out: no further information - at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method) ~[?:?] - at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:779) ~[?:?] - at io.netty.channel.socket.nio.NioSocketChannel.doFinishConnect(NioSocketChannel.java:337) ~[netty-transport-4.1.82.Final.jar:4.1.82.Final] - at io.netty.channel.nio.AbstractNioChannel$AbstractNioUnsafe.finishConnect(AbstractNioChannel.java:334) [netty-transport-4.1.82.Final.jar:4.1.82.Final] - at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:776) [netty-transport-4.1.82.Final.jar:4.1.82.Final] - at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:724) [netty-transport-4.1.82.Final.jar:4.1.82.Final] - at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:650) [netty-transport-4.1.82.Final.jar:4.1.82.Final] - at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:562) [netty-transport-4.1.82.Final.jar:4.1.82.Final] - at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:997) [netty-common-4.1.82.Final.jar:4.1.82.Final] - at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74) [netty-common-4.1.82.Final.jar:4.1.82.Final] - at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30) [netty-common-4.1.82.Final.jar:4.1.82.Final] - at java.lang.Thread.run(Thread.java:834) [?:?] diff --git a/logs/app.log.20221118-1 b/logs/app.log.20221118-1 deleted file mode 100644 index 5939dcb..0000000 --- a/logs/app.log.20221118-1 +++ /dev/null @@ -1,369 +0,0 @@ -2022-11-18 16:16:16,528 INFO [com.hisense.dahua_video.MainVerticle]-[vert.x-eventloop-thread-1] 开始创表2022-11-18T16:16:16.527701600 -2022-11-18 16:16:16,582 INFO [com.zaxxer.hikari.HikariDataSource]-[vert.x-eventloop-thread-1] HikariPool-1 - Starting... -2022-11-18 16:16:17,993 INFO [com.zaxxer.hikari.HikariDataSource]-[vert.x-eventloop-thread-1] HikariPool-1 - Start completed. -2022-11-18 16:16:18,055 INFO [com.hisense.dahua_video.MainVerticle]-[vert.x-eventloop-thread-1] 连接完成2022-11-18T16:16:18.055891600 -2022-11-18 16:16:18,155 INFO [Exposed]-[vert.x-eventloop-thread-1] Preparing create tables statements took 1ms -2022-11-18 16:16:18,155 INFO [Exposed]-[vert.x-eventloop-thread-1] Executing create tables statements took 0ms -2022-11-18 16:16:18,161 INFO [Exposed]-[vert.x-eventloop-thread-1] Extracting table columns took 5ms -2022-11-18 16:16:18,166 INFO [Exposed]-[vert.x-eventloop-thread-1] Preparing alter table statements took 10ms -2022-11-18 16:16:18,173 WARN [Exposed]-[vert.x-eventloop-thread-1] Transaction attempt #0 failed: java.sql.SQLException: Query returns results. Statement(s): ALTER TABLE sys_device ADD device_id TEXT NOT NULL -org.jetbrains.exposed.exceptions.ExposedSQLException: java.sql.SQLException: Query returns results - at org.jetbrains.exposed.sql.statements.Statement.executeIn$exposed_core(Statement.kt:64) ~[exposed-core-0.40.1.jar:?] - at org.jetbrains.exposed.sql.Transaction.exec(Transaction.kt:140) ~[exposed-core-0.40.1.jar:?] - at org.jetbrains.exposed.sql.Transaction.exec(Transaction.kt:126) ~[exposed-core-0.40.1.jar:?] - at org.jetbrains.exposed.sql.Transaction.exec(Transaction.kt:108) ~[exposed-core-0.40.1.jar:?] - at org.jetbrains.exposed.sql.Transaction.exec(Transaction.kt:94) ~[exposed-core-0.40.1.jar:?] - at org.jetbrains.exposed.sql.Transaction.exec$default(Transaction.kt:93) ~[exposed-core-0.40.1.jar:?] - at org.jetbrains.exposed.sql.SchemaUtils.execStatements(SchemaUtils.kt:251) ~[exposed-core-0.40.1.jar:?] - at org.jetbrains.exposed.sql.SchemaUtils.createMissingTablesAndColumns(SchemaUtils.kt:321) ~[exposed-core-0.40.1.jar:?] - at org.jetbrains.exposed.sql.SchemaUtils.createMissingTablesAndColumns$default(SchemaUtils.kt:306) ~[exposed-core-0.40.1.jar:?] - at com.hisense.dahua_video.MainVerticle$exposed$1.invoke(MainVerticle.kt:160) ~[classes/:?] - at com.hisense.dahua_video.MainVerticle$exposed$1.invoke(MainVerticle.kt:157) ~[classes/:?] - at org.jetbrains.exposed.sql.transactions.ThreadLocalTransactionManagerKt.inTopLevelTransaction$run(ThreadLocalTransactionManager.kt:214) ~[exposed-core-0.40.1.jar:?] - at org.jetbrains.exposed.sql.transactions.ThreadLocalTransactionManagerKt.access$inTopLevelTransaction$run(ThreadLocalTransactionManager.kt:1) ~[exposed-core-0.40.1.jar:?] - at org.jetbrains.exposed.sql.transactions.ThreadLocalTransactionManagerKt$inTopLevelTransaction$1.invoke(ThreadLocalTransactionManager.kt:240) ~[exposed-core-0.40.1.jar:?] - at org.jetbrains.exposed.sql.transactions.ThreadLocalTransactionManagerKt.keepAndRestoreTransactionRefAfterRun(ThreadLocalTransactionManager.kt:248) ~[exposed-core-0.40.1.jar:?] - at org.jetbrains.exposed.sql.transactions.ThreadLocalTransactionManagerKt.inTopLevelTransaction(ThreadLocalTransactionManager.kt:239) ~[exposed-core-0.40.1.jar:?] - at org.jetbrains.exposed.sql.transactions.ThreadLocalTransactionManagerKt$transaction$1.invoke(ThreadLocalTransactionManager.kt:189) ~[exposed-core-0.40.1.jar:?] - at org.jetbrains.exposed.sql.transactions.ThreadLocalTransactionManagerKt.keepAndRestoreTransactionRefAfterRun(ThreadLocalTransactionManager.kt:248) ~[exposed-core-0.40.1.jar:?] - at org.jetbrains.exposed.sql.transactions.ThreadLocalTransactionManagerKt.transaction(ThreadLocalTransactionManager.kt:159) ~[exposed-core-0.40.1.jar:?] - at org.jetbrains.exposed.sql.transactions.ThreadLocalTransactionManagerKt.transaction(ThreadLocalTransactionManager.kt:146) ~[exposed-core-0.40.1.jar:?] - at org.jetbrains.exposed.sql.transactions.ThreadLocalTransactionManagerKt.transaction$default(ThreadLocalTransactionManager.kt:145) ~[exposed-core-0.40.1.jar:?] - at com.hisense.dahua_video.MainVerticle.exposed(MainVerticle.kt:157) ~[classes/:?] - at com.hisense.dahua_video.MainVerticle.start$lambda$4(MainVerticle.kt:51) ~[classes/:?] - at io.vertx.core.impl.future.FutureImpl$3.onSuccess(FutureImpl.java:141) ~[vertx-core-4.3.4.jar:4.3.4] - at io.vertx.core.impl.future.FutureImpl$ListenerArray.onSuccess(FutureImpl.java:262) ~[vertx-core-4.3.4.jar:4.3.4] - at io.vertx.core.impl.future.FutureBase.emitSuccess(FutureBase.java:60) ~[vertx-core-4.3.4.jar:4.3.4] - at io.vertx.core.impl.future.FutureImpl.tryComplete(FutureImpl.java:211) ~[vertx-core-4.3.4.jar:4.3.4] - at io.vertx.core.impl.future.Mapping.onSuccess(Mapping.java:40) ~[vertx-core-4.3.4.jar:4.3.4] - at io.vertx.core.impl.future.FutureBase.emitSuccess(FutureBase.java:60) ~[vertx-core-4.3.4.jar:4.3.4] - at io.vertx.core.impl.future.FutureImpl.tryComplete(FutureImpl.java:211) ~[vertx-core-4.3.4.jar:4.3.4] - at io.vertx.core.impl.future.Mapping.onSuccess(Mapping.java:40) ~[vertx-core-4.3.4.jar:4.3.4] - at io.vertx.core.impl.future.FutureBase.emitSuccess(FutureBase.java:60) ~[vertx-core-4.3.4.jar:4.3.4] - at io.vertx.core.impl.future.FutureImpl.tryComplete(FutureImpl.java:211) ~[vertx-core-4.3.4.jar:4.3.4] - at io.vertx.core.impl.future.CompositeFutureImpl.trySucceed(CompositeFutureImpl.java:163) ~[vertx-core-4.3.4.jar:4.3.4] - at io.vertx.core.impl.future.CompositeFutureImpl.lambda$all$0(CompositeFutureImpl.java:38) ~[vertx-core-4.3.4.jar:4.3.4] - at io.vertx.core.impl.future.FutureImpl$3.onSuccess(FutureImpl.java:141) ~[vertx-core-4.3.4.jar:4.3.4] - at io.vertx.core.impl.future.FutureBase.emitSuccess(FutureBase.java:60) ~[vertx-core-4.3.4.jar:4.3.4] - at io.vertx.core.impl.future.FutureImpl.tryComplete(FutureImpl.java:211) ~[vertx-core-4.3.4.jar:4.3.4] - at io.vertx.core.impl.future.Composition$1.onSuccess(Composition.java:62) ~[vertx-core-4.3.4.jar:4.3.4] - at io.vertx.core.impl.future.FutureBase.emitSuccess(FutureBase.java:60) ~[vertx-core-4.3.4.jar:4.3.4] - at io.vertx.core.impl.future.SucceededFuture.addListener(SucceededFuture.java:88) ~[vertx-core-4.3.4.jar:4.3.4] - at io.vertx.core.impl.future.Composition.onSuccess(Composition.java:43) ~[vertx-core-4.3.4.jar:4.3.4] - at io.vertx.core.impl.future.FutureBase.emitSuccess(FutureBase.java:60) ~[vertx-core-4.3.4.jar:4.3.4] - at io.vertx.core.impl.future.FutureImpl.tryComplete(FutureImpl.java:211) ~[vertx-core-4.3.4.jar:4.3.4] - at io.vertx.core.impl.future.Composition$1.onSuccess(Composition.java:62) ~[vertx-core-4.3.4.jar:4.3.4] - at io.vertx.core.impl.future.FutureBase.emitSuccess(FutureBase.java:60) ~[vertx-core-4.3.4.jar:4.3.4] - at io.vertx.core.impl.future.FutureImpl.addListener(FutureImpl.java:196) ~[vertx-core-4.3.4.jar:4.3.4] - at io.vertx.core.impl.future.PromiseImpl.addListener(PromiseImpl.java:23) ~[vertx-core-4.3.4.jar:4.3.4] - at io.vertx.core.impl.future.Composition.onSuccess(Composition.java:43) ~[vertx-core-4.3.4.jar:4.3.4] - at io.vertx.core.impl.future.FutureImpl$ListenerArray.onSuccess(FutureImpl.java:262) ~[vertx-core-4.3.4.jar:4.3.4] - at io.vertx.core.impl.future.FutureBase.lambda$emitSuccess$0(FutureBase.java:54) ~[vertx-core-4.3.4.jar:4.3.4] - at io.netty.util.concurrent.AbstractEventExecutor.runTask(AbstractEventExecutor.java:174) [netty-common-4.1.82.Final.jar:4.1.82.Final] - at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:167) [netty-common-4.1.82.Final.jar:4.1.82.Final] - at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:470) [netty-common-4.1.82.Final.jar:4.1.82.Final] - at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:569) [netty-transport-4.1.82.Final.jar:4.1.82.Final] - at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:997) [netty-common-4.1.82.Final.jar:4.1.82.Final] - at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74) [netty-common-4.1.82.Final.jar:4.1.82.Final] - at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30) [netty-common-4.1.82.Final.jar:4.1.82.Final] - at java.lang.Thread.run(Thread.java:834) [?:?] -Caused by: java.sql.SQLException: Query returns results - at org.sqlite.jdbc3.JDBC3PreparedStatement.executeLargeUpdate(JDBC3PreparedStatement.java:106) ~[sqlite-jdbc-3.39.4.0.jar:?] - at org.sqlite.jdbc3.JDBC3PreparedStatement.executeUpdate(JDBC3PreparedStatement.java:98) ~[sqlite-jdbc-3.39.4.0.jar:?] - at com.zaxxer.hikari.pool.ProxyPreparedStatement.executeUpdate(ProxyPreparedStatement.java:61) ~[HikariCP-4.0.3.jar:?] - at com.zaxxer.hikari.pool.HikariProxyPreparedStatement.executeUpdate(HikariProxyPreparedStatement.java) ~[HikariCP-4.0.3.jar:?] - at org.jetbrains.exposed.sql.statements.jdbc.JdbcPreparedStatementImpl.executeUpdate(JdbcPreparedStatementImpl.kt:26) ~[exposed-jdbc-0.40.1.jar:?] - at org.jetbrains.exposed.sql.Transaction$exec$2.executeInternal(Transaction.kt:113) ~[exposed-core-0.40.1.jar:?] - at org.jetbrains.exposed.sql.statements.Statement.executeIn$exposed_core(Statement.kt:62) ~[exposed-core-0.40.1.jar:?] - ... 58 more -2022-11-18 16:16:18,185 INFO [Exposed]-[vert.x-eventloop-thread-1] Preparing create tables statements took 0ms -2022-11-18 16:16:18,185 INFO [Exposed]-[vert.x-eventloop-thread-1] Executing create tables statements took 0ms -2022-11-18 16:16:18,187 INFO [Exposed]-[vert.x-eventloop-thread-1] Extracting table columns took 2ms -2022-11-18 16:16:18,188 INFO [Exposed]-[vert.x-eventloop-thread-1] Preparing alter table statements took 3ms -2022-11-18 16:16:18,188 WARN [Exposed]-[vert.x-eventloop-thread-1] Transaction attempt #1 failed: java.sql.SQLException: Query returns results. Statement(s): ALTER TABLE sys_device ADD device_id TEXT NOT NULL -org.jetbrains.exposed.exceptions.ExposedSQLException: java.sql.SQLException: Query returns results - at org.jetbrains.exposed.sql.statements.Statement.executeIn$exposed_core(Statement.kt:64) ~[exposed-core-0.40.1.jar:?] - at org.jetbrains.exposed.sql.Transaction.exec(Transaction.kt:140) ~[exposed-core-0.40.1.jar:?] - at org.jetbrains.exposed.sql.Transaction.exec(Transaction.kt:126) ~[exposed-core-0.40.1.jar:?] - at org.jetbrains.exposed.sql.Transaction.exec(Transaction.kt:108) ~[exposed-core-0.40.1.jar:?] - at org.jetbrains.exposed.sql.Transaction.exec(Transaction.kt:94) ~[exposed-core-0.40.1.jar:?] - at org.jetbrains.exposed.sql.Transaction.exec$default(Transaction.kt:93) ~[exposed-core-0.40.1.jar:?] - at org.jetbrains.exposed.sql.SchemaUtils.execStatements(SchemaUtils.kt:251) ~[exposed-core-0.40.1.jar:?] - at org.jetbrains.exposed.sql.SchemaUtils.createMissingTablesAndColumns(SchemaUtils.kt:321) ~[exposed-core-0.40.1.jar:?] - at org.jetbrains.exposed.sql.SchemaUtils.createMissingTablesAndColumns$default(SchemaUtils.kt:306) ~[exposed-core-0.40.1.jar:?] - at com.hisense.dahua_video.MainVerticle$exposed$1.invoke(MainVerticle.kt:160) ~[classes/:?] - at com.hisense.dahua_video.MainVerticle$exposed$1.invoke(MainVerticle.kt:157) ~[classes/:?] - at org.jetbrains.exposed.sql.transactions.ThreadLocalTransactionManagerKt.inTopLevelTransaction$run(ThreadLocalTransactionManager.kt:214) ~[exposed-core-0.40.1.jar:?] - at org.jetbrains.exposed.sql.transactions.ThreadLocalTransactionManagerKt.access$inTopLevelTransaction$run(ThreadLocalTransactionManager.kt:1) ~[exposed-core-0.40.1.jar:?] - at org.jetbrains.exposed.sql.transactions.ThreadLocalTransactionManagerKt$inTopLevelTransaction$1.invoke(ThreadLocalTransactionManager.kt:240) ~[exposed-core-0.40.1.jar:?] - at org.jetbrains.exposed.sql.transactions.ThreadLocalTransactionManagerKt.keepAndRestoreTransactionRefAfterRun(ThreadLocalTransactionManager.kt:248) ~[exposed-core-0.40.1.jar:?] - at org.jetbrains.exposed.sql.transactions.ThreadLocalTransactionManagerKt.inTopLevelTransaction(ThreadLocalTransactionManager.kt:239) ~[exposed-core-0.40.1.jar:?] - at org.jetbrains.exposed.sql.transactions.ThreadLocalTransactionManagerKt$transaction$1.invoke(ThreadLocalTransactionManager.kt:189) ~[exposed-core-0.40.1.jar:?] - at org.jetbrains.exposed.sql.transactions.ThreadLocalTransactionManagerKt.keepAndRestoreTransactionRefAfterRun(ThreadLocalTransactionManager.kt:248) ~[exposed-core-0.40.1.jar:?] - at org.jetbrains.exposed.sql.transactions.ThreadLocalTransactionManagerKt.transaction(ThreadLocalTransactionManager.kt:159) ~[exposed-core-0.40.1.jar:?] - at org.jetbrains.exposed.sql.transactions.ThreadLocalTransactionManagerKt.transaction(ThreadLocalTransactionManager.kt:146) ~[exposed-core-0.40.1.jar:?] - at org.jetbrains.exposed.sql.transactions.ThreadLocalTransactionManagerKt.transaction$default(ThreadLocalTransactionManager.kt:145) ~[exposed-core-0.40.1.jar:?] - at com.hisense.dahua_video.MainVerticle.exposed(MainVerticle.kt:157) ~[classes/:?] - at com.hisense.dahua_video.MainVerticle.start$lambda$4(MainVerticle.kt:51) ~[classes/:?] - at io.vertx.core.impl.future.FutureImpl$3.onSuccess(FutureImpl.java:141) ~[vertx-core-4.3.4.jar:4.3.4] - at io.vertx.core.impl.future.FutureImpl$ListenerArray.onSuccess(FutureImpl.java:262) ~[vertx-core-4.3.4.jar:4.3.4] - at io.vertx.core.impl.future.FutureBase.emitSuccess(FutureBase.java:60) ~[vertx-core-4.3.4.jar:4.3.4] - at io.vertx.core.impl.future.FutureImpl.tryComplete(FutureImpl.java:211) ~[vertx-core-4.3.4.jar:4.3.4] - at io.vertx.core.impl.future.Mapping.onSuccess(Mapping.java:40) ~[vertx-core-4.3.4.jar:4.3.4] - at io.vertx.core.impl.future.FutureBase.emitSuccess(FutureBase.java:60) ~[vertx-core-4.3.4.jar:4.3.4] - at io.vertx.core.impl.future.FutureImpl.tryComplete(FutureImpl.java:211) ~[vertx-core-4.3.4.jar:4.3.4] - at io.vertx.core.impl.future.Mapping.onSuccess(Mapping.java:40) ~[vertx-core-4.3.4.jar:4.3.4] - at io.vertx.core.impl.future.FutureBase.emitSuccess(FutureBase.java:60) ~[vertx-core-4.3.4.jar:4.3.4] - at io.vertx.core.impl.future.FutureImpl.tryComplete(FutureImpl.java:211) ~[vertx-core-4.3.4.jar:4.3.4] - at io.vertx.core.impl.future.CompositeFutureImpl.trySucceed(CompositeFutureImpl.java:163) ~[vertx-core-4.3.4.jar:4.3.4] - at io.vertx.core.impl.future.CompositeFutureImpl.lambda$all$0(CompositeFutureImpl.java:38) ~[vertx-core-4.3.4.jar:4.3.4] - at io.vertx.core.impl.future.FutureImpl$3.onSuccess(FutureImpl.java:141) ~[vertx-core-4.3.4.jar:4.3.4] - at io.vertx.core.impl.future.FutureBase.emitSuccess(FutureBase.java:60) ~[vertx-core-4.3.4.jar:4.3.4] - at io.vertx.core.impl.future.FutureImpl.tryComplete(FutureImpl.java:211) ~[vertx-core-4.3.4.jar:4.3.4] - at io.vertx.core.impl.future.Composition$1.onSuccess(Composition.java:62) ~[vertx-core-4.3.4.jar:4.3.4] - at io.vertx.core.impl.future.FutureBase.emitSuccess(FutureBase.java:60) ~[vertx-core-4.3.4.jar:4.3.4] - at io.vertx.core.impl.future.SucceededFuture.addListener(SucceededFuture.java:88) ~[vertx-core-4.3.4.jar:4.3.4] - at io.vertx.core.impl.future.Composition.onSuccess(Composition.java:43) ~[vertx-core-4.3.4.jar:4.3.4] - at io.vertx.core.impl.future.FutureBase.emitSuccess(FutureBase.java:60) ~[vertx-core-4.3.4.jar:4.3.4] - at io.vertx.core.impl.future.FutureImpl.tryComplete(FutureImpl.java:211) ~[vertx-core-4.3.4.jar:4.3.4] - at io.vertx.core.impl.future.Composition$1.onSuccess(Composition.java:62) ~[vertx-core-4.3.4.jar:4.3.4] - at io.vertx.core.impl.future.FutureBase.emitSuccess(FutureBase.java:60) ~[vertx-core-4.3.4.jar:4.3.4] - at io.vertx.core.impl.future.FutureImpl.addListener(FutureImpl.java:196) ~[vertx-core-4.3.4.jar:4.3.4] - at io.vertx.core.impl.future.PromiseImpl.addListener(PromiseImpl.java:23) ~[vertx-core-4.3.4.jar:4.3.4] - at io.vertx.core.impl.future.Composition.onSuccess(Composition.java:43) ~[vertx-core-4.3.4.jar:4.3.4] - at io.vertx.core.impl.future.FutureImpl$ListenerArray.onSuccess(FutureImpl.java:262) ~[vertx-core-4.3.4.jar:4.3.4] - at io.vertx.core.impl.future.FutureBase.lambda$emitSuccess$0(FutureBase.java:54) ~[vertx-core-4.3.4.jar:4.3.4] - at io.netty.util.concurrent.AbstractEventExecutor.runTask(AbstractEventExecutor.java:174) [netty-common-4.1.82.Final.jar:4.1.82.Final] - at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:167) [netty-common-4.1.82.Final.jar:4.1.82.Final] - at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:470) [netty-common-4.1.82.Final.jar:4.1.82.Final] - at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:569) [netty-transport-4.1.82.Final.jar:4.1.82.Final] - at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:997) [netty-common-4.1.82.Final.jar:4.1.82.Final] - at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74) [netty-common-4.1.82.Final.jar:4.1.82.Final] - at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30) [netty-common-4.1.82.Final.jar:4.1.82.Final] - at java.lang.Thread.run(Thread.java:834) [?:?] -Caused by: java.sql.SQLException: Query returns results - at org.sqlite.jdbc3.JDBC3PreparedStatement.executeLargeUpdate(JDBC3PreparedStatement.java:106) ~[sqlite-jdbc-3.39.4.0.jar:?] - at org.sqlite.jdbc3.JDBC3PreparedStatement.executeUpdate(JDBC3PreparedStatement.java:98) ~[sqlite-jdbc-3.39.4.0.jar:?] - at com.zaxxer.hikari.pool.ProxyPreparedStatement.executeUpdate(ProxyPreparedStatement.java:61) ~[HikariCP-4.0.3.jar:?] - at com.zaxxer.hikari.pool.HikariProxyPreparedStatement.executeUpdate(HikariProxyPreparedStatement.java) ~[HikariCP-4.0.3.jar:?] - at org.jetbrains.exposed.sql.statements.jdbc.JdbcPreparedStatementImpl.executeUpdate(JdbcPreparedStatementImpl.kt:26) ~[exposed-jdbc-0.40.1.jar:?] - at org.jetbrains.exposed.sql.Transaction$exec$2.executeInternal(Transaction.kt:113) ~[exposed-core-0.40.1.jar:?] - at org.jetbrains.exposed.sql.statements.Statement.executeIn$exposed_core(Statement.kt:62) ~[exposed-core-0.40.1.jar:?] - ... 58 more -2022-11-18 16:16:18,190 INFO [Exposed]-[vert.x-eventloop-thread-1] Preparing create tables statements took 1ms -2022-11-18 16:16:18,190 INFO [Exposed]-[vert.x-eventloop-thread-1] Executing create tables statements took 0ms -2022-11-18 16:16:18,192 INFO [Exposed]-[vert.x-eventloop-thread-1] Extracting table columns took 2ms -2022-11-18 16:16:18,192 INFO [Exposed]-[vert.x-eventloop-thread-1] Preparing alter table statements took 2ms -2022-11-18 16:16:18,192 WARN [Exposed]-[vert.x-eventloop-thread-1] Transaction attempt #2 failed: java.sql.SQLException: Query returns results. Statement(s): ALTER TABLE sys_device ADD device_id TEXT NOT NULL -org.jetbrains.exposed.exceptions.ExposedSQLException: java.sql.SQLException: Query returns results - at org.jetbrains.exposed.sql.statements.Statement.executeIn$exposed_core(Statement.kt:64) ~[exposed-core-0.40.1.jar:?] - at org.jetbrains.exposed.sql.Transaction.exec(Transaction.kt:140) ~[exposed-core-0.40.1.jar:?] - at org.jetbrains.exposed.sql.Transaction.exec(Transaction.kt:126) ~[exposed-core-0.40.1.jar:?] - at org.jetbrains.exposed.sql.Transaction.exec(Transaction.kt:108) ~[exposed-core-0.40.1.jar:?] - at org.jetbrains.exposed.sql.Transaction.exec(Transaction.kt:94) ~[exposed-core-0.40.1.jar:?] - at org.jetbrains.exposed.sql.Transaction.exec$default(Transaction.kt:93) ~[exposed-core-0.40.1.jar:?] - at org.jetbrains.exposed.sql.SchemaUtils.execStatements(SchemaUtils.kt:251) ~[exposed-core-0.40.1.jar:?] - at org.jetbrains.exposed.sql.SchemaUtils.createMissingTablesAndColumns(SchemaUtils.kt:321) ~[exposed-core-0.40.1.jar:?] - at org.jetbrains.exposed.sql.SchemaUtils.createMissingTablesAndColumns$default(SchemaUtils.kt:306) ~[exposed-core-0.40.1.jar:?] - at com.hisense.dahua_video.MainVerticle$exposed$1.invoke(MainVerticle.kt:160) ~[classes/:?] - at com.hisense.dahua_video.MainVerticle$exposed$1.invoke(MainVerticle.kt:157) ~[classes/:?] - at org.jetbrains.exposed.sql.transactions.ThreadLocalTransactionManagerKt.inTopLevelTransaction$run(ThreadLocalTransactionManager.kt:214) ~[exposed-core-0.40.1.jar:?] - at org.jetbrains.exposed.sql.transactions.ThreadLocalTransactionManagerKt.access$inTopLevelTransaction$run(ThreadLocalTransactionManager.kt:1) ~[exposed-core-0.40.1.jar:?] - at org.jetbrains.exposed.sql.transactions.ThreadLocalTransactionManagerKt$inTopLevelTransaction$1.invoke(ThreadLocalTransactionManager.kt:240) ~[exposed-core-0.40.1.jar:?] - at org.jetbrains.exposed.sql.transactions.ThreadLocalTransactionManagerKt.keepAndRestoreTransactionRefAfterRun(ThreadLocalTransactionManager.kt:248) ~[exposed-core-0.40.1.jar:?] - at org.jetbrains.exposed.sql.transactions.ThreadLocalTransactionManagerKt.inTopLevelTransaction(ThreadLocalTransactionManager.kt:239) ~[exposed-core-0.40.1.jar:?] - at org.jetbrains.exposed.sql.transactions.ThreadLocalTransactionManagerKt$transaction$1.invoke(ThreadLocalTransactionManager.kt:189) ~[exposed-core-0.40.1.jar:?] - at org.jetbrains.exposed.sql.transactions.ThreadLocalTransactionManagerKt.keepAndRestoreTransactionRefAfterRun(ThreadLocalTransactionManager.kt:248) ~[exposed-core-0.40.1.jar:?] - at org.jetbrains.exposed.sql.transactions.ThreadLocalTransactionManagerKt.transaction(ThreadLocalTransactionManager.kt:159) ~[exposed-core-0.40.1.jar:?] - at org.jetbrains.exposed.sql.transactions.ThreadLocalTransactionManagerKt.transaction(ThreadLocalTransactionManager.kt:146) ~[exposed-core-0.40.1.jar:?] - at org.jetbrains.exposed.sql.transactions.ThreadLocalTransactionManagerKt.transaction$default(ThreadLocalTransactionManager.kt:145) ~[exposed-core-0.40.1.jar:?] - at com.hisense.dahua_video.MainVerticle.exposed(MainVerticle.kt:157) ~[classes/:?] - at com.hisense.dahua_video.MainVerticle.start$lambda$4(MainVerticle.kt:51) ~[classes/:?] - at io.vertx.core.impl.future.FutureImpl$3.onSuccess(FutureImpl.java:141) ~[vertx-core-4.3.4.jar:4.3.4] - at io.vertx.core.impl.future.FutureImpl$ListenerArray.onSuccess(FutureImpl.java:262) ~[vertx-core-4.3.4.jar:4.3.4] - at io.vertx.core.impl.future.FutureBase.emitSuccess(FutureBase.java:60) ~[vertx-core-4.3.4.jar:4.3.4] - at io.vertx.core.impl.future.FutureImpl.tryComplete(FutureImpl.java:211) ~[vertx-core-4.3.4.jar:4.3.4] - at io.vertx.core.impl.future.Mapping.onSuccess(Mapping.java:40) ~[vertx-core-4.3.4.jar:4.3.4] - at io.vertx.core.impl.future.FutureBase.emitSuccess(FutureBase.java:60) ~[vertx-core-4.3.4.jar:4.3.4] - at io.vertx.core.impl.future.FutureImpl.tryComplete(FutureImpl.java:211) ~[vertx-core-4.3.4.jar:4.3.4] - at io.vertx.core.impl.future.Mapping.onSuccess(Mapping.java:40) ~[vertx-core-4.3.4.jar:4.3.4] - at io.vertx.core.impl.future.FutureBase.emitSuccess(FutureBase.java:60) ~[vertx-core-4.3.4.jar:4.3.4] - at io.vertx.core.impl.future.FutureImpl.tryComplete(FutureImpl.java:211) ~[vertx-core-4.3.4.jar:4.3.4] - at io.vertx.core.impl.future.CompositeFutureImpl.trySucceed(CompositeFutureImpl.java:163) ~[vertx-core-4.3.4.jar:4.3.4] - at io.vertx.core.impl.future.CompositeFutureImpl.lambda$all$0(CompositeFutureImpl.java:38) ~[vertx-core-4.3.4.jar:4.3.4] - at io.vertx.core.impl.future.FutureImpl$3.onSuccess(FutureImpl.java:141) ~[vertx-core-4.3.4.jar:4.3.4] - at io.vertx.core.impl.future.FutureBase.emitSuccess(FutureBase.java:60) ~[vertx-core-4.3.4.jar:4.3.4] - at io.vertx.core.impl.future.FutureImpl.tryComplete(FutureImpl.java:211) ~[vertx-core-4.3.4.jar:4.3.4] - at io.vertx.core.impl.future.Composition$1.onSuccess(Composition.java:62) ~[vertx-core-4.3.4.jar:4.3.4] - at io.vertx.core.impl.future.FutureBase.emitSuccess(FutureBase.java:60) ~[vertx-core-4.3.4.jar:4.3.4] - at io.vertx.core.impl.future.SucceededFuture.addListener(SucceededFuture.java:88) ~[vertx-core-4.3.4.jar:4.3.4] - at io.vertx.core.impl.future.Composition.onSuccess(Composition.java:43) ~[vertx-core-4.3.4.jar:4.3.4] - at io.vertx.core.impl.future.FutureBase.emitSuccess(FutureBase.java:60) ~[vertx-core-4.3.4.jar:4.3.4] - at io.vertx.core.impl.future.FutureImpl.tryComplete(FutureImpl.java:211) ~[vertx-core-4.3.4.jar:4.3.4] - at io.vertx.core.impl.future.Composition$1.onSuccess(Composition.java:62) ~[vertx-core-4.3.4.jar:4.3.4] - at io.vertx.core.impl.future.FutureBase.emitSuccess(FutureBase.java:60) ~[vertx-core-4.3.4.jar:4.3.4] - at io.vertx.core.impl.future.FutureImpl.addListener(FutureImpl.java:196) ~[vertx-core-4.3.4.jar:4.3.4] - at io.vertx.core.impl.future.PromiseImpl.addListener(PromiseImpl.java:23) ~[vertx-core-4.3.4.jar:4.3.4] - at io.vertx.core.impl.future.Composition.onSuccess(Composition.java:43) ~[vertx-core-4.3.4.jar:4.3.4] - at io.vertx.core.impl.future.FutureImpl$ListenerArray.onSuccess(FutureImpl.java:262) ~[vertx-core-4.3.4.jar:4.3.4] - at io.vertx.core.impl.future.FutureBase.lambda$emitSuccess$0(FutureBase.java:54) ~[vertx-core-4.3.4.jar:4.3.4] - at io.netty.util.concurrent.AbstractEventExecutor.runTask(AbstractEventExecutor.java:174) [netty-common-4.1.82.Final.jar:4.1.82.Final] - at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:167) [netty-common-4.1.82.Final.jar:4.1.82.Final] - at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:470) [netty-common-4.1.82.Final.jar:4.1.82.Final] - at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:569) [netty-transport-4.1.82.Final.jar:4.1.82.Final] - at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:997) [netty-common-4.1.82.Final.jar:4.1.82.Final] - at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74) [netty-common-4.1.82.Final.jar:4.1.82.Final] - at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30) [netty-common-4.1.82.Final.jar:4.1.82.Final] - at java.lang.Thread.run(Thread.java:834) [?:?] -Caused by: java.sql.SQLException: Query returns results - at org.sqlite.jdbc3.JDBC3PreparedStatement.executeLargeUpdate(JDBC3PreparedStatement.java:106) ~[sqlite-jdbc-3.39.4.0.jar:?] - at org.sqlite.jdbc3.JDBC3PreparedStatement.executeUpdate(JDBC3PreparedStatement.java:98) ~[sqlite-jdbc-3.39.4.0.jar:?] - at com.zaxxer.hikari.pool.ProxyPreparedStatement.executeUpdate(ProxyPreparedStatement.java:61) ~[HikariCP-4.0.3.jar:?] - at com.zaxxer.hikari.pool.HikariProxyPreparedStatement.executeUpdate(HikariProxyPreparedStatement.java) ~[HikariCP-4.0.3.jar:?] - at org.jetbrains.exposed.sql.statements.jdbc.JdbcPreparedStatementImpl.executeUpdate(JdbcPreparedStatementImpl.kt:26) ~[exposed-jdbc-0.40.1.jar:?] - at org.jetbrains.exposed.sql.Transaction$exec$2.executeInternal(Transaction.kt:113) ~[exposed-core-0.40.1.jar:?] - at org.jetbrains.exposed.sql.statements.Statement.executeIn$exposed_core(Statement.kt:62) ~[exposed-core-0.40.1.jar:?] - ... 58 more -2022-11-18 16:16:18,193 ERROR [io.vertx.core.impl.ContextBase]-[vert.x-eventloop-thread-1] Unhandled exception -org.jetbrains.exposed.exceptions.ExposedSQLException: java.sql.SQLException: Query returns results - at org.jetbrains.exposed.sql.statements.Statement.executeIn$exposed_core(Statement.kt:64) ~[exposed-core-0.40.1.jar:?] - at org.jetbrains.exposed.sql.Transaction.exec(Transaction.kt:140) ~[exposed-core-0.40.1.jar:?] - at org.jetbrains.exposed.sql.Transaction.exec(Transaction.kt:126) ~[exposed-core-0.40.1.jar:?] - at org.jetbrains.exposed.sql.Transaction.exec(Transaction.kt:108) ~[exposed-core-0.40.1.jar:?] - at org.jetbrains.exposed.sql.Transaction.exec(Transaction.kt:94) ~[exposed-core-0.40.1.jar:?] - at org.jetbrains.exposed.sql.Transaction.exec$default(Transaction.kt:93) ~[exposed-core-0.40.1.jar:?] - at org.jetbrains.exposed.sql.SchemaUtils.execStatements(SchemaUtils.kt:251) ~[exposed-core-0.40.1.jar:?] - at org.jetbrains.exposed.sql.SchemaUtils.createMissingTablesAndColumns(SchemaUtils.kt:321) ~[exposed-core-0.40.1.jar:?] - at org.jetbrains.exposed.sql.SchemaUtils.createMissingTablesAndColumns$default(SchemaUtils.kt:306) ~[exposed-core-0.40.1.jar:?] - at com.hisense.dahua_video.MainVerticle$exposed$1.invoke(MainVerticle.kt:160) ~[classes/:?] - at com.hisense.dahua_video.MainVerticle$exposed$1.invoke(MainVerticle.kt:157) ~[classes/:?] - at org.jetbrains.exposed.sql.transactions.ThreadLocalTransactionManagerKt.inTopLevelTransaction$run(ThreadLocalTransactionManager.kt:214) ~[exposed-core-0.40.1.jar:?] - at org.jetbrains.exposed.sql.transactions.ThreadLocalTransactionManagerKt.access$inTopLevelTransaction$run(ThreadLocalTransactionManager.kt:1) ~[exposed-core-0.40.1.jar:?] - at org.jetbrains.exposed.sql.transactions.ThreadLocalTransactionManagerKt$inTopLevelTransaction$1.invoke(ThreadLocalTransactionManager.kt:240) ~[exposed-core-0.40.1.jar:?] - at org.jetbrains.exposed.sql.transactions.ThreadLocalTransactionManagerKt.keepAndRestoreTransactionRefAfterRun(ThreadLocalTransactionManager.kt:248) ~[exposed-core-0.40.1.jar:?] - at org.jetbrains.exposed.sql.transactions.ThreadLocalTransactionManagerKt.inTopLevelTransaction(ThreadLocalTransactionManager.kt:239) ~[exposed-core-0.40.1.jar:?] - at org.jetbrains.exposed.sql.transactions.ThreadLocalTransactionManagerKt$transaction$1.invoke(ThreadLocalTransactionManager.kt:189) ~[exposed-core-0.40.1.jar:?] - at org.jetbrains.exposed.sql.transactions.ThreadLocalTransactionManagerKt.keepAndRestoreTransactionRefAfterRun(ThreadLocalTransactionManager.kt:248) ~[exposed-core-0.40.1.jar:?] - at org.jetbrains.exposed.sql.transactions.ThreadLocalTransactionManagerKt.transaction(ThreadLocalTransactionManager.kt:159) ~[exposed-core-0.40.1.jar:?] - at org.jetbrains.exposed.sql.transactions.ThreadLocalTransactionManagerKt.transaction(ThreadLocalTransactionManager.kt:146) ~[exposed-core-0.40.1.jar:?] - at org.jetbrains.exposed.sql.transactions.ThreadLocalTransactionManagerKt.transaction$default(ThreadLocalTransactionManager.kt:145) ~[exposed-core-0.40.1.jar:?] - at com.hisense.dahua_video.MainVerticle.exposed(MainVerticle.kt:157) ~[classes/:?] - at com.hisense.dahua_video.MainVerticle.start$lambda$4(MainVerticle.kt:51) ~[classes/:?] - at io.vertx.core.impl.future.FutureImpl$3.onSuccess(FutureImpl.java:141) ~[vertx-core-4.3.4.jar:4.3.4] - at io.vertx.core.impl.future.FutureImpl$ListenerArray.onSuccess(FutureImpl.java:262) ~[vertx-core-4.3.4.jar:4.3.4] - at io.vertx.core.impl.future.FutureBase.emitSuccess(FutureBase.java:60) ~[vertx-core-4.3.4.jar:4.3.4] - at io.vertx.core.impl.future.FutureImpl.tryComplete(FutureImpl.java:211) ~[vertx-core-4.3.4.jar:4.3.4] - at io.vertx.core.impl.future.Mapping.onSuccess(Mapping.java:40) ~[vertx-core-4.3.4.jar:4.3.4] - at io.vertx.core.impl.future.FutureBase.emitSuccess(FutureBase.java:60) ~[vertx-core-4.3.4.jar:4.3.4] - at io.vertx.core.impl.future.FutureImpl.tryComplete(FutureImpl.java:211) ~[vertx-core-4.3.4.jar:4.3.4] - at io.vertx.core.impl.future.Mapping.onSuccess(Mapping.java:40) ~[vertx-core-4.3.4.jar:4.3.4] - at io.vertx.core.impl.future.FutureBase.emitSuccess(FutureBase.java:60) ~[vertx-core-4.3.4.jar:4.3.4] - at io.vertx.core.impl.future.FutureImpl.tryComplete(FutureImpl.java:211) ~[vertx-core-4.3.4.jar:4.3.4] - at io.vertx.core.impl.future.CompositeFutureImpl.trySucceed(CompositeFutureImpl.java:163) ~[vertx-core-4.3.4.jar:4.3.4] - at io.vertx.core.impl.future.CompositeFutureImpl.lambda$all$0(CompositeFutureImpl.java:38) ~[vertx-core-4.3.4.jar:4.3.4] - at io.vertx.core.impl.future.FutureImpl$3.onSuccess(FutureImpl.java:141) ~[vertx-core-4.3.4.jar:4.3.4] - at io.vertx.core.impl.future.FutureBase.emitSuccess(FutureBase.java:60) ~[vertx-core-4.3.4.jar:4.3.4] - at io.vertx.core.impl.future.FutureImpl.tryComplete(FutureImpl.java:211) ~[vertx-core-4.3.4.jar:4.3.4] - at io.vertx.core.impl.future.Composition$1.onSuccess(Composition.java:62) ~[vertx-core-4.3.4.jar:4.3.4] - at io.vertx.core.impl.future.FutureBase.emitSuccess(FutureBase.java:60) ~[vertx-core-4.3.4.jar:4.3.4] - at io.vertx.core.impl.future.SucceededFuture.addListener(SucceededFuture.java:88) ~[vertx-core-4.3.4.jar:4.3.4] - at io.vertx.core.impl.future.Composition.onSuccess(Composition.java:43) ~[vertx-core-4.3.4.jar:4.3.4] - at io.vertx.core.impl.future.FutureBase.emitSuccess(FutureBase.java:60) ~[vertx-core-4.3.4.jar:4.3.4] - at io.vertx.core.impl.future.FutureImpl.tryComplete(FutureImpl.java:211) ~[vertx-core-4.3.4.jar:4.3.4] - at io.vertx.core.impl.future.Composition$1.onSuccess(Composition.java:62) ~[vertx-core-4.3.4.jar:4.3.4] - at io.vertx.core.impl.future.FutureBase.emitSuccess(FutureBase.java:60) ~[vertx-core-4.3.4.jar:4.3.4] - at io.vertx.core.impl.future.FutureImpl.addListener(FutureImpl.java:196) ~[vertx-core-4.3.4.jar:4.3.4] - at io.vertx.core.impl.future.PromiseImpl.addListener(PromiseImpl.java:23) ~[vertx-core-4.3.4.jar:4.3.4] - at io.vertx.core.impl.future.Composition.onSuccess(Composition.java:43) ~[vertx-core-4.3.4.jar:4.3.4] - at io.vertx.core.impl.future.FutureImpl$ListenerArray.onSuccess(FutureImpl.java:262) ~[vertx-core-4.3.4.jar:4.3.4] - at io.vertx.core.impl.future.FutureBase.lambda$emitSuccess$0(FutureBase.java:54) ~[vertx-core-4.3.4.jar:4.3.4] - at io.netty.util.concurrent.AbstractEventExecutor.runTask(AbstractEventExecutor.java:174) [netty-common-4.1.82.Final.jar:4.1.82.Final] - at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:167) [netty-common-4.1.82.Final.jar:4.1.82.Final] - at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:470) [netty-common-4.1.82.Final.jar:4.1.82.Final] - at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:569) [netty-transport-4.1.82.Final.jar:4.1.82.Final] - at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:997) [netty-common-4.1.82.Final.jar:4.1.82.Final] - at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74) [netty-common-4.1.82.Final.jar:4.1.82.Final] - at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30) [netty-common-4.1.82.Final.jar:4.1.82.Final] - at java.lang.Thread.run(Thread.java:834) [?:?] -Caused by: java.sql.SQLException: Query returns results - at org.sqlite.jdbc3.JDBC3PreparedStatement.executeLargeUpdate(JDBC3PreparedStatement.java:106) ~[sqlite-jdbc-3.39.4.0.jar:?] - at org.sqlite.jdbc3.JDBC3PreparedStatement.executeUpdate(JDBC3PreparedStatement.java:98) ~[sqlite-jdbc-3.39.4.0.jar:?] - at com.zaxxer.hikari.pool.ProxyPreparedStatement.executeUpdate(ProxyPreparedStatement.java:61) ~[HikariCP-4.0.3.jar:?] - at com.zaxxer.hikari.pool.HikariProxyPreparedStatement.executeUpdate(HikariProxyPreparedStatement.java) ~[HikariCP-4.0.3.jar:?] - at org.jetbrains.exposed.sql.statements.jdbc.JdbcPreparedStatementImpl.executeUpdate(JdbcPreparedStatementImpl.kt:26) ~[exposed-jdbc-0.40.1.jar:?] - at org.jetbrains.exposed.sql.Transaction$exec$2.executeInternal(Transaction.kt:113) ~[exposed-core-0.40.1.jar:?] - at org.jetbrains.exposed.sql.statements.Statement.executeIn$exposed_core(Statement.kt:62) ~[exposed-core-0.40.1.jar:?] - ... 58 more -2022-11-18 16:17:33,061 INFO [com.hisense.dahua_video.MainVerticle]-[vert.x-eventloop-thread-1] 开始创表2022-11-18T16:17:33.055055800 -2022-11-18 16:17:33,109 INFO [com.zaxxer.hikari.HikariDataSource]-[vert.x-eventloop-thread-1] HikariPool-1 - Starting... -2022-11-18 16:17:33,610 INFO [com.zaxxer.hikari.HikariDataSource]-[vert.x-eventloop-thread-1] HikariPool-1 - Start completed. -2022-11-18 16:17:33,692 INFO [com.hisense.dahua_video.MainVerticle]-[vert.x-eventloop-thread-1] 连接完成2022-11-18T16:17:33.690195600 -2022-11-18 16:17:34,603 INFO [Exposed]-[vert.x-eventloop-thread-1] Preparing create tables statements took 0ms -2022-11-18 16:17:34,603 INFO [Exposed]-[vert.x-eventloop-thread-1] Executing create tables statements took 0ms -2022-11-18 16:17:34,618 INFO [Exposed]-[vert.x-eventloop-thread-1] Extracting table columns took 14ms -2022-11-18 16:17:34,618 INFO [Exposed]-[vert.x-eventloop-thread-1] Preparing alter table statements took 15ms -2022-11-18 16:17:34,618 INFO [Exposed]-[vert.x-eventloop-thread-1] Executing alter table statements took 0ms -2022-11-18 16:17:34,665 WARN [io.vertx.core.impl.BlockedThreadChecker]-[vertx-blocked-thread-checker] Thread Thread[vert.x-eventloop-thread-1,5,main] has been blocked for 2528 ms, time limit is 2000 ms -2022-11-18 16:17:34,666 INFO [Exposed]-[vert.x-eventloop-thread-1] Index on table 'sys_monitor_user' differs only in name: in db sys_monitor_user_userName -> in mapping sys_monitor_user_userName_unique -2022-11-18 16:17:34,681 INFO [Exposed]-[vert.x-eventloop-thread-1] Index on table 'sys_user' differs only in name: in db sys_user_userName -> in mapping sys_user_userName_unique -2022-11-18 16:17:34,681 INFO [Exposed]-[vert.x-eventloop-thread-1] Index on table 'sys_organization' differs only in name: in db sys_organization_org_id -> in mapping sys_organization_org_id_unique -2022-11-18 16:17:34,682 INFO [Exposed]-[vert.x-eventloop-thread-1] Checking mapping consistence took 63ms -2022-11-18 16:17:34,682 INFO [com.hisense.dahua_video.MainVerticle]-[vert.x-eventloop-thread-1] 创表成功2022-11-18T16:17:34.682274800 -2022-11-18 16:17:34,740 WARN [io.vertx.core.impl.VertxImpl]-[vert.x-eventloop-thread-1] You're already on a Vert.x context, are you sure you want to create a new Vertx instance? -2022-11-18 16:17:34,778 INFO [com.hisense.dahua_video.MainVerticle]-[vert.x-eventloop-thread-1] 无集群配置,进行单节点部署! -2022-11-18 16:17:34,779 INFO [com.hisense.dahua_video.MainVerticle]-[vert.x-eventloop-thread-1] vertx.isNativeTransportEnabled:false -2022-11-18 16:17:34,779 INFO [com.hisense.dahua_video.MainVerticle]-[vert.x-eventloop-thread-1] 截图根目录:/mnts/record/\ -2022-11-18 16:17:35,219 INFO [com.hisense.dahua_video.verticle.MonitorVerticle]-[vert.x-eventloop-thread-17] monitorSessionUtil 创建成功! -2022-11-18 16:17:35,220 INFO [com.hisense.dahua_video.MainVerticle]-[vert.x-eventloop-thread-31] 部署 MonitorVerticle 成功! -2022-11-18 16:17:35,220 INFO [com.hisense.dahua_video.MainVerticle]-[vert.x-eventloop-thread-31] 部署 OrganizationVerticle 成功! -2022-11-18 16:17:35,328 INFO [com.hisense.dahua_video.MainVerticle]-[vert.x-eventloop-thread-31] 部署 SqlFactoryVerticle 成功! -2022-11-18 16:17:35,682 INFO [com.hisense.dahua_video.verticle.WebAPIVerticle]-[vert.x-eventloop-thread-10] http 服务监听端口: 8883 -2022-11-18 16:17:35,716 INFO [com.hisense.dahua_video.util.MonitorSessionUtil]-[vert.x-eventloop-thread-17] authorize:{"userName":"ynszdz","password":"Admin@123","monitorDomain":"http://10.132.191.3:8314","id":1} -2022-11-18 16:17:35,720 INFO [com.hisense.dahua_video.util.MonitorSessionUtil]-[vert.x-eventloop-thread-17] domain: 10.132.191.3 port:8314 -2022-11-18 16:17:36,659 INFO [com.hisense.dahua_video.verticle.WebAPIVerticle]-[vert.x-eventloop-thread-10] 开放管理员后台 -2022-11-18 16:17:36,660 INFO [com.hisense.dahua_video.verticle.WebAPIVerticle]-[vert.x-eventloop-thread-13] http 服务监听端口: 8883 -2022-11-18 16:17:36,661 INFO [com.hisense.dahua_video.verticle.WebAPIVerticle]-[vert.x-eventloop-thread-4] http 服务监听端口: 8883 -2022-11-18 16:17:36,661 INFO [com.hisense.dahua_video.verticle.WebAPIVerticle]-[vert.x-eventloop-thread-14] http 服务监听端口: 8883 -2022-11-18 16:17:36,661 INFO [com.hisense.dahua_video.verticle.WebAPIVerticle]-[vert.x-eventloop-thread-8] http 服务监听端口: 8883 -2022-11-18 16:17:36,661 INFO [com.hisense.dahua_video.verticle.WebAPIVerticle]-[vert.x-eventloop-thread-2] http 服务监听端口: 8883 -2022-11-18 16:17:36,661 INFO [com.hisense.dahua_video.verticle.WebAPIVerticle]-[vert.x-eventloop-thread-7] http 服务监听端口: 8883 -2022-11-18 16:17:36,662 INFO [com.hisense.dahua_video.verticle.WebAPIVerticle]-[vert.x-eventloop-thread-6] http 服务监听端口: 8883 -2022-11-18 16:17:36,662 INFO [com.hisense.dahua_video.verticle.WebAPIVerticle]-[vert.x-eventloop-thread-5] http 服务监听端口: 8883 -2022-11-18 16:17:36,662 INFO [com.hisense.dahua_video.verticle.WebAPIVerticle]-[vert.x-eventloop-thread-15] http 服务监听端口: 8883 -2022-11-18 16:17:36,662 INFO [com.hisense.dahua_video.verticle.WebAPIVerticle]-[vert.x-eventloop-thread-3] http 服务监听端口: 8883 -2022-11-18 16:17:36,663 INFO [com.hisense.dahua_video.verticle.WebAPIVerticle]-[vert.x-eventloop-thread-11] http 服务监听端口: 8883 -2022-11-18 16:17:36,662 INFO [com.hisense.dahua_video.verticle.WebAPIVerticle]-[vert.x-eventloop-thread-0] http 服务监听端口: 8883 -2022-11-18 16:17:36,663 INFO [com.hisense.dahua_video.verticle.WebAPIVerticle]-[vert.x-eventloop-thread-9] http 服务监听端口: 8883 -2022-11-18 16:17:36,663 INFO [com.hisense.dahua_video.verticle.WebAPIVerticle]-[vert.x-eventloop-thread-1] http 服务监听端口: 8883 -2022-11-18 16:17:36,664 INFO [com.hisense.dahua_video.verticle.WebAPIVerticle]-[vert.x-eventloop-thread-4] 开放管理员后台 -2022-11-18 16:17:36,664 INFO [com.hisense.dahua_video.verticle.WebAPIVerticle]-[vert.x-eventloop-thread-14] 开放管理员后台 -2022-11-18 16:17:36,664 INFO [com.hisense.dahua_video.verticle.WebAPIVerticle]-[vert.x-eventloop-thread-13] 开放管理员后台 -2022-11-18 16:17:36,664 INFO [com.hisense.dahua_video.verticle.WebAPIVerticle]-[vert.x-eventloop-thread-7] 开放管理员后台 -2022-11-18 16:17:36,664 INFO [com.hisense.dahua_video.verticle.WebAPIVerticle]-[vert.x-eventloop-thread-5] 开放管理员后台 -2022-11-18 16:17:36,664 INFO [com.hisense.dahua_video.verticle.WebAPIVerticle]-[vert.x-eventloop-thread-2] 开放管理员后台 -2022-11-18 16:17:36,664 INFO [com.hisense.dahua_video.verticle.WebAPIVerticle]-[vert.x-eventloop-thread-15] 开放管理员后台 -2022-11-18 16:17:36,664 INFO [com.hisense.dahua_video.verticle.WebAPIVerticle]-[vert.x-eventloop-thread-3] 开放管理员后台 -2022-11-18 16:17:36,664 INFO [com.hisense.dahua_video.verticle.WebAPIVerticle]-[vert.x-eventloop-thread-0] 开放管理员后台 -2022-11-18 16:17:36,664 INFO [com.hisense.dahua_video.verticle.WebAPIVerticle]-[vert.x-eventloop-thread-12] http 服务监听端口: 8883 -2022-11-18 16:17:36,665 INFO [com.hisense.dahua_video.MainVerticle]-[vert.x-eventloop-thread-31] 部署 WebAPIVerticle 成功! -2022-11-18 16:17:36,665 INFO [com.hisense.dahua_video.verticle.WebAPIVerticle]-[vert.x-eventloop-thread-8] 开放管理员后台 -2022-11-18 16:17:36,665 INFO [com.hisense.dahua_video.verticle.WebAPIVerticle]-[vert.x-eventloop-thread-11] 开放管理员后台 -2022-11-18 16:17:36,665 INFO [com.hisense.dahua_video.verticle.WebAPIVerticle]-[vert.x-eventloop-thread-6] 开放管理员后台 -2022-11-18 16:17:36,665 INFO [com.hisense.dahua_video.verticle.WebAPIVerticle]-[vert.x-eventloop-thread-1] 开放管理员后台 -2022-11-18 16:17:36,665 INFO [com.hisense.dahua_video.verticle.WebAPIVerticle]-[vert.x-eventloop-thread-9] 开放管理员后台 -2022-11-18 16:17:36,665 INFO [com.hisense.dahua_video.verticle.WebAPIVerticle]-[vert.x-eventloop-thread-12] 开放管理员后台 -2022-11-18 16:17:57,609 ERROR [com.hisense.dahua_video.util.MonitorSessionUtil]-[vert.x-eventloop-thread-17] 创建会话失败 -io.netty.channel.AbstractChannel$AnnotatedConnectException: Connection timed out: no further information: /10.132.191.3:8314 -Caused by: java.net.ConnectException: Connection timed out: no further information - at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method) ~[?:?] - at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:779) ~[?:?] - at io.netty.channel.socket.nio.NioSocketChannel.doFinishConnect(NioSocketChannel.java:337) ~[netty-transport-4.1.82.Final.jar:4.1.82.Final] - at io.netty.channel.nio.AbstractNioChannel$AbstractNioUnsafe.finishConnect(AbstractNioChannel.java:334) [netty-transport-4.1.82.Final.jar:4.1.82.Final] - at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:776) [netty-transport-4.1.82.Final.jar:4.1.82.Final] - at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:724) [netty-transport-4.1.82.Final.jar:4.1.82.Final] - at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:650) [netty-transport-4.1.82.Final.jar:4.1.82.Final] - at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:562) [netty-transport-4.1.82.Final.jar:4.1.82.Final] - at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:997) [netty-common-4.1.82.Final.jar:4.1.82.Final] - at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74) [netty-common-4.1.82.Final.jar:4.1.82.Final] - at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30) [netty-common-4.1.82.Final.jar:4.1.82.Final] - at java.lang.Thread.run(Thread.java:834) [?:?] diff --git a/src/main/kotlin/com/hisense/dahua_video/consts/EventBusAddress.kt b/src/main/kotlin/com/hisense/dahua_video/consts/EventBusAddress.kt index 71fb426..8844114 100644 --- a/src/main/kotlin/com/hisense/dahua_video/consts/EventBusAddress.kt +++ b/src/main/kotlin/com/hisense/dahua_video/consts/EventBusAddress.kt @@ -78,6 +78,11 @@ enum class EventBusAddress(val address: String) { /** * 通道截图 */ - SYS_DEVICE_CHANNEL_SCREENSHOT("MSG://EVENT/BUS/SQL/SYS/SYS_DEVICE_CHANNEL_SCREENSHOT") + SYS_DEVICE_CHANNEL_SCREENSHOT("MSG://EVENT/BUS/SQL/SYS/SYS_DEVICE_CHANNEL_SCREENSHOT"), + + /** + * 获取在线设备通道 + */ + SYS_DEVICE_CHANNEL_ONLINE("MSG://EVENT/BUS/SQL/SYS/SYS_DEVICE_CHANNEL_ONLINE") } diff --git a/src/main/kotlin/com/hisense/dahua_video/dao/DeviceChannelDao.kt b/src/main/kotlin/com/hisense/dahua_video/dao/DeviceChannelDao.kt index c352b2f..4dba715 100644 --- a/src/main/kotlin/com/hisense/dahua_video/dao/DeviceChannelDao.kt +++ b/src/main/kotlin/com/hisense/dahua_video/dao/DeviceChannelDao.kt @@ -28,6 +28,7 @@ class DeviceChannelDao( init { this.event = event_ saveOrUpdateDeviceChannel() + getAllOnLineChannel() } @@ -156,4 +157,46 @@ class DeviceChannelDao( } } + + /** + * 获取所有在线的可预览设备通道 + */ + private fun getAllOnLineChannel() { + event!!.consumer(EventBusAddress.SYS_DEVICE_CHANNEL_ONLINE.address)?.handler { res -> + val message = res.body() + val userId = message.getInteger("id") + val sql = """ +SELECT + sys_device_channel.channel_no, + sys_device.device_name +FROM + sys_device_channel + LEFT JOIN sys_device ON sys_device.id = sys_device_channel.device_id + LEFT JOIN sys_organization ON sys_organization.id = sys_device.organization_id + LEFT JOIN sys_monitor_user ON sys_organization.monitor_user_id = sys_monitor_user.id +WHERE + sys_device_channel.sub_type = 2 + AND sys_device_channel.online = 1 + AND sys_monitor_user.id = $userId +ORDER BY + sys_device.sort ASC; + """.trimIndent() + + val value = transaction { + val temp = JsonArray() + exec(sql) { res -> + while (res.next()) { + temp.add( + JsonObject() + .put("channel_no", res.getString("channel_no")) + .put("device_name", res.getString("device_name")) + ) + } + } + temp + } + logger.info("有效设备通道数量:" + value.size()) + res.reply(value) + } + } } diff --git a/src/main/kotlin/com/hisense/dahua_video/dao/DeviceDao.kt b/src/main/kotlin/com/hisense/dahua_video/dao/DeviceDao.kt index a7ee7ab..aaa5418 100644 --- a/src/main/kotlin/com/hisense/dahua_video/dao/DeviceDao.kt +++ b/src/main/kotlin/com/hisense/dahua_video/dao/DeviceDao.kt @@ -5,6 +5,7 @@ import com.hisense.dahua_video.consts.EventBusAddress import com.hisense.dahua_video.modules.device.Device import com.hisense.dahua_video.modules.device.Organization import com.hisense.dahua_video.util.DevicesManagerUtil +import com.hisense.dahua_video.util.ScreenshotUtil import io.vertx.core.Vertx import io.vertx.core.eventbus.EventBus import io.vertx.core.impl.logging.Logger @@ -24,6 +25,7 @@ class DeviceDao( private var event: EventBus? = null private val organization = Organization() private var devicesManagerUtil: DevicesManagerUtil? = null + private var screenshotUtil: ScreenshotUtil? = null private val device = Device() private var vertx: Vertx? = null @@ -31,7 +33,12 @@ class DeviceDao( this.event = event_ this.vertx = vertx devicesManagerUtil = DevicesManagerUtil(vertx) + screenshotUtil = ScreenshotUtil(vertx) saveOrupdateDevice() + +// vertx.setTimer(30000) { +// screenshotUtil!!.allDeviceChannel() +// } } diff --git a/src/main/kotlin/com/hisense/dahua_video/dao/OrganizationDao.kt b/src/main/kotlin/com/hisense/dahua_video/dao/OrganizationDao.kt index 4e232a0..c988547 100644 --- a/src/main/kotlin/com/hisense/dahua_video/dao/OrganizationDao.kt +++ b/src/main/kotlin/com/hisense/dahua_video/dao/OrganizationDao.kt @@ -75,24 +75,25 @@ class OrganizationDao(event_: EventBus?, vertx: Vertx) { this[organization.parentNodeType] = organization_.getInteger("parentNodeType") } } - - vertx!!.setTimer(3000) { - event!!.request(EventBusAddress.SYS_MONITOR_USER_ALLMONITORUSER_TOKEN.address, JsonObject()) { - if (it.succeeded()) { - val tokinInfo = it.result().body().stream().filter { index -> - index as JsonObject - index.getString("id") == message.stream().map { it_ -> it_ as JsonObject }.findFirst()?.get() - ?.getString("userId") ?: ""// 获取对应用户的第三方token - }.findAny() - tokinInfo.ifPresent { token -> - token as JsonObject - val tokenInfo = JsonObject() - .put("monitorDomain", token.getString("monitorDomain")) - .put("token", token.getString("token")) - .put("id", token.getInteger("id")) - message.stream().forEach { index -> + if (!message.isEmpty) { // 存在数据时才进行同步 + vertx!!.setTimer(3000) { + event!!.request(EventBusAddress.SYS_MONITOR_USER_ALLMONITORUSER_TOKEN.address, JsonObject()) { + if (it.succeeded()) { + val tokinInfo = it.result().body().stream().filter { index -> index as JsonObject - devicesManagerUtil!!.syncDevice(tokenInfo, index.getString("id")) + index.getString("id") == message.stream().map { it_ -> it_ as JsonObject }.findFirst()?.get() + ?.getString("userId") ?: ""// 获取对应用户的第三方token + }.findAny() + tokinInfo.ifPresent { token -> + token as JsonObject + val tokenInfo = JsonObject() + .put("monitorDomain", token.getString("monitorDomain")) + .put("token", token.getString("token")) + .put("id", token.getInteger("id")) + message.stream().forEach { index -> + index as JsonObject + devicesManagerUtil!!.syncDevice(tokenInfo, index.getString("id")) + } } } } diff --git a/src/main/kotlin/com/hisense/dahua_video/util/DevicesManagerUtil.kt b/src/main/kotlin/com/hisense/dahua_video/util/DevicesManagerUtil.kt index 6d88807..8f10573 100644 --- a/src/main/kotlin/com/hisense/dahua_video/util/DevicesManagerUtil.kt +++ b/src/main/kotlin/com/hisense/dahua_video/util/DevicesManagerUtil.kt @@ -10,14 +10,9 @@ import io.vertx.ext.web.client.WebClient import kotlinx.coroutines.Dispatchers import kotlinx.coroutines.GlobalScope import kotlinx.coroutines.launch -import org.bytedeco.javacv.FFmpegFrameGrabber -import org.bytedeco.javacv.Java2DFrameConverter import java.io.File -import java.time.LocalDateTime -import java.time.format.DateTimeFormatter import java.util.concurrent.atomic.AtomicInteger import java.util.stream.Collectors -import javax.imageio.ImageIO /** @@ -39,7 +34,6 @@ class DevicesManagerUtil(vertx: Vertx) { record = vertx.orCreateContext.config().getString("recroot", System.getProperty("user.dir") + File.separator + "record") realmonitorUrl() - screenshot() } @@ -281,88 +275,4 @@ class DevicesManagerUtil(vertx: Vertx) { } } - - /** - * 截图通道画面 - */ - private fun screenshot() { - /** - * 执行截图 - */ - fun screenshotAction(screenshot: JsonObject): JsonObject { - val url = screenshot.getString("url") - logger.info("抓取url:$url") - val result = JsonObject() - result.put("startTime", LocalDateTime.now().toString()) - GlobalScope.launch(Dispatchers.IO) { - val grabber = FFmpegFrameGrabber(url)// 使用协程 - try { - grabber.start() - logger.info("grabber启动成功") - val converter = Java2DFrameConverter() - while (true) { - when (val frame = grabber.grabImage()) { - null -> { - logger.info("截图取帧失败") - } - - else -> { - val bufferedImage = converter.getBufferedImage(frame) - val filePath = record + File.separator + screenshot.getString("channelId") - if (!File(filePath).exists()) { - File(filePath).mkdir() - } - val fileName = - record + File.separator + screenshot.getString("channelId") + File.separator + screenshot.getString("channelId") + "_" + DateTimeFormatter.ofPattern( - "yyyyMMddHHmmss-HHmmss" - ) - .format(LocalDateTime.now()) + ".jpg" - logger.info("保存地址:$fileName") - ImageIO.write(bufferedImage, "jpg", File(fileName)) - break - } - } - } - } catch (e: Exception) { - logger.error("抓取截图·失败·", e) - } finally { - grabber.stop() - grabber.release() - } - } - return result - } - - event!!.consumer(EventBusAddress.SYS_DEVICE_CHANNEL_SCREENSHOT.address)?.handler { replay -> - val message = replay.body() - val port = message.getString("monitorDomain").substringAfterLast(":").toInt() - var domain = message.getString("monitorDomain").substringBeforeLast(":").substringAfterLast("/") - val tokenString = message.getString("token") - - val channelId = message.getString("channelId") - val subType = message.getString("subType") - val scheme = message.getString("scheme") - - val realmonitorUrl = "/videoService/realmonitor/uri?channelId=$channelId&subType=$subType&scheme=$scheme" - logger.info("获取设备通道预览url:$realmonitorUrl") - client!!.get(port, domain, realmonitorUrl) - .putHeader("X-Subject-Token", tokenString) - .send() - .onSuccess { res -> - val result = res.bodyAsJsonObject() - logger.info("获取设备通道预览 statusCode:" + res.statusCode()) - if (res.statusCode() == 200) { - result.put("channelId", channelId) // 通道id - replay.reply(screenshotAction(result)) - } else { - replay.reply(JsonObject().put("msg", "获取预览地址失败")) - } - } - .onFailure { - replay.reply(JsonObject().put("msg", "获取预览地址失败")) - } - } - - } - } diff --git a/src/main/kotlin/com/hisense/dahua_video/util/ScreenshotUtil.kt b/src/main/kotlin/com/hisense/dahua_video/util/ScreenshotUtil.kt new file mode 100644 index 0000000..6164135 --- /dev/null +++ b/src/main/kotlin/com/hisense/dahua_video/util/ScreenshotUtil.kt @@ -0,0 +1,201 @@ +package com.hisense.dahua_video.util + +import com.hisense.dahua_video.consts.EventBusAddress +import com.hisense.dahua_video.consts.MonitorScheme +import io.vertx.core.Vertx +import io.vertx.core.eventbus.EventBus +import io.vertx.core.impl.logging.LoggerFactory +import io.vertx.core.json.JsonArray +import io.vertx.core.json.JsonObject +import io.vertx.ext.web.client.WebClient +import kotlinx.coroutines.Dispatchers +import kotlinx.coroutines.GlobalScope +import kotlinx.coroutines.delay +import kotlinx.coroutines.launch +import org.bytedeco.javacv.FFmpegFrameGrabber +import org.bytedeco.javacv.Java2DFrameConverter +import java.io.File +import java.time.LocalDateTime +import java.time.format.DateTimeFormatter +import java.util.concurrent.atomic.AtomicInteger +import javax.imageio.ImageIO + + +/** + * 全局截图工具 + */ +class ScreenshotUtil(vertx: Vertx) { + private val logger = LoggerFactory.getLogger(DevicesManagerUtil::class.java) + private val cpuNum = Runtime.getRuntime().availableProcessors() + + private var vertx: Vertx + private var event: EventBus? = null + private var client: WebClient? = null + private var record: String? = null + + init { + this.vertx = vertx + this.event = this.vertx.eventBus() + client = WebClient.create(this.vertx) + record = + vertx.orCreateContext.config().getString("recroot", System.getProperty("user.dir") + File.separator + "record") + screenshot() + } + + /** + * 截图所有平台内的通道 + */ + fun allDeviceChannel() { + event!!.request(EventBusAddress.SYS_MONITOR_USER_ALLMONITORUSER_TOKEN.address, JsonObject()) { + if (it.succeeded()) { + it.result().body().stream().forEach { index -> + index as JsonObject + val userId = index.getInteger("id") // 用户id + event!!.request( + EventBusAddress.SYS_DEVICE_CHANNEL_ONLINE.address, // 获取所有在线通道 + JsonObject().put("id", userId) + ) { res -> + if (res.succeeded()) { + val temp = res.result().body() + temp.stream().forEach { index_ -> + var temp = JsonObject() + .put("token", index.getString("token")) + .put("userName", index.getString("userName")) + .put("id", index.getInteger("id")) + .put("monitorDomain", index.getString("monitorDomain")) + .put("duration", index.getString("duration")) + index_ as JsonObject + val channelId = index_.getString("channel_no") + val subType = 1 + val scheme = 2 + temp.put("channelId", channelId) + temp.put("subType", subType) + temp.put("scheme", MonitorScheme.values()[scheme].scheme) + GlobalScope.launch(Dispatchers.IO) { + val random = (3000..60 * 60 * 1000).random().toLong() + delay(random) + logger.info("截图传参:" + temp.encode()) + event!!.request( + EventBusAddress.SYS_DEVICE_CHANNEL_SCREENSHOT.address, + temp + ) { previewUrl -> + if (previewUrl.succeeded()) { + logger.info("发起截图成功") + } else { + logger.info("发起截图失败") + } + } + } + } + } + } + } + } + } + } + + /** + * 截图通道画面 + */ + private fun screenshot() { + var taskCount = AtomicInteger(0) + + /** + * 执行截图 + */ + fun screenshotAction(screenshot: JsonObject): JsonObject { + taskCount.getAndAdd(1) + val url = screenshot.getString("url") + logger.info("抓取url:$url") + val result = JsonObject() + result.put("startTime", LocalDateTime.now().toString()) + GlobalScope.launch(Dispatchers.IO) { + val grabber = FFmpegFrameGrabber(url)// 使用协程 + val converter = Java2DFrameConverter() + try { + if (screenshot.getString("scheme") == MonitorScheme.RTSP.scheme) { + grabber.setOption("rtsp_transport", "tcp") + } + grabber.setOption("stimeout", "2000000") + grabber.start() + logger.info("grabber启动成功") + while (true) { + when (val frame = grabber.grabImage()) { + null -> { + logger.info("截图取帧失败") + } + + else -> { + val bufferedImage = converter.getBufferedImage(frame) + val filePath = record + File.separator + screenshot.getString("channelId") + if (!File(filePath).exists()) { + File(filePath).mkdir() + } + val fileName = + record + File.separator + screenshot.getString("channelId") + File.separator + screenshot.getString("channelId") + "_" + DateTimeFormatter.ofPattern( + "yyyyMMddHHmmss-HHmmss" + ) + .format(LocalDateTime.now()) + ".jpg" + logger.info("保存地址:$fileName") + ImageIO.write(bufferedImage, "jpg", File(fileName)) + logger.info("图片保存成功:$fileName") + break + } + } + } + } catch (e: Exception) { + logger.error("抓取截图·失败·", e) + } finally { + converter.close() + grabber.stop() + grabber.release() + taskCount.getAndAdd(-1) + } + } + return result + } + + event!!.consumer(EventBusAddress.SYS_DEVICE_CHANNEL_SCREENSHOT.address)?.handler { replay -> + val message = replay.body() + val port = message.getString("monitorDomain").substringAfterLast(":").toInt() + var domain = message.getString("monitorDomain").substringBeforeLast(":").substringAfterLast("/") + val tokenString = message.getString("token") + + val channelId = message.getString("channelId") + val subType = message.getString("subType") + val scheme = message.getString("scheme") + + val realmonitorUrl = "/videoService/realmonitor/uri?channelId=$channelId&subType=$subType&scheme=$scheme" + logger.info("获取设备通道预览url:$realmonitorUrl") + client!!.get(port, domain, realmonitorUrl) + .putHeader("X-Subject-Token", tokenString) + .send() + .onSuccess { res -> + val result = res.bodyAsJsonObject() + result.put("scheme", scheme) + logger.info("获取设备通道预览 statusCode:" + res.statusCode()) + if (res.statusCode() == 200) { + result.put("channelId", channelId) // 通道id + GlobalScope.launch(Dispatchers.IO) { + while (true) { + if (taskCount.get() < cpuNum * 2 - 1) { + replay.reply(screenshotAction(result)) + break + } else { + logger.info("截图队列已满,尝试重试中:${result.encode()}") + val random = (3000..10000).random().toLong() + delay(random) + } + } + } + } else { + replay.reply(JsonObject().put("msg", "获取预览地址失败")) + } + } + .onFailure { + replay.reply(JsonObject().put("msg", "获取预览地址失败")) + } + } + + } +} diff --git a/src/main/resources/log4j2.xml b/src/main/resources/log4j2.xml index f245816..86c07c9 100644 --- a/src/main/resources/log4j2.xml +++ b/src/main/resources/log4j2.xml @@ -12,7 +12,7 @@ + filePattern="logs/app.%d{yyyyMMdd}-%i.log"> %d %-5p [%c]-[%t] %m%n @@ -32,7 +32,7 @@ + filePattern="logs/app-error.%d{yyyyMMdd}-%i.log"> %d %-5p [%c]-[%t] %m%n diff --git a/src/main/resources/templates/index.html b/src/main/resources/templates/index.html index d7813e4..f36d147 100644 --- a/src/main/resources/templates/index.html +++ b/src/main/resources/templates/index.html @@ -16,14 +16,14 @@