Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DBeaver 24.0.0+ disconnect doesn't always work #29999

Open
xak2000 opened this issue May 8, 2024 · 3 comments
Open

DBeaver 24.0.0+ disconnect doesn't always work #29999

xak2000 opened this issue May 8, 2024 · 3 comments

Comments

@xak2000
Copy link

xak2000 commented May 8, 2024

Description

See the Step 11 of "Steps to Reproduce" section for the description of the bug. I don't know how to describe it in isolation of the steps to reproduce.

DBeaver Version

Community Edition 24.0.4

Operating System

Windows 11 22H2

Database and driver

Database Server: MySQL 5.7.44-google-log
Database Driver: MySQL Connector/J mysql-connector-j-8.4.0 (Revision: 1c3f5c149e0bfe31c7fbeb24e2d260cd890972c4)

Steps to reproduce

  1. Start DBeaver.

  2. Make sure no Editors opened (middle part of the screen).

  3. Connect to a Database server from the Projects view.

  4. Double-click on any TABLE in a DB on the connected server, so the TABLE View (Properties tab) will be opened in the middle of the screen. This is the state you should be in:
    image

  5. Disconnect from the Database in the Project View using context menu. The Middle of the screen should still have an opened TAB with the table, but it says "Disconnected" with "Reconnect to the database" in the middle of the screen.
    image
    image

  6. Close DBeaver.

  7. Start DBeaver.

  8. The Middle of the screen should have an opened TAB with the table (Properties tab) in a Connected state.
    image

  9. Find the DB Server in the Projects View again (by expanding <Group_name> -> Connections -> <Folder_name> -> <DB_Connection_name>. The UI shows a green checkbox on the DB Connection, that means it is connected.
    image

  10. Right click on the DB Connection name -> Disconnect. It is the same step as step 5.
    image

  11. Here is the bug: The DB Connection name in the UI still has a green checkbox, like it is still connected. The TABLE tab in the middle of the screen also still has active Properties tab. If you try to right-click on the DB Connection name again, the Context Menu will show "Connect" action as available. "Disconnect" action will be grayed out.
    image
    From this broken state there are plenty of incorrect behavior happens. E.g. trying to open some other table from this connection says "Default context not found". Trying to connect again shows the same error message. Basically the connection is broken and weird at this point and the only way to fix it is to restart DBeaver. "Invalidate/Reconnect" also doesn't help. Sometimes a "Data read" error window pops up with "Can't read data - no active connection" message.
    Trying to refresh the opened table gives this error message:
    image
    Trying to refresh the "Projects" tree removes the green checkbox from the UI, but if you try to connect again, the green checkbox will still be missing. And if you try to open any other table from this connection, a "Default context not found" error will shown again. Trying to access "Data" tab of the table shows this error:
    image
    Basically, without DBeaver restarting it is impossible to correctly Disconnect. Every time I need to Disconnect some connection I'm forced to restart DBeaver.

Additional context

This bug never happened before I upgraded to version 24.0.
I tried to install 23.3.5 now and I can't reproduce this bug in this version. So, probably some changes in 24.0.0 caused this bug.

@ShadelessFox
Copy link
Member

Hello @xak2000,

Can you please reproduce the issue again and provide log files? https://github.com/dbeaver/dbeaver/wiki/Log-files#log-files

@xak2000
Copy link
Author

xak2000 commented May 9, 2024

Hello @ShadelessFox,

  1. Here is the logs just after 2nd disconnet (step 10): dbeaver-diagnostic-info-1715285599639.zip
  2. Here is the logs after I tried to do some actions in this state (open another table, refresh table, invalidate/reconnect, etc.) (step 11): dbeaver-diagnostic-info-1715285747762.zip

I removed the configuration.txt from the archives as this file could contain sensitive information and it's 500KB. I can't analyze the whole 500KB file to understand if it is safe to share. It looks irrelevant to the problem. But if you need it, please ask.

@E1izabeth
Copy link
Member

I reproduced it
image

Thank you for bug report.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants