Fork me on GitHub
#biff
<
2022-09-14
>
macrobartfast07:09:10

Appreciation for how you put together such succinct system management in Biff, including a shout out to Component in the docs. 👍

👍 2
macrobartfast21:09:47

I’ll try it out on a biff project to to check it out.

Jacob O'Bryant22:09:10

that looks handy

Jesse22:09:05

Hi all. I have some trouble using XTDB with JDBC. The default connecting string template :biff.xtdb.jdbc/jdbcUrl ":port/database?sslmode=require and :biff.xtdb/topology :jdbc gives me an error:

Execution error (SQLException) at java.sql.DriverManager/getDriver (DriverManager.java:298).
No suitable driver
If I change the connecting string to "jdbc::port/database" I get a bit further but it throws a different error:
...
Caused by: java.net.UnknownHostException: user:[email protected]
...

Jesse22:09:23

I'll do more debugging, but if someone could show me what the connecting string should look like that would help. I'm running on a DO droplet and connecting to a managed postgres database. I'm able to connect to the database from the droplet using the command line psql

Jacob O'Bryant22:09:50

looking into this now

Jacob O'Bryant22:09:53

Try commenting out the jdbcUrl line in your config and instead add these keys:

:biff.xtdb.jdbc/dbname "..."
:biff.xtdb.jdbc/user "..."
:biff.xtdb.jdbc/password "..."
:biff.xtdb.jdbc/host "..."
:biff.xtdb.jdbc/port ...
Does that work?

Jacob O'Bryant22:09:01

That's what I'm doing in my own project. I later switched Biff's example project to use the jdbcUrl param instead in order to make the config smaller. I followed the template in DO's database config page--wasn't aware that the jdbc: is needed, and I guess that's what I get for not testing things 🙂 So I'll update the template config; but as for the second error, I'm not sure, assuming you pasted the host in exactly without typos...

Jesse07:09:44

Hi Jacob. Thank you! That works perfectly 🙌

Jesse07:09:44

Not sure what is going wrong with the JDBC url. The error makes it looks like it's passing the username:password@ as part of the host name. If I find out more I'll let you know. But I actually prefer to split it up like this 🙂

Jacob O'Bryant16:09:19

Very interesting! I'll just switch the template config to do that then.

macrobartfast23:09:54

I have asked about this but forgotten: are there disadvantages for using reserved IPs in DO?

macrobartfast23:09:38

The advantage is one can destroy a droplet and build a new one without waiting for DNS to propagate.

macrobartfast23:09:50

I think there may be cert issues with them, though.

Jacob O'Bryant23:09:19

not sure, I've never used them/thought about them

macrobartfast23:09:43

All good… diving in and I’ll report back!

Jacob O'Bryant23:09:46

👍👍 I can't think of any reasons there would be cert issues fwiw

macrobartfast23:09:02

on a new DO Biff droplet setup, just got this, which I’ve never had before…

macrobartfast23:09:40

the blue color is just because I had accidentally clicked on that item; disregard

macrobartfast23:09:17

Presuming it’s alright to just OK it.

Jacob O'Bryant23:09:46

yeah, just go with the defaults on any dialogs. I should probably put a note about that in the docs.

Jacob O'Bryant23:09:05

I ran into this one recently too