[GH-ISSUE #1207] Error connecting to database: SQL Error [08003]: This connection has been closed. #267

Closed
opened 2026-03-07 20:47:03 +03:00 by kerem · 5 comments
Owner

Originally created by @khayyak on GitHub (Oct 8, 2022).
Original GitHub issue: https://github.com/dbeaver/cloudbeaver/issues/1207

Hello guys, I have a problem when I try to connect to a PostgreSQL database , the connection goes perfect in DbEaver but it's not for cloudbeaver + tunnel test goes successfully :

io.cloudbeaver.DBWebException: Error connecting to database:
SQL Error [08003]: This connection has been closed.
at io.cloudbeaver.service.core.impl.WebServiceCore.initConnection(WebServiceCore.java:287)
at jdk.internal.reflect.GeneratedMethodAccessor153.invoke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.base/java.lang.reflect.Method.invoke(Unknown Source)
at io.cloudbeaver.service.WebServiceBindingBase$ServiceInvocationHandler.invoke(WebServiceBindingBase.java:165)
at com.sun.proxy.$Proxy9.initConnection(Unknown Source)
at io.cloudbeaver.service.core.WebServiceBindingCore.lambda$23(WebServiceBindingCore.java:129)
at graphql.execution.instrumentation.dataloader.DataLoaderDispatcherInstrumentation.lambda$instrumentDataFetcher$0(DataLoaderDispatcherInstrumentation.java:86)
at graphql.execution.ExecutionStrategy.fetchField(ExecutionStrategy.java:258)
at graphql.execution.ExecutionStrategy.resolveFieldWithInfo(ExecutionStrategy.java:197)
at graphql.execution.AsyncExecutionStrategy.execute(AsyncExecutionStrategy.java:72)
at graphql.execution.Execution.executeOperation(Execution.java:160)
at graphql.execution.Execution.execute(Execution.java:101)
at graphql.GraphQL.execute(GraphQL.java:591)
at graphql.GraphQL.parseValidateAndExecute(GraphQL.java:521)
at graphql.GraphQL.executeAsync(GraphQL.java:495)
at graphql.GraphQL.execute(GraphQL.java:426)
at io.cloudbeaver.server.graphql.GraphQLEndpoint.executeQuery(GraphQLEndpoint.java:254)
at io.cloudbeaver.server.graphql.GraphQLEndpoint.executeSingleQuery(GraphQLEndpoint.java:200)
at io.cloudbeaver.server.graphql.GraphQLEndpoint.doPost(GraphQLEndpoint.java:183)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:517)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:584)
at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:764)
at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:508)
at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:221)
at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1571)
at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:221)
at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1378)
at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:176)
at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:463)
at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1544)
at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:174)
at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1300)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:129)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:122)
at org.eclipse.jetty.server.Server.handle(Server.java:562)
at org.eclipse.jetty.server.HttpChannel.lambda$handle$0(HttpChannel.java:505)
at org.eclipse.jetty.server.HttpChannel.dispatch(HttpChannel.java:762)
at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:497)
at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:282)
at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:319)
at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:100)
at org.eclipse.jetty.io.SelectableChannelEndPoint$1.run(SelectableChannelEndPoint.java:53)
at org.eclipse.jetty.util.thread.strategy.AdaptiveExecutionStrategy.runTask(AdaptiveExecutionStrategy.java:412)
at org.eclipse.jetty.util.thread.strategy.AdaptiveExecutionStrategy.consumeTask(AdaptiveExecutionStrategy.java:381)
at org.eclipse.jetty.util.thread.strategy.AdaptiveExecutionStrategy.tryProduce(AdaptiveExecutionStrategy.java:268)
at org.eclipse.jetty.util.thread.strategy.AdaptiveExecutionStrategy.lambda$new$0(AdaptiveExecutionStrategy.java:138)
at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:407)
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:894)
at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:1038)
at java.base/java.lang.Thread.run(Unknown Source)
Caused by: org.jkiss.dbeaver.DBException: SQL Error [08003]: This connection has been closed.
at org.jkiss.dbeaver.ext.postgresql.model.PostgreDatabase.cacheDataTypes(PostgreDatabase.java:706)
at org.jkiss.dbeaver.ext.postgresql.model.PostgreDataSource.initialize(PostgreDataSource.java:397)
at org.jkiss.dbeaver.registry.DataSourceDescriptor.openDataSource(DataSourceDescriptor.java:1051)
at org.jkiss.dbeaver.registry.DataSourceDescriptor.connect(DataSourceDescriptor.java:959)
at io.cloudbeaver.service.core.impl.WebServiceCore.initConnection(WebServiceCore.java:285)
... 50 more
Caused by: org.postgresql.util.PSQLException: This connection has been closed.
at org.postgresql.jdbc.PgConnection.checkClosed(PgConnection.java:883)
at org.postgresql.jdbc.PgConnection.prepareStatement(PgConnection.java:1744)
at org.postgresql.jdbc.PgConnection.prepareStatement(PgConnection.java:430)
at org.jkiss.dbeaver.model.impl.jdbc.exec.JDBCConnectionImpl.prepareStatement(JDBCConnectionImpl.java:244)
at org.jkiss.dbeaver.ext.postgresql.model.PostgreDatabase.cacheDataTypes(PostgreDatabase.java:682)
... 54 more

