Chat2DB icon indicating copy to clipboard operation
Chat2DB copied to clipboard

Bug: failed to connect in VPN

Open donghao1393 opened this issue 1 year ago • 0 comments

Chat2DB Version

v1.2.0

Describe the bug

数据库是通过ikev2 vpn连接的postgres,用的驱动是postgresql-42.5.1.jar 进入数据库之后,就点不进去tables。 报错common.systemError An exception occurs, you can view the exception details in the log in the

{"getApplicationMessage":{"env":"offline","versions":"1.2.0","buildTime":"2024-11-01 16:28:28","userAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) chat2db-local/1.2.0 Chrome/108.0.5359.215 Electron/22.3.27 Safari/537.36"},"errorCode":"common.systemError","errorMessage":"An exception occurs, you can view the exception details in the log in the help menu.","errorDetail":"java.lang.reflect.InvocationTargetException\n\tat java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\n\tat java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)\n\tat java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)\n\tat java.base/java.lang.reflect.Method.invoke(Unknown Source)\n\tat ai.chat2db.server.start.controller.console.ConsoleHelper.doController(ConsoleHelper.java:372)\n\tat ai.chat2db.server.start.controller.console.ConsoleHelper.lambda$onMessage$2(ConsoleHelper.java:213)\n\tat java.base/java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)\n\tat java.base/java.util.concurrent.FutureTask.run(Unknown Source)\n\tat java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)\n\tat java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)\n\tat java.base/java.lang.Thread.run(Unknown Source)\nCaused by: java.lang.RuntimeException: org.postgresql.util.PSQLException: An I/O error occurred while sending to the backend.\n\tat ai.chat2db.spi.sql.SQLExecutor.tables(SQLExecutor.java:418)\n\tat ai.chat2db.plugin.postgresql.PostgreSQLMetaData.tables(PostgreSQLMetaData.java:78)\n\tat ai.chat2db.server.domain.core.impl.TableServiceImpl.lambda$getAllTables$4(TableServiceImpl.java:355)\n\tat ai.chat2db.server.domain.core.cache.MemoryCacheManage.computeIfAbsent(MemoryCacheManage.java:55)\n\tat ai.chat2db.server.domain.core.impl.TableServiceImpl.getAllTables(TableServiceImpl.java:353)\n\tat ai.chat2db.server.domain.core.impl.TableServiceImpl.pageQuery(TableServiceImpl.java:284)\n\tat ai.chat2db.server.web.api.controller.rdb.TableController.list(TableController.java:63)\n\tat java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\n\tat java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)\n\tat java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)\n\tat java.base/java.lang.reflect.Method.invoke(Unknown Source)\n\tat org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:343)\n\tat org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:196)\n\tat org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)\n\tat org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:750)\n\tat org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:89)\n\tat ai.chat2db.server.web.api.aspect.ConnectionInfoHandler.connectionInfoHandler(ConnectionInfoHandler.java:66)\n\tat java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\n\tat java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)\n\tat java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)\n\tat java.base/java.lang.reflect.Method.invoke(Unknown Source)\n\tat org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:637)\n\tat org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:627)\n\tat org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvice.java:71)\n\tat org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:184)\n\tat org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:750)\n\tat org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:89)\n\tat ai.chat2db.server.web.api.aspect.ControllerHandler.handle(ControllerHandler.java:49)\n\tat java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\n\tat java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)\n\tat java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)\n\tat java.base/java.lang.reflect.Method.invoke(Unknown Source)\n\tat org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:637)\n\tat org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:627)\n\tat org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvice.java:71)\n\tat org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:184)\n\tat org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:750)\n\tat org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:97)\n\tat org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:184)\n\tat org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:750)\n\tat org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:702)\n\tat ai.chat2db.server.web.api.controller.rdb.TableController$$SpringCGLIB$$0.list()\n\t... 11 more\nCaused by: org.postgresql.util.PSQLException: An I/O error occurred while sending to the backend.\n\tat org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:383)\n\tat org.postgresql.jdbc.PgStatement.executeInternal(PgStatement.java:496)\n\tat org.postgresql.jdbc.PgStatement.execute(PgStatement.java:413)\n\tat org.postgresql.jdbc.PgStatement.executeWithFlags(PgStatement.java:333)\n\tat org.postgresql.jdbc.PgStatement.executeCachedSql(PgStatement.java:319)\n\tat org.postgresql.jdbc.PgStatement.executeWithFlags(PgStatement.java:295)\n\tat org.postgresql.jdbc.PgStatement.executeQuery(PgStatement.java:244)\n\tat org.postgresql.jdbc.PgDatabaseMetaData.getTables(PgDatabaseMetaData.java:1343)\n\tat ai.chat2db.spi.sql.SQLExecutor.tables(SQLExecutor.java:415)\n\t... 52 more\nCaused by: java.net.SocketException: Operation timed out\n\tat java.base/sun.nio.ch.NioSocketImpl.implRead(Unknown Source)\n\tat java.base/sun.nio.ch.NioSocketImpl.read(Unknown Source)\n\tat java.base/sun.nio.ch.NioSocketImpl$1.read(Unknown Source)\n\tat java.base/java.net.Socket$SocketInputStream.read(Unknown Source)\n\tat java.base/sun.security.ssl.SSLSocketInputRecord.read(Unknown Source)\n\tat java.base/sun.security.ssl.SSLSocketInputRecord.readHeader(Unknown Source)\n\tat java.base/sun.security.ssl.SSLSocketInputRecord.bytesInCompletePacket(Unknown Source)\n\tat java.base/sun.security.ssl.SSLSocketImpl.readApplicationRecord(Unknown Source)\n\tat java.base/sun.security.ssl.SSLSocketImpl$AppInputStream.read(Unknown Source)\n\tat org.postgresql.core.VisibleBufferedInputStream.readMore(VisibleBufferedInputStream.java:161)\n\tat org.postgresql.core.VisibleBufferedInputStream.ensureBytes(VisibleBufferedInputStream.java:128)\n\tat org.postgresql.core.VisibleBufferedInputStream.ensureBytes(VisibleBufferedInputStream.java:113)\n\tat org.postgresql.core.VisibleBufferedInputStream.read(VisibleBufferedInputStream.java:73)\n\tat org.postgresql.core.PGStream.receiveChar(PGStream.java:453)\n\tat org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2120)\n\tat org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:356)\n\t... 60 more\n","solutionLink":"https://github.com/chat2db/Chat2DB/wiki/Chat2DB","requestParams":"{"actionType":"execute","headers":{"Accept-Language":"en-US","Time-Zone":"Asia/Dubai"},"uuid":"5a00fda7-e5ae-4e4f-8112-bc335aebe863","requestUrl":"/api/rdb/table/list","method":"get","message":{"hasPermission":true,"isAdmin":true,"databaseType":"POSTGRESQL","dataSourceId":1730710863754941,"dataSourceName":"@10.0.2.5","supportDatabase":true,"supportSchema":true,"databaseName":"oasis-frontendapi-database","schemaName":"public","pageNo":1,"pageSize":100000}}"}

donghao1393 avatar Nov 04 '24 09:11 donghao1393