Fork me on GitHub
#tools-deps
<
2022-04-28
>
baptiste-from-paris08:04:35

hello friends, I struggle for a while now making my private s3 maven repo work on ec2. Basically • private maven s3 repo with our jar • clj with desp & s3 works locally • mvn with s3 deps work on ec2 • clj with s3 does not work on ec2 • I can aws s3 ls in ec2 • clj cli is 1.11.1.1113 I can’t find why, it’s not an authorisation issue as I made it work with mvn. It should not be a clj issue as it works locally..

baptiste-from-paris08:04:57

if anyone has an idea…

dharrigan09:04:51

Can you expand upon what doesn't work for clj with s3? (let's take this to a thread)

baptiste-from-paris10:04:10

Ok, finally find it and it’s very tricky because the error message is misleading I tried my infra on an ec2 t3.nano with only 512mb of memory. The jar file is around ~100mb so because file is kept in memory contrary to mvn, it could not download the jar. And the error message was not the good one (could not find the jar on maven…)

Alex Miller (Clojure team)11:04:21

Well if there is something I can improve, would be happy to look at it, but there's no info to go on here

baptiste-from-paris12:04:38

The underlying error when I tried to do a

(aws/invoke s3-client {:op :GetObject
                         :request {:Bucket "bucketname"
                                   :Key "/path/to/jar"}})

baptiste-from-paris12:04:00

it looks like it’s part of cognitect.http-client

baptiste-from-paris12:04:30

the user error was Error building classpath. Could not find artifact name/of/artifact

baptiste-from-paris12:04:45

the exception must be caught somewhere

Alex Miller (Clojure team)12:04:20

Yeah might be worth an issue on aws-api

Alex Miller (Clojure team)12:04:59

Or tools.deps, not sure where exactly something is being overcaught

Alex Miller (Clojure team)12:04:54

I assume this is using cli to get a jar from s3 repo which uses aws-api which uses http-client and that's where the oome happens

Alex Miller (Clojure team)12:04:48

If you can drop something about this at https://ask.clojure.org I will take a look when I get a chance, I'm out of office today

baptiste-from-paris12:04:10

👌 will do at the end of the day