Welcome! Please see the About page for a little more info on how this works.

0 votes
in dev-tools by
edited by

Evaling

  (dl/import-cloud {:source {:server-type :ion
                             :region      "us-east-2"
                             :system      "grow"
                             :endpoint    "http://entry.grow.us-east-2.datomic.net:8182/"
                             :db-name     "test"}
                    :dest   {:server-type :dev-local
                             :system      "grow-imports"
                             :db-name     "test-foo"}})

results in

1. Unhandled clojure.lang.ExceptionInfo
   Unable to connect to http://entry.grow.us-east-2.datomic.net:8182/
   {:cognitect.anomalies/category :cognitect.anomalies/not-found,
    :cognitect.anomalies/message
    "entry.grow.us-east-2.datomic.net: Name or service not known",
    :config
    {:server-type :cloud,
     :region "us-east-2",
     :system "grow",
     :endpoint "http://entry.grow.us-east-2.datomic.net:8182/",
     :db-name "test",
     :endpoint-map
     {:headers {"host" "entry.grow.us-east-2.datomic.net:8182"},
      :scheme "http",
      :server-name "entry.grow.us-east-2.datomic.net",
      :server-port 8182}}}

The log info from running the datomic client ./datomic-cli/datomic-access client grow shows me that "name" or "service" mentioned is the one i'm connected to:

debug1: channel 2: free: direct-tcpip: listening port 8182 for
entry.grow.us-east-2.datomic.net port 8182, connect from 127.0.0.1
port 49734 to 127.0.0.1 port 8182, nchannels 3

I can also create a cloud client and list the database in question:

  (d/list-databases client {})


  ;; => (
  ;;     "test"
)

other observations:

  1. From the docs, one possibility is that I have an open connection to the datbabase somehow. I dropped my connection and the error remains.
  2. I'm using a solo topology.
  3. Maybe i have to pass my auth information directly. That is, its not getting picked up from the default file. i tried adding a cred-profile to point directly at my creds profile file. no change.
  4. at some point the docs started using :cloud instead of :ion for server-type. No idea what difference that makes.

1 Answer

0 votes
by
selected by
 
Best answer

Hi Drew,

I think your map is missing the proxy-port if you're going through a proxy (i.e. client access):

(dl/import-cloud
  {:source {:system "systemname"
            :db-name "test"
            :server-type :ion
            :region "us-east-1"
            :endpoint "http://entry.systemname.us-east-1.datomic.net:8182/"
            :proxy-port 8182}
   :dest {:system "systemname"
          :server-type :dev-local
          :db-name "test-foo"}})

If you're not going through a proxy and adding the port still results in an error... What do you have listed as your storage-dir in ~/.datomic/dev-local.edn? What version od dev-local are you using? As a test, can you create a dev-local client and DB with your current config there:

(def client (d/client { :server-type :dev-local
                                         :system      "grow-imports"}))
(d/create-database client {:db-name "test1"})
(d/list-databases client {})

Let me know what you get from that, mainly curious to validate that your :storage-dir is being respected and used.

by
Missing proxy port was the issue.
...