question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Adding junixsocket to DBeaver

See original GitHub issue

Describe the bug As mentioned in https://github.com/dbeaver/dbeaver/issues/10701#issuecomment-913148861 , the official com.kohlschutter.junixsocket fork of junixsocket is incompatible with DBeaver, while no.fiken.oss.junixsocket is compatible. I just checked this with DBeaver 22.2.2 (latest), and I can confirm that’s still the case. no.fiken.oss.junixsocket is at version 1.0.2.

Is this an issue that can be overcome? It’s not a problem (yet), but I couldn’t find evidence if you’re even aware of the issue.

The post above mentions (no.fiken compared to com.kohlschutter):

following the official postgres jdbc documentation

Which sounds suspicious. Do you think the issue is strictly within the DBeaver scope? My use case: Now I have internal (DSL client-server) IPC using junixsocket 2.5.2 communication, I’m exploring UDS connections to PostgreSql within our framework as well (it’s currently using networking IPC on localhost). It follows I’ll be using the same junixsocket jar for both UDS’s.

Environment:

  • OS: Linux
  • Distribution: Ubuntu 22.04
  • Version: 2.5.2

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
kohlschuettercommented, Oct 13, 2022

I just verified that DBeaver 22.2.2 can connect to PostgreSQL 14.5 with junixsocket 2.5.2:

Server: Connect by: URL URL: jdbc:postgresql://localhost/postgres

Driver properties: socketFactory: org.newsclub.net.unix.AFUNIXSocketFactory$FactoryArg socketFactoryArg: /tmp/.s.PGSQL.5432 sslmode: disable

I added junixsocket via “Edit Driver Settings / Libraries” to the PostgreSQL driver: I used “Add Artifact”. I added the following two artifacts (separately):

<dependency>
  <groupId>com.kohlschutter.junixsocket</groupId>
  <artifactId>junixsocket-common</artifactId>
  <version>2.5.2</version>
</dependency>

and

<dependency>
  <groupId>com.kohlschutter.junixsocket</groupId>
  <artifactId>junixsocket-native-common</artifactId>
  <version>2.5.2</version>
</dependency>

I tried

<dependency>
  <groupId>com.kohlschutter.junixsocket</groupId>
  <artifactId>junixsocket-core</artifactId>
  <version>2.5.2</version>
  <type>pom</type>
</dependency>

but it seems that DBeaver has a problem with POM-only dependencies, complaining about a missing jar file.

Was that maybe the issue?

0reactions
kohlschuettercommented, Oct 13, 2022

The POM-issue is tracked by DBeaver via https://github.com/dbeaver/dbeaver/issues/13048, however no current milestone is set.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Add junixsocket to your project
Below are instructions how to add junixsocket via Maven, Gradle, ... To use junixsocket with DBeaver, for example to connect to PostgreSQL ...
Read more >
Support unix socket connections with junixsocket · Issue #10701
Problem dbeaver cannot connect to a local database over a unix socket. ... Adding junixsocket to DBeaver kohlschutter/junixsocket#120.
Read more >
Connecting DBeaver to remote PostgreSQL DB via Unix socket
To attempt to do so, I first created ssh keys without passphrases on the Windows PC for both my_username and psql_user and added...
Read more >
How to create a database connection in DBeaver
DBeaver allows you to work with all popular databases. The first thing you have to do is to create a connection. Our app...
Read more >
Can't Change Lower_Case_Table_Names In Mysql 8.0.15 For ...
I want enable lowercase table names so i have added to etc/mysql/my. ... two Download the latest release from the junixsocket repository at...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found