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.
Thanks for the pointer!
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...(?))
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).
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.
@fs42 you can use the brew’s list command to see where something got installed. for example: brew list postgresql@16
-> 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
-> 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
-> 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
Seems like /status is a POST request
(docs need updating)
and psql -h localhost -p 5432 -d xtdb should get you connected.
(docs need updating)
💥
that worked
np 🙂 Enjoy! 🙂
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.