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

Shell сommand "Before Connect" not terminates then connection failed #22020

Closed
jskvoll opened this issue Nov 28, 2023 · 3 comments · Fixed by #33193
Closed

Shell сommand "Before Connect" not terminates then connection failed #22020

jskvoll opened this issue Nov 28, 2023 · 3 comments · Fixed by #33193

Comments

@jskvoll
Copy link

jskvoll commented Nov 28, 2023

Description

I expect, if connection failed then Connection settings -> Shell Commands -> Before Connect shell script should be automatically terminated.

But unfortunately the script is still running, and there is no way to interrupt it.

DBeaver Version

Community Edition 23.2.5

Operating System

macOS 13.3.1

Database and driver

PostgreSQL - any

Steps to reproduce

  1. Create posgrtess connection with default configuration
    image

  2. Edit that connection and go to Connection settings -> Shell Commands -> Before Connect and set and shell cmomand, which should work until terminated, for instance ping 8.8.8.8 and set Terminate process at disconnect to enabled.
    image

  3. Try to connect. Connection error should be shown, but script still running
    image

Additional context

Also unable to terminate processes via "Background tasks" panel

image

@Destrolaric
Copy link
Member

Destrolaric commented Nov 30, 2023

@jskvoll As a workaround, MacOS's ping is continuous if not specified otherwise. Can you try to add ping count for it to stop continuously pinging?

-c count Stop after sending (and receiving) count ECHO_RESPONSE packets.
If this option is not specified, ping will operate until interrupted.
If this option is specified in conjunction with ping sweeps, each sweep will consist of count packets.

@Destrolaric
Copy link
Member

Confirmed, thank you for report

@arhayka arhayka added this to the 23.3.4 milestone Nov 30, 2023
@jskvoll
Copy link
Author

jskvoll commented Dec 1, 2023

@jskvoll As a workaround, MacOS's ping is continuous if not specified otherwise. Can you try to add ping count for it to stop continuously pinging?

-c count Stop after sending (and receiving) count ECHO_RESPONSE packets.
If this option is not specified, ping will operate until interrupted.
If this option is specified in conjunction with ping sweeps, each sweep will consist of count packets.

Thank you for response! Ping was presented only for simple example, i detect this issue with my own script

@ShadelessFox ShadelessFox self-assigned this Jan 22, 2024
@arhayka arhayka modified the milestones: 23.3.4, 24.0.0 Jan 22, 2024
@arhayka arhayka added enhancement and removed bug labels Feb 19, 2024
@arhayka arhayka modified the milestones: 24.0.0, 24.0.3 Feb 19, 2024
@arhayka arhayka modified the milestones: 24.0.3, 24.0.5 Apr 3, 2024
@ShadelessFox ShadelessFox removed their assignment May 7, 2024
@serjiokov serjiokov self-assigned this May 7, 2024
@HocKu7 HocKu7 assigned HocKu7 and unassigned serjiokov May 16, 2024
@arhayka arhayka modified the milestones: 24.0.5, 24.1.0 May 19, 2024
@Matvey16 Matvey16 self-assigned this May 20, 2024
serge-rider pushed a commit that referenced this issue May 21, 2024
* #22020 Fix "before connect" not terminate after failing connect

* #22020 Fix "before connect" not terminate after failing connect
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment