DuckDB JDBC 1.2.0 in DBeaver 25.0.0 cannot connect to db file due to permission errors

Open
#154 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
30/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Stale
Tech stack
java, ubuntu
Domain
databases

Research direction

Start by reproducing the connection failure with duckdb_jdbc-1.2.0.jar in DBeaver 25.0.0 on Ubuntu 24.04, using the reported memory.max path and permission error. Compare the DuckDB connection with the working PostgreSQL connections; done means the database files connect without the permission-denied failure.

Written by the indexing model from the issue text.

Description

Hello,
In December, I created a DuckDB database file using a Python script, that was opening fine using DBeaver driver for DuckDB (not sure which version it was). Recently, I switched from Ubuntu 23 to Ubuntu 24.04 and installed everything again. But now I cannot open the database file because of a permission-denied error in what could be a file related to the driver:

IO Error: Cannot open file "/sys/fs/cgroup//user.slice/user-1000.slice/user@1000.service/app.slice/snap.dbeaver-ce.dbeaver-ce-e26959df-6457-4254-b306-2f6306c55a92.scope/memory.max": Permission denied

I can see that the file and folders exist:

$ ll /sys/fs/cgroup//user.slice/user-1000.slice/user@1000.service/app.slice/snap.dbeaver-ce.dbeaver-ce-e26959df-6457-4254-b306-2f6306c55a92.scope/memory.max
-rw-r--r-- 1 fossandon fossandon 0 Mar  3 18:20 '/sys/fs/cgroup//user.slice/user-1000.slice/user@1000.service/app.slice/snap.dbeaver-ce.dbeaver-ce-e26959df-6457-4254-b306-2f6306c55a92.scope/memory.max'

However, the permission part is not working for DBeaver, so it fails to connect to my database file. I'm sure that is not the database file's fault, since I tried a few different ones and all got the same error.

A forced reinstallation of the driver (duckdb_jdbc-1.2.0.jar) did nothing. Other connections to Postgres databases are working fine, so it seems related to the DuckDB driver.

The file permission above seems fine unless DBeaver or the Driver somehow uses a different user than mine, or it's something else.

Dominant language
C++
Stars
127
Forks
80
Avg merge
13h 41m
Merged PRs (30d)
44

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from duckdb/duckdb-java

All issues in duckdb/duckdb-java

Similar issues

More C++ issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.