Fork me on GitHub
#datomic
<
2021-11-12
>
donavan13:11:31

Has anyone seen this error before when creating an Ions client:

{
    "Type": "java.lang.AssertionError",
    "Message": "Assert failed: cfg",
    "At": [
        "datomic.cloud.client.local$create_client",
        "invokeStatic",
        "local.clj",
        171
    ]
}
d/client is being passed what I think is the correct options, something like:
{
    "ServerType": "Ion",
    "Region": "region",
    "System": "system-name",
    "Endpoint": ""
}
☝️ is from CloudWatch logs… the real value is edn

jaret13:11:13

Hey @U0VP19K6K does your endpoint really have the proxy port? If you're in cloud your ion won't need the proxy port. What version of Datomic Cloud are you using?

jaret13:11:58

I would audit all your ion calls to client and make sure they are all valid. And confirm you don't have dev-local or on-prem api's deployed with your code.

donavan13:11:36

We’re a bit old 616-8879 (upgrading is another task)

donavan13:11:22

I’m busy refactoring so I may well have mangled the config.

donavan13:11:53

Sorry, TBC I get the above error when creating the client

donavan13:11:07

@U1QJACBUM does datomic.cloud.client.local$create_client seem to imply that dev-local dep is ending up in the classpath (that final .local)?

donavan15:11:25

The Cloudformation EndpointAddress output matches what I posted above, i.e. it includes the port

donavan16:11:57

When you say “don’t have dev-local or on-prem api’s deployed with your code” you mean they’re not included in our deps.edn and are thus not in the classpath on the ion instance then I think I can confirm that they are not. I found a classpath printout in the “IonHttpDirectStarted” event and they do not appear there (though I couldn’t find any client api dep at all though)

jaret15:11:37

@U0VP19K6K sorry! The endpoint should be correct for your version. Can you share your deps.edn?

jaret15:11:46

Also does this error happen when you deploy and get a client, or when you try to get a client after deployed? Can you use the same map to connect locally? Do you get the map from env vars?

jaret15:11:59

I suspect that get-param might not be returning what you expect.

donavan09:11:32

Thanks Jaret. If anyone comes across this, it’s addressed here https://docs.datomic.com/cloud/troubleshooting.html#assert-failed

Benjamin16:11:59

Jo what is a good way to get data from a python program into datomic cloud? The rest api is legacy, right?

Benjamin16:11:26

nvm I'm going back to the drawing board concerning the python part 😛

ghadi16:11:16

you can always deploy a datomic Ion that transacts information, then invoke it from python

👍 1
ghadi16:11:46

as in over http, lambda, or hooking up the ion to a sqs queue - the world is your oyster

👀 1
ghadi16:11:11

but you can't / shouldn't want to connect to datomic cloud directly from python

ghadi16:11:30

btw the rest API was an on-prem (not cloud) facility