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 8.0: impossible to specify PostgreSQL client home #988

Closed
ced75 opened this issue Nov 21, 2016 · 57 comments
Closed

DBeaver 8.0: impossible to specify PostgreSQL client home #988

ced75 opened this issue Nov 21, 2016 · 57 comments
Labels
Milestone

Comments

@ced75
Copy link

ced75 commented Nov 21, 2016

Hi,

I'm testing the new DBeaver release 8.0 on Linux Mint 17.3.
When I try the new "Backup database" tool, I have a message on top of the "Database backup" window displaying: "Client home is not specified for connection".

So, I edit my connection. There, I suppose the client home can be defined with "Local Client" combobox.
I clic on "Browse...", then on "Add home" and I select the repository where my local PostgreSQL binaries are on my computer.
When I validate, nothing appears in the window. The fields ID, Path, Name, etc. can not be filled in.

I have the same problem in the PostgreSQL driver interface.

What am I doing wrong?

Thanks for your help.
Regards,

Cedric

@serge-rider serge-rider added this to the 3.8.1 milestone Nov 21, 2016
@serge-rider
Copy link
Member

PostgreSQL native tools seems to be working only on Windows machines in this version (where native client home is taken from Windows registry).
Will be fixed (and improved) in 3.8.1.
Thanks for report.

@skif-sarmat
Copy link

It doesn't work on Windows 10 too. The behavior is similar to the behavior in the first message.

@serge-rider
Copy link
Member

It works only if you have installed PG using windows installer (and thus you have some information in registry). Anyhow this will be fixed in the next version.

@phouverneyuff
Copy link

phouverneyuff commented Feb 20, 2017

This error continues occur in Ubuntu 16.04 on export database using DBEaver 4.0

image

@serge-rider
Copy link
Member

You can configure PG client home in connection setting dialog.
Click on Local client combo->Browse->Add home->/usr/bin (or other location where psql/pg_dump/pg_restore reside).

@Gallaecio
Copy link

Gallaecio commented Mar 17, 2017

With DBeaver installed at /home/<username>/software/dbeaver, and executing DBeaver from a terminal to see the output, when I try to add /usr/bin as client home nothing happens on the GUI and the terminal shows:

Home '/usr/bin' is not supported

Is that expected?

@hollerith
Copy link

Try running which pg_dump - or try /opt/PostgreSQL/9.6/bin

@Gallaecio
Copy link

$ which pg_dump
/usr/bin/pg_dump

@filosssof
Copy link

I'm sorry for the stupid question, but where is the ... client combo in 4.0.8 version?

@serge-rider
Copy link
Member

image

@lukaseder
Copy link

Stumbling upon this, could that local client setting perhaps be pointed out in the error message to help future users find this setting? I keep forgetting this as I upgrade PostgreSQL to newer versions and delete the older versions...

@ducdigital
Copy link

image

image

For those who cannot find this dropdown box. I admit the UI is not very welcoming.
A link to open connection setting directly would be the best. Also, maybe a clearer error message?

@kshitijahuja
Copy link

Now that I was able to find the Edit Connection, the Add Home does not allows to input text url. Instead, we have to choose a path by browsing. My Mac does not shows the hidden usr directory in that dropdown despite turning on to view the hidden files.

@brian-lamb-software-engineer
Copy link

on my mac, i had to brew install postgres, then which pg_dump which was /usr/local/bin/pg_dump. So then add home /usr/local/bin to the connection under Connection settings tab, Local Client. Note when you browse for the path, you need to press cmd + shift + . to expose hidden files to see the usr directory.

@lherreranetlink
Copy link

@kshitijahuja were you able to find a solution ? If so, what was it?

@kshitijahuja
Copy link

@kshitijahuja were you able to find a solution ? If so, what was it?

Nope.

@minthaka
Copy link

You only need to select the home folder for the postgres tools. On Linux I had to select /usr/bin , where the installed pg_dump resides.

@adamchenwei
Copy link

@brian-lamb-software-engineer solution worked perfectly! Thanks

@mbasaglia
Copy link

I'm getting similar issues, I've set the client home as /usr/bin but end up getting the error

