xtdb

winkywooster 2024-12-29T15:15:38.218169Z

hey, i tried firing up xtdb2 via docker, and i’ve run into a couple of issues. i’m getting a 405 when curling /stats and the psql client fails to connect saying a database doesn’t exist.

fs42 2025-01-08T16:43:40.488069Z

Thanks for the pointer!

fs42 2025-01-06T23:30:01.919109Z

I also tried to use pgadmin-4 but it requires a username/password - tried xtdb/xtdb but that didn't work... (psql doesn't seem to require a login...(?))

seancorfield 2025-01-06T23:36:29.597469Z

There is no username/password needed (they're working on auth). You'll need to tell pgadmin-4 to connect without that (no idea how -- never used it).

fs42 2025-01-06T23:43:21.706689Z

I never used pgadmin-4 either - after installing postgres on Mac with brew, I couldn't find psql at first and tried pgadmin that was installed... but it insisted on a u/p and couldn't find a way to disable that requirement (?) - then I found psql burried deep down in the hidden macos-app directory... sigh.

winkywooster 2025-01-08T01:49:39.751899Z

@fs42 you can use the brew’s list command to see where something got installed. for example: brew list postgresql@16

winkywooster 2024-12-29T15:15:53.236189Z

-> docker run -it --pull=always -p 6543:3000 -p 5432:5432 

latest: Pulling from xtdb/xtdb
Digest: sha256:9925e3361fdd0fb2f42837a21f37d5127d3e086165191c139752bc3c1f745812
Status: Image is up to date for 
Starting XTDB 2.x @ 2.0.0-beta4 @ 5aafb16 ...
15:07:31 | INFO  xtdb.metrics | tagging all metrics with node-id: xtdb-node-e96fd0
15:07:31 | INFO  xtdb.pgwire | Server started on port: 5432
15:07:31 | INFO  xtdb.healthz | Healthz server started on port: 8080
15:07:32 | INFO  xtdb.server | HTTP server started on port: 3000
15:07:32 | INFO  xtdb.cli | Node started

winkywooster 2024-12-29T15:16:07.052669Z

-> curl -v 

* Host localhost:6543 was resolved.
* IPv6: ::1
* IPv4: 127.0.0.1
*   Trying [::1]:6543...
* Connected to localhost (::1) port 6543
> GET /status HTTP/1.1
> Host: localhost:6543
> User-Agent: curl/8.7.1
> Accept: */*
>
* Request completely sent off
< HTTP/1.1 405 Method Not Allowed
< Transfer-Encoding: chunked
< Server: Jetty(11.0.18)
<
* Connection #0 to host localhost left intact

winkywooster 2024-12-29T15:16:21.411159Z

-> psql -V

psql (PostgreSQL) 16.6 (Homebrew)

-> psql -h localhost -p 5432

psql: error: connection to server at "localhost" (::1), port 5432 failed: FATAL:  database 'eblood' does not exist

dharrigan 2024-12-29T16:26:35.082399Z

Seems like /status is a POST request

dharrigan 2024-12-29T16:27:45.162869Z

(docs need updating)

dharrigan 2024-12-29T16:29:21.576299Z

and psql -h localhost -p 5432 -d xtdb should get you connected.

dharrigan 2024-12-29T16:29:34.535939Z

(docs need updating)

winkywooster 2024-12-29T16:59:44.366009Z

💥

winkywooster 2024-12-29T16:59:46.344329Z

that worked

winkywooster 2024-12-29T16:59:59.480379Z

thanks for the quick response @dharrigan

➕ 1
dharrigan 2024-12-29T18:00:30.049969Z

np 🙂 Enjoy! 🙂

seancorfield 2024-12-29T18:33:34.350789Z

The change to require a database name (and the database name being xtdb) is a fairly recent change. I had to update usermanager and next.jdbc for that.

👍 1