Originally created by @khayyak on GitHub (Oct 8, 2022). Original GitHub issue: https://github.com/dbeaver/cloudbeaver/issues/1207 Hello guys, I have a problem when I try to connect to a PostgreSQL database , the connection goes perfect in DbEaver but it's not for cloudbeaver + tunnel test goes successfully : io.cloudbeaver.DBWebException: Error connecting to database: SQL Error [08003]: This connection has been closed. at io.cloudbeaver.service.core.impl.WebServiceCore.initConnection(WebServiceCore.java:287) at jdk.internal.reflect.GeneratedMethodAccessor153.invoke(Unknown Source) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.base/java.lang.reflect.Method.invoke(Unknown Source) at io.cloudbeaver.service.WebServiceBindingBase$ServiceInvocationHandler.invoke(WebServiceBindingBase.java:165) at com.sun.proxy.$Proxy9.initConnection(Unknown Source) at io.cloudbeaver.service.core.WebServiceBindingCore.lambda$23(WebServiceBindingCore.java:129) at graphql.execution.instrumentation.dataloader.DataLoaderDispatcherInstrumentation.lambda$instrumentDataFetcher$0(DataLoaderDispatcherInstrumentation.java:86) at graphql.execution.ExecutionStrategy.fetchField(ExecutionStrategy.java:258) at graphql.execution.ExecutionStrategy.resolveFieldWithInfo(ExecutionStrategy.java:197) at graphql.execution.AsyncExecutionStrategy.execute(AsyncExecutionStrategy.java:72) at graphql.execution.Execution.executeOperation(Execution.java:160) at graphql.execution.Execution.execute(Execution.java:101) at graphql.GraphQL.execute(GraphQL.java:591) at graphql.GraphQL.parseValidateAndExecute(GraphQL.java:521) at graphql.GraphQL.executeAsync(GraphQL.java:495) at graphql.GraphQL.execute(GraphQL.java:426) at io.cloudbeaver.server.graphql.GraphQLEndpoint.executeQuery(GraphQLEndpoint.java:254) at io.cloudbeaver.server.graphql.GraphQLEndpoint.executeSingleQuery(GraphQLEndpoint.java:200) at io.cloudbeaver.server.graphql.GraphQLEndpoint.doPost(GraphQLEndpoint.java:183) at javax.servlet.http.HttpServlet.service(HttpServlet.java:517) at javax.servlet.http.HttpServlet.service(HttpServlet.java:584) at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:764) at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:508) at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:221) at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1571) at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:221) at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1378) at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:176) at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:463) at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1544) at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:174) at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1300) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:129) at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:122) at org.eclipse.jetty.server.Server.handle(Server.java:562) at org.eclipse.jetty.server.HttpChannel.lambda$handle$0(HttpChannel.java:505) at org.eclipse.jetty.server.HttpChannel.dispatch(HttpChannel.java:762) at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:497) at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:282) at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:319) at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:100) at org.eclipse.jetty.io.SelectableChannelEndPoint$1.run(SelectableChannelEndPoint.java:53) at org.eclipse.jetty.util.thread.strategy.AdaptiveExecutionStrategy.runTask(AdaptiveExecutionStrategy.java:412) at org.eclipse.jetty.util.thread.strategy.AdaptiveExecutionStrategy.consumeTask(AdaptiveExecutionStrategy.java:381) at org.eclipse.jetty.util.thread.strategy.AdaptiveExecutionStrategy.tryProduce(AdaptiveExecutionStrategy.java:268) at org.eclipse.jetty.util.thread.strategy.AdaptiveExecutionStrategy.lambda$new$0(AdaptiveExecutionStrategy.java:138) at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:407) at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:894) at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:1038) at java.base/java.lang.Thread.run(Unknown Source) Caused by: org.jkiss.dbeaver.DBException: SQL Error [08003]: This connection has been closed. at org.jkiss.dbeaver.ext.postgresql.model.PostgreDatabase.cacheDataTypes(PostgreDatabase.java:706) at org.jkiss.dbeaver.ext.postgresql.model.PostgreDataSource.initialize(PostgreDataSource.java:397) at org.jkiss.dbeaver.registry.DataSourceDescriptor.openDataSource(DataSourceDescriptor.java:1051) at org.jkiss.dbeaver.registry.DataSourceDescriptor.connect(DataSourceDescriptor.java:959) at io.cloudbeaver.service.core.impl.WebServiceCore.initConnection(WebServiceCore.java:285) ... 50 more Caused by: org.postgresql.util.PSQLException: This connection has been closed. at org.postgresql.jdbc.PgConnection.checkClosed(PgConnection.java:883) at org.postgresql.jdbc.PgConnection.prepareStatement(PgConnection.java:1744) at org.postgresql.jdbc.PgConnection.prepareStatement(PgConnection.java:430) at org.jkiss.dbeaver.model.impl.jdbc.exec.JDBCConnectionImpl.prepareStatement(JDBCConnectionImpl.java:244) at org.jkiss.dbeaver.ext.postgresql.model.PostgreDatabase.cacheDataTypes(PostgreDatabase.java:682) ... 54 more
kerem 2026-03-07 20:47:03 +03:00
Author
Owner