2020-01-30 11:01:44.712 - IO error: Utility 'pg_dump' not found in client home '/usr/bin' (/usr/bin)

The path is correct though

$ which pg_dump
/usr/bin/pg_dump
$ ls -l /usr/bin/pg_dump
lrwxrwxrwx 1 root root 37 Nov 13 16:15 /usr/bin/pg_dump -> ../share/postgresql-common/pg_wrapper

@chris-crawford
Copy link

chris-crawford commented Feb 24, 2020

Now that I was able to find the Edit Connection, the Add Home does not allows to input text url. Instead, we have to choose a path by browsing. My Mac does not shows the hidden usr directory in that dropdown despite turning on to view the hidden files.

@kshitijahuja cmd+shift+g within the finder window allows for direct folder input -- I ran through this post and was successfully able to point to my bin directory for postgres install (mine was installed via Brew, so is in usr/local/Cellar/postgresql/10.5/bin )

@alexorbit
Copy link

alexorbit commented Mar 10, 2020

How to set native app on Mac:
Download Postgres.app latest release
https://postgresapp.com/downloads.html
Move to applications folder.

Setup home folder:
Connection settings => Local Client
applications folder => Postgres.app/Resources/Versions/xx/bin

@thanhdx0
Copy link

thanhdx0 commented Apr 11, 2020

I can't set client home to /usr/bin on ubuntu 19.04 because of permission denied error when I choose /usr folder in file browser.
How can I do? I'm using DBearve-ce 7.0.2 and install DBeaver by snap.

@ingmferrer
Copy link

I can't set client home to /usr/bin on ubuntu 19.04 because of permission denied error when I choose /usr folder in file browser.
How can I do? I'm using DBearve-ce 7.0.2 and install DBeaver by snap.

Im having this exact problem in ubuntu 20.04, cannot set /usr/bin/ because denied permissions.

@jelnur
Copy link

jelnur commented Apr 25, 2020

Now that I was able to find the Edit Connection, the Add Home does not allows to input text url. Instead, we have to choose a path by browsing. My Mac does not shows the hidden usr directory in that dropdown despite turning on to view the hidden files.

If you installed Postgres.app the path is like this:
/Applications/Postgres.app/Contents/Versions/11/bin

@rtriveurbana
Copy link

I can't set client home to /usr/bin on ubuntu 19.04 because of permission denied error when I choose /usr folder in file browser.
How can I do? I'm using DBearve-ce 7.0.2 and install DBeaver by snap.

Im having this exact problem in ubuntu 20.04, cannot set /usr/bin/ because denied permissions.

same problem

@JOSERUIZ7
Copy link

The same thing happens to me, what can I do?

@bratislavml
Copy link

For the Ubuntu permission issue: This issue is related with the Snap version of dbeaver, the one installed through Ubuntu Software. I managed to resolve the issue by uninstalling it, downloading the installer from https://dbeaver.io/download/ and running sudo dpkg -i dbeaver-ce_7.1.0_amd64.deb (the current version)

This version has access to the usr folder.

This doesn't work for me on Ubuntu 18.04, I can access /usr/bin/ but no permissions for pg_dump.

@josemateuss
Copy link

Same problem here

@pleshevskiy
Copy link

I also cannot set /bin or /usr/bin as client home. I tried to make link to user home via ls -s /usr/bin/pg_dump ~/pg_dump and it also not work

@kseniiaguzeeva
Copy link

Please create a new ticket for this issue

@embojker
Copy link

I've spent an hour trying to figure out how to open a location /usr/local/bin in the Browse dialog window in Mac... until I found here the key combination (posted by @brian-lamb-software-engineer).

Everyone using Mac would have to press Command + Shift + . (dot) to be able to see ALL the directories in the Browse dialog. Afterwards it is an easy pick. Just open the folder you got as the result of which pg_dump execution.

Cheers!

@Artofaj
Copy link

Artofaj commented Sep 24, 2020

I also cannot set /bin or /usr/bin as client home. I tried to make link to user home via ls -s /usr/bin/pg_dump ~/pg_dump and it also not work

I can confirm this issue.

@tcampbPPU
Copy link

For those on running Ubuntu and having an issue with setting the Local Client for Postgres to the '/usr/bin' through the file selector GUI I have had the same issue. I order to fix, you cannot install the DBeaver from Snap store directly instead, install via the CLI, via the following:

Make you have Java and JDK
$ java -version

Add Debian repository and Install DBeaver CE
$ wget -O - https://dbeaver.io/debs/dbeaver.gpg.key | sudo apt-key add -
$ echo "deb https://dbeaver.io/debs/dbeaver-ce /" | sudo tee /etc/apt/sources.list.d/dbeaver.list

After adding the repo, update the apt list and install DBeaver CE
$ sudo apt update
$ sudo apt -y install dbeaver-ce

Hopefully this helps anyone struggling :)

@yckbilly1929
Copy link

yckbilly1929 commented Nov 29, 2020

For those on running Ubuntu and having an issue with setting the Local Client for Postgres to the '/usr/bin' through the file selector GUI I have had the same issue. I order to fix, you cannot install the DBeaver from Snap store directly instead, install via the CLI, via the following:

Make you have Java and JDK
$ java -version

Add Debian repository and Install DBeaver CE
$ wget -O - https://dbeaver.io/debs/dbeaver.gpg.key | sudo apt-key add -
$ echo "deb https://dbeaver.io/debs/dbeaver-ce /" | sudo tee /etc/apt/sources.list.d/dbeaver.list

After adding the repo, update the apt list and install DBeaver CE
$ sudo apt update
$ sudo apt -y install dbeaver-ce

Hopefully this helps anyone struggling :)

can confirm that Permission denied issue exists for snap version in Ubuntu 20.10

current workaround is switching back to apt like the above

@foxbit19
Copy link

foxbit19 commented Dec 4, 2020

Unfortunately, public key is outdated.
No way to use snap version with pg_dump.
I've managed using this link: https://dbeaver.io/debs/dbeaver-ce/ to download the .deb package.

@OzzyTheGiant
Copy link

It's definitely proven to be hard to use the snap version of DBeaver to restore. Heck, I don't even trust it to restore CSV files as it messed up my boolean data once. Use pgAdmin instead. Be sure that if you do a back up, try doing it as a TAR file, as the plain format doesn't work since pg_restore complains about it being an SQL file, forcing you to use psql, but then psql complains about null values being written as \N, which was basically a dead end for me. PgAdmin works better with TAR files for restores.

@LeandroRezendeCoutinho
Copy link

Same problem on OpenSuse Tumbleweed.
Postgres client already installed.
image
image

@MatthausNawan
Copy link

awesome @brian-lamb-software-engineer , all that works!

@EltonCarreiro
Copy link

Unfortunately, public key is outdated.
No way to use snap version with pg_dump.
I've managed using this link: https://dbeaver.io/debs/dbeaver-ce/ to download the .deb package.

Confirming, I had permission issues when trying to specify the pg_dump but unfortunately snap version doesn't work, so I've installed the .deb package directly from the DBeaver site and it worked! 🎉

@slash851
Copy link

For those using Ubuntu 20.10
I had the same problem with permissions when using DBeaver insalled from Ubuntu Software (snap version)

