Unable to connect to remote datomic (mysql)

Sabre has thus far run on the same Linode as Datomic, creating some contention over resources. To rememdy this, I cloned the Linode to a new VPS, deleted the Sabre App and granted the MySQL user rights to accept foreign connections.

In the Sabre App (on the original machine) I changed the datomic-uri to

datomic:sql://datomic?jdbc:mysql://176.22.28.222:3306/?user=&password=

When the app is restarted, it begins by establishing a connection calling d/connect, but now that returns:

Feb 08 02:07:55 archlinux lein[5462]: Caused by: clojure.lang.ExceptionInfo: Error communicating with HOST localhost on PORT 4334 {:alt-host nil, :peer-version 2, :password “cEFWy/vVt/3qlJArar/YUfws+s+sxZ0=”, :username “DsUBq/s=”, :port 4334, :host “localhost”, :version “0.9.5544”, :timestamp 1518052072077, :encrypt-channel true}
Feb 08 02:07:55 archlinux lein[5462]: at clojure.core$ex_info.invokeStatic(core.clj:4617)
Feb 08 02:07:55 archlinux lein[5462]: at clojure.core$ex_info.invoke(core.clj:4617)
Feb 08 02:07:55 archlinux lein[5462]: at datomic.connector$endpoint_error.invoke(connector.clj:52)
Feb 08 02:07:55 archlinux lein[5462]: at datomic.connector.TransactorHornetConnector$fn__8588.invoke(connector.clj:238)
Feb 08 02:07:55 archlinux lein[5462]: at datomic.connector.TransactorHornetConnector.admin_request_STAR_(connector.clj:226)
Feb 08 02:07:55 archlinux lein[5462]: at datomic.peer.Connection$fn__8890.invoke(peer.clj:237)
Feb 08 02:07:55 archlinux lein[5462]: at datomic.peer.Connection.create_connection_state(peer.clj:221)
Feb 08 02:07:55 archlinux lein[5462]: at datomic.peer$create_connection$reconnect_fn__8951.invoke(peer.clj:488)
Feb 08 02:07:55 archlinux lein[5462]: at datomic.peer$create_connection.invoke(peer.clj:489)
Feb 08 02:07:55 archlinux lein[5462]: at datomic.peer$get_connection$fn__9005$fn__9007.invoke(peer.clj:663)
Feb 08 02:07:55 archlinux lein[5462]: at datomic.peer$get_connection$fn__9005.invoke(peer.clj:660)
Feb 08 02:07:55 archlinux lein[5462]: at datomic.peer$get_connection.invoke(peer.clj:654)
Feb 08 02:07:55 archlinux lein[5462]: at datomic.peer$connect_uri.invoke(peer.clj:737)
Feb 08 02:07:55 archlinux lein[5462]: at clojure.lang.Var.invoke(Var.java:379)
Feb 08 02:07:55 archlinux lein[5462]: at datomic.Peer.connect(Peer.java:111)
Feb 08 02:07:55 archlinux lein[5462]: at datomic.api$connect.invoke(api.clj:15)
Feb 08 02:07:55 archlinux lein[5462]: at clojure.lang.AFn.applyToHelper(AFn.java:154)
Feb 08 02:07:55 archlinux lein[5462]: at clojure.lang.AFn.applyTo(AFn.java:144)
Feb 08 02:07:55 archlinux lein[5462]: at clojure.lang.Compiler$InvokeExpr.eval(Compiler.java:3652)
Feb 08 02:07:55 archlinux lein[5462]: … 102 more
Feb 08 02:07:55 archlinux lein[5462]: Caused by: HornetQException[errorType=SECURITY_EXCEPTION message=AMQ119031: Unable to validate user]

So in order to avoid downtime, I restarted the local transactor and changed the uri back and the system came back online. Then I connected to a repl and try to make a connection to the remote transactor to debug further, but much to my surprise I now got a connection and was able to query the database.

So in short, the system cannot be booted with the remote transactor due to the Unable to validate user. But if this system boots and connects to the local transactor, then I can create a separate connection which the remote transactor accepts.

To ensure this wasnt a license related issue, I tried downloading a new license key, but that yielded the same results.

How do I proceed?

Lau,

The error you’re seeing indicates that the peer is able to connect to your MySQL storage, but is unable to reach the transactor.

Do you have logs from your transactor that indicate it is connecting correctly to the newly migrated storage?

You can see that the peer is attempting to reach the transactor at:
HOST localhost on PORT 4334 {:alt-host nil,

Are your peer and transactor running on the same instance?
Generally, you will want to put the IP or resolvable-DNS name of your transactor in the transactor properties file (HOST and/or ALT-HOST). The peer will look up that address from storage and use it to connect.

Correct you are. Setting both hosts to the external IP got evertything up and running.

Thanks!