@kseniaguzeeva commented on GitHub (Oct 9, 2022):

Unfotunately I cannot reproduce the issue. Could you please tell:

  • your CloudBeaver version;
  • how do you configure the connection;
  • do you run CloudBeaver in Docker?
<!-- gh-comment-id:1272475075 --> @kseniaguzeeva commented on GitHub (Oct 9, 2022): Unfotunately I cannot reproduce the issue. Could you please tell: - your CloudBeaver version; - how do you configure the connection; - do you run CloudBeaver in Docker?
Author
Owner

@khayyak commented on GitHub (Oct 9, 2022):

@kseniaguzeeva thanks for reply

CloudBeaver version : 22.2.1
yes I run CloudBeaver in docker
I want to connect to remote database using tunnel , so I configured tunnel first and gives me success message when I click on test , after that I switch to option tab to configure database but as I said it gives me the error of : SQL Error [08003]: This connection has been closed.

<!-- gh-comment-id:1272516411 --> @khayyak commented on GitHub (Oct 9, 2022): @kseniaguzeeva thanks for reply CloudBeaver version : 22.2.1 yes I run CloudBeaver in docker I want to connect to remote database using tunnel , so I configured tunnel first and gives me success message when I click on test , after that I switch to option tab to configure database but as I said it gives me the error of : SQL Error [08003]: This connection has been closed.
Author
Owner

@kseniaguzeeva commented on GitHub (Oct 12, 2022):

Could you please make a video with the bug? You can add it in this ticket or send me at kseniia.guzeeva@dbeaver.com.

<!-- gh-comment-id:1276080433 --> @kseniaguzeeva commented on GitHub (Oct 12, 2022): Could you please make a video with the bug? You can add it in this ticket or send me at kseniia.guzeeva@dbeaver.com.
Author
Owner

@kseniaguzeeva commented on GitHub (Oct 28, 2022):

It lookslike a network issue. Do you use the same local machine for the DBeaver and CloudBeaver docker image? Or a virtual machine for the CloudBeaver?

<!-- gh-comment-id:1295034571 --> @kseniaguzeeva commented on GitHub (Oct 28, 2022): It lookslike a network issue. Do you use the same local machine for the DBeaver and CloudBeaver docker image? Or a virtual machine for the CloudBeaver?
Author
Owner

@TatyanaSsau commented on GitHub (Apr 4, 2023):

Unfortunately, I've noticed there is no updates for a long time.
Feel free to contact us if it's still actual.

<!-- gh-comment-id:1495787267 --> @TatyanaSsau commented on GitHub (Apr 4, 2023): Unfortunately, I've noticed there is no updates for a long time. Feel free to contact us if it's still actual.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/cloudbeaver#267
No description provided.