Solution that works for me:

  1. Uninstall snap version of DBeaver from Ubuntu Software panel.
  2. Go to: https://dbeaver.io/download/
  3. Download DEB Linux Debian package 64 bit (installer) (https://dbeaver.io/files/dbeaver-ce_latest_amd64.deb)
  4. Simply double click to Install downloaded package via Ubuntu Software

image

With newly installed version I can modify the Home Path:

image

@foxbit19
Copy link

Yes, I've done it exactly in that way and it works!
We have to forgot the snap edition for now.

@abinhho
Copy link

abinhho commented Nov 23, 2021

This worked for me.
Mac M1 but I think Intel chip should work as well.

$ brew install libpq

Then add /opt/homebrew/opt/libpq/bin to Local Client
image

@paladini
Copy link

For those using Ubuntu 20.10 I had the same problem with permissions when using DBeaver insalled from Ubuntu Software (snap version)

Solution that works for me:

  1. Uninstall snap version of DBeaver from Ubuntu Software panel.
  2. Go to: https://dbeaver.io/download/
  3. Download DEB Linux Debian package 64 bit (installer) (https://dbeaver.io/files/dbeaver-ce_latest_amd64.deb)
  4. Simply double click to Install downloaded package via Ubuntu Software

I was facing the same issue in Ubuntu too and this comment solved my problem.

Also, for the step (1) you can uninstall Dbeaver (Snap Version) via Terminal:

sudo snap remove dbeaver-ce

Thanks for the tip, mate!

@krzysztofjeziorny
Copy link

My experience on Debian 11 Bullseye, I had DBeaver installed with Flatpak. Trying to add a Native Client home for a Postgresql client located in /usr/bin, it changed this path into /run/user/1000/doc/ff43939c/bin and then didn't find the binaries.

I've downloaded the 'normal' zip package to extract, it works as intended with pg_dump and pg_restore.

@Destrolaric
Copy link
Member

@krzysztofjeziorny, Hi we investigated this issue sometime before, unfortunately, it's a flatpack issue. A workaround can be found here #5008

@m4ss1m0g
Copy link

Anyone knows if is possible to change the Name field on the form (which is then displayed on the combo), on Win this field is read-only. Maybe editing a settings file...

@JuinEsp
Copy link

JuinEsp commented May 31, 2022

For the Ubuntu permission issue: This issue is related with the Snap version of dbeaver, the one installed through Ubuntu Software. I managed to resolve the issue by uninstalling it, downloading the installer from https://dbeaver.io/download/ and running sudo dpkg -i dbeaver-ce_7.1.0_amd64.deb (the current version)

This version has access to the usr folder.

Para mim, isso serviu muito bem.

@fawazahmed-yara
Copy link

image

Thanks @serge-rider for this. This worked for me to create a dump.
Had to enable hidden files (cmd + shift + .) to select libpq/bin path

Then to restore db, had to use this cmd:
psql -U username -p 5432 -h 10.10.10.1 -d database < db.dump

@vanduc1102
Copy link

on MAC, it will be 100x faster if we can input the path directly, instead of browsing 😢

@cyberdude
Copy link

on my mac, i had to brew install postgres, then which pg_dump which was /usr/local/bin/pg_dump. So then add home /usr/local/bin to the connection under Connection settings tab, Local Client. Note when you browse for the path, you need to press cmd + shift + . to expose hidden files to see the usr directory.

It would be nice if you can add a field to input it manually. Finder explorer doesn't have all the hidden files exposed by default

@johnny68
Copy link

on my mac, i had to brew install postgres, then which pg_dump which was /usr/local/bin/pg_dump. So then add home /usr/local/bin to the connection under Connection settings tab, Local Client. Note when you browse for the path, you need to press cmd + shift + . to expose hidden files to see the usr directory.

Someone needs to add this to the official documentation for MacOS. this is the third time I forgot the keystrokes and had to find this particular comment.

@girgirius
Copy link

For those using Ubuntu 20.10 I had the same problem with permissions when using DBeaver insalled from Ubuntu Software (snap version)

Solution that works for me:

  1. Uninstall snap version of DBeaver from Ubuntu Software panel.
  2. Go to: https://dbeaver.io/download/
  3. Download DEB Linux Debian package 64 bit (installer) (https://dbeaver.io/files/dbeaver-ce_latest_amd64.deb)
  4. Simply double click to Install downloaded package via Ubuntu Software

image

With newly installed version I can modify the Home Path:

image

Worked for me! Thanks :) that was definitely permission issue

@mauriau
Copy link

mauriau commented Jul 5, 2023

I'm on ubuntu, so the most simple way for me, was to uninstall dbeaver from snap and install it with the native package

@safejace
Copy link

adding a comment in 2024 that the snap package is still not working!! why does canonical/ubuntu force these packages when they can't even figure out simple permission/access like this?!?

@mroeling
Copy link

mroeling commented Apr 3, 2024

adding a comment in 2024 that the snap package is still not working!! why does canonical/ubuntu force these packages when they can't even figure out simple permission/access like this?!?

Same with the Flatpak version. That also does not work. Only solution atm that does work, is using the .deb package.

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

No branches or pull requests