Ask questions on the official Q&A site at https://ask.datomic.com!
pithyless 2021-06-22T11:35:16.291300Z

On a test environment, we're seeing this kind of log from the Datomic Peer:

;; ~5 hours CI inactive (if this is relevant)

DEBUG 2021-06-18T13:32:37.702 [clojure-agent-send-off-pool-23]: {:event :kv-cluster/get-val, :val-key "60a4cc9e-ac11-40fe-9bd0-582f8209a403", :phase :begin, :pid 7, :tid 225}

;; 15 minutes pass....

DEBUG 2021-06-18T13:48:25.091 [clojure-agent-send-off-pool-23]: {:event :kv-cluster/get-val, :val-key "60a4cc9e-ac11-40fe-9bd0-582f8209a403", :msec 947000.0, :phase :end, :pid 7, :tid 225}

;; This next one finishes in 21ms:

DEBUG 2021-06-18T13:48:25.094 [clojure-agent-send-off-pool-23]: {:event :kv-cluster/get-val, :val-key "60128f6d-25fb-41f0-a6c2-9c5e73267da7", :phase :begin, :pid 7, :tid 225}
DEBUG 2021-06-18T13:48:25.115 [clojure-agent-send-off-pool-23]: {:event :kv-cluster/get-val, :val-key "60128f6d-25fb-41f0-a6c2-9c5e73267da7", :msec 21.0, :phase :end, :pid 7, :tid 225}

;; and now we start processing the transacts that queued up when the tests started...

INFO  2021-06-18T13:48:25.117 [manifold-execute-43]: {:event :peer/transact, :uuid #uuid "60cca429-7908-49b1-82c8-56b50effb4ce", :phase :start, :pid 7, :tid 282}
DEBUG 2021-06-18T13:48:25.234 [clojure-agent-send-off-pool-24]: {:event :peer/accept-new, :id #uuid "60cca429-7908-49b1-82c8-56b50effb4ce", :phase :begin, :pid 7, :tid 226}
DEBUG 2021-06-18T13:48:25.234 [clojure-agent-send-off-pool-24]: {:event :peer/accept-new, :id #uuid "60cca429-7908-49b1-82c8-56b50effb4ce", :msec 0.462, :phase :end, :pid 7, :tid 226}
INFO  2021-06-18T13:48:25.235 [clojure-agent-send-off-pool-24]: {:event :peer/transact, :uuid #uuid "60cca429-7908-49b1-82c8-56b50effb4ce", :phase :end, :pid 7, :tid 226}
After those 15 minutes of waiting, the peer moved on and transacted all the transactions that happened to queue in the meantime, as if nothing happened. There do not seem to be any interesting or anomalous logs in the Transactor for this time period. Datomic Peer (1.0.6269) with Postgres storage. The peer and transactor are both running on Kubernetes, but Postgres is hosted outside of the k8s cluster. Any idea what could be going on with the :kv-cluster/get-val and how to go about debugging this further? Is there some timeout we can configure to avoid this kind of situation in a production environment?

Fabim 2021-06-22T20:30:24.292100Z

Hey, I just subscribed to Datomic Ions Solo for my pedestal project. On my fist ion-dev push I get the following error. Any suggestions of what I’m doing wrong? my deps.edn has io.pedestal/pedestal.jetty {:mvn/version "0.5.9"} and no jetty-util

Fabim 2021-06-23T13:03:03.301Z

@lanejo01 The deploy worked. Thanks for the tip. Reseting jetty in m2 solved it.

Joe Lane 2021-06-23T13:12:03.301800Z

Great to hear! Always happy to chat

Fabim 2021-06-23T13:13:28.302200Z

@lanejo01 I deployed and got a `.datomic-ions/`  folder. Can that folder be put into `.gitignore` , or does it need to be pushed with git?

Joe Lane 2021-06-23T13:23:43.302400Z

It can be ignored.

Fabim 2021-06-23T13:37:17.302600Z

@lanejo01 Thanks. When deploying I got a lot of dependency-conflicts. Is there a way to update the depencencies running in my datomic cloud or do I need to explicit use the old dependency versions in my deps.edn to get rid of that warning?

Joe Lane 2021-06-23T13:37:37.302800Z

The latter.

Joe Lane 2021-06-23T13:38:14.303Z

If you hit a conflict that you can't work around, contact support.

Fabim 2021-06-23T14:07:55.303700Z

@lanejo01 I am responding to a GET request on the API gateway mapped on a lambda with ring.util.response/resource-response to deliver the index.html but the css and js are blocked by the browser with Content Security Policy: The page's settings blocked the loading of a resource Is there a way to deliver a website with (pedestal)ion without errors?

Fabim 2021-06-23T19:13:16.308Z

I allowed some origins, as the forum suggested. Now I’m stuck with subfolders not being loaded. Happy to hear how you solved that https://clojurians.slack.com/archives/C03RZMDSH/p1624475471307800

Joe Lane 2021-06-23T20:03:46.308600Z

Are you running a local jetty server for development?

Fabim 2021-06-23T20:07:31.308800Z


Joe Lane 2021-06-23T20:08:21.309Z

And presumably the subfolders work with the same service-map?

Fabim 2021-06-23T20:08:24.309200Z

during development I use integrant

Fabim 2021-06-23T20:08:59.309500Z

the service map is different in development

Joe Lane 2021-06-23T20:09:19.309700Z

Can you diff them?

Fabim 2021-06-23T20:11:39.309900Z

this is the difference

(-> service
(dissoc ::http/chain-provider)
          ::http/join? false
          ::http/routes #(route/expand-routes (deref #'routes))
          ::http/secure-headers {:content-security-policy-settings
                                 {:default-src "'self'"
                                  :style-src "'self' 'unsafe-inline'"
                                  :script-src "'self' 'unsafe-inline'"}})

Fabim 2021-06-23T20:15:42.310400Z

should be the setup they do in peodestal-ions-sample

Fabim 2021-06-24T13:50:37.315100Z

@lanejo01 I have an idea what the problem was. thanks for your help

Joe Lane 2021-06-22T20:34:38.292500Z

@merklefabian You're not going to believe me, but I believe you have a corrupt, partially downloaded jetty-util jar in your local ~/.m2 directory. Delete the jetty-util jar (NOT your entire m2 directory) and then try to push again?

Fabim 2021-06-22T21:11:49.292800Z

@lanejo01 Thanks for your quick answer. I deleted it and now I get Syntax error (ClassNotFoundException) compiling at (cognitect/http_client.clj:1:1). org.eclipse.jetty.client.HttpClient when using datomic solo up. how do you recommend I reinstall jetty in m2?

Joe Lane 2021-06-22T21:13:13.293600Z

Delete the .cpcache in your project directory

Joe Lane 2021-06-22T21:13:51.294200Z

Beyond that I’d need to see your deps edn

Fabim 2021-06-22T21:16:53.294400Z

I deleted .cpcache. but got the same syntax error