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

DuckDB failed to download extension "httpfs" #747

Open
grieve54706 opened this issue Aug 15, 2024 · 0 comments
Open

DuckDB failed to download extension "httpfs" #747

grieve54706 opened this issue Aug 15, 2024 · 0 comments

Comments

@grieve54706
Copy link
Contributor

grieve54706 commented Aug 15, 2024

TL;DR

DuckDB could not connect to DuckDB's download extensions web.

Description

The error message

java.util.concurrent.CompletionException: java.lang.RuntimeException: java.sql.SQLException: java.sql.SQLException: Extension Autoloading Error: An error occurred while trying to automatically install the required extension 'httpfs':
Failed to download extension "httpfs" at URL "http://extensions.duckdb.org/v1.0.0/linux_amd64_gcc4/httpfs.duckdb_extension.gz"
Extension "httpfs" is an existing extension.
(ERROR Connection)
        at java.base/java.util.concurrent.CompletableFuture.encodeThrowable(CompletableFuture.java:315)
        at java.base/java.util.concurrent.CompletableFuture.completeThrowable(CompletableFuture.java:320)
        at java.base/java.util.concurrent.CompletableFuture$AsyncRun.run(CompletableFuture.java:1807)
        at java.base/java.util.concurrent.CompletableFuture$AsyncRun.exec(CompletableFuture.java:1796)
        at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:387)
        at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1312)
        at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1843)
        at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1808)
        at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:188)
Caused by: java.sql.SQLException: Extension Autoloading Error: An error occurred while trying to automatically install the required extension 'httpfs':
Failed to download extension "httpfs" at URL "http://extensions.duckdb.org/v1.0.0/linux_amd64_gcc4/httpfs.duckdb_extension.gz"
Extension "httpfs" is an existing extension.
(ERROR Connection)
        at org.duckdb.DuckDBNative.duckdb_jdbc_prepare(Native Method)
        at org.duckdb.DuckDBPreparedStatement.prepare(DuckDBPreparedStatement.java:116)
        ... 17 more

We traced the source code of DuckDB. We found the Failed to download extension is where.
https://github.com/duckdb/duckdb/blob/709a18da59afd565dc73e62cbfe901634a6c3100/src/main/extension/extension_install.cpp#L415-L425
Above the code, we can see the break when the request status is 200. On the contrary, DuckDB downloads the extension failed, so we can see the error message.

The message Extension "httpfs" is an existing extension is a mistake from DuckDB. They prepare the message only by taking the default extension list(internal_extensions) to check the extension will be installed is in the list. But actually, DuckDB does not install httpfs by default.

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

1 participant