连接到恢复的数据库时 Datomic 抛出 ActiveMQInternalErrorException

2024-03-08

我从 :dev 存储备份了 Datomic v0.9.5786 数据库:

~/datomic/datomic-pro-0.9.5786/bin/datomic -Xmx4g -Xms4g backup-db datomic:dev://localhost:4334/acct file:/Users/petrus/acct.datomic
Copied 0 segments, skipped 0 segments.
Copied 414 segments, skipped 0 segments.
:succeeded

在我的另一台笔记本电脑上将备份恢复到较新版本的 Datomic Pro v1.0.6202 显然成功了:

➜  datomic-pro-1.0.6202 bin/datomic -Xmx4g -Xms4g restore-db file:/Users/petrus/Projects/acct/resources/data/acct.datomic datomic:dev://localhost:4334/acct
Copied 0 segments, skipped 0 segments.
Copied 414 segments, skipped 0 segments.
:succeeded
{:event :restore, :db acct, :basis-t 38265, :inst #inst "2020-10-22T10:03:31.186-00:00"}

我按照描述重新启动了开发事务处理程序在文档中 https://docs.datomic.com/on-prem/backup.html,但是当我尝试从 REPL 连接时,Datomic 抛出:

(d/connect "datomic:dev://localhost:4334/acct")
=> Execution error (ActiveMQInternalErrorException) at org.apache.activemq.artemis.core.protocol.core.impl.ChannelImpl/sendBlocking (ChannelImpl.java:404).
null

尝试去(d/delete-database "datomic:dev://localhost:4334/acct")失败并出现相同的错误,但尝试连接到不存在的数据库会干净地抛出“目录不存在”。

在源计算机上安装 Datomic Pro v1.0.6202 后,我重复了备份/恢复过程,以便源版本和目标版本匹配,但在连接到恢复的数据库时会出现相同的症状。

让我们看看当我尝试创建新数据库时会发生什么:

(d/connect "datomic:dev://localhost:4334/newdb")
=> Execution error at datomic.peer/get-connection$fn (peer.clj:661).
Could not find newdb in catalog
(d/create-database "datomic:dev://localhost:4334/newdb")
=> Execution error (ActiveMQInternalErrorException) at org.apache.activemq.artemis.core.protocol.core.impl.ChannelImpl/sendBlocking (ChannelImpl.java:404).
null

嗯,我开始认为我在 Datomic 中发现了一个错误,或者我的本地 JDK (OpenJDK 15) 有问题。

因此,我在 deps.edn 中创建了一个仅包含 1.10.1 和 Datomic Pro v1.0.6202 的新 Clojure 项目:

{:mvn/repos {"my.datomic.com" {:url "https://my.datomic.com/repo"}}
 :deps      {org.clojure/clojure     {:mvn/version "1.10.1"}
             com.datomic/datomic-pro {:mvn/version "1.0.6202"}}}
             
➜  clj
Clojure 1.10.1
user=> (require '[datomic.api :as d])
nil
user=> (d/connect "datomic:dev://localhost:4334/newdb")
Execution error at datomic.peer/get-connection$fn (peer.clj:661).
Could not find newdb in catalog
user=> (d/create-database "datomic:dev://localhost:4334/newdb")
Execution error (ActiveMQInternalErrorException) at org.apache.activemq.artemis.core.protocol.core.impl.ChannelImpl/sendBlocking (ChannelImpl.java:404).

会不会有什么地方发生了奇怪的冲突?让我们看看 Maven 对于依赖树是怎么说的:

➜  datomic-debug clj -Spom
➜  datomic-debug mvn dependency:tree -Dverbose=true
[INFO] Scanning for projects...
[INFO]
[INFO] --------------------< datomic-debug:datomic-debug >---------------------
[INFO] Building datomic-debug 0.1.0
[INFO] --------------------------------[ jar ]---------------------------------
Downloading from clojars: https://repo.clojars.org/com/google/guava/guava/18.0/guava-18.0.jar
Downloading from my.datomic.com: https://my.datomic.com/repo/com/google/guava/guava/18.0/guava-18.0.jar
Downloading from central: https://repo.maven.apache.org/maven2/com/google/guava/guava/18.0/guava-18.0.jar
Downloaded from central: https://repo.maven.apache.org/maven2/com/google/guava/guava/18.0/guava-18.0.jar (2.3 MB at 2.9 MB/s)
[INFO]
[INFO] --- maven-dependency-plugin:2.8:tree (default-cli) @ datomic-debug ---
[INFO] datomic-debug:datomic-debug:jar:0.1.0
[INFO] +- org.clojure:clojure:jar:1.10.1:compile
[INFO] |  +- org.clojure:spec.alpha:jar:0.2.176:compile
[INFO] |  \- org.clojure:core.specs.alpha:jar:0.2.44:compile
[INFO] \- com.datomic:datomic-pro:jar:1.0.6202:compile
[INFO]    +- (org.clojure:clojure:jar:1.8.0:compile - omitted for conflict with 1.10.1)
[INFO]    +- org.clojure:tools.cli:jar:0.3.5:compile
[INFO]    +- org.fressian:fressian:jar:0.6.5:compile
[INFO]    +- commons-codec:commons-codec:jar:1.10:compile
[INFO]    +- org.slf4j:jul-to-slf4j:jar:1.7.22:compile
[INFO]    |  \- org.slf4j:slf4j-api:jar:1.7.22:compile
[INFO]    +- org.slf4j:slf4j-nop:jar:1.7.22:compile
[INFO]    |  \- (org.slf4j:slf4j-api:jar:1.7.22:compile - omitted for duplicate)
[INFO]    +- org.slf4j:log4j-over-slf4j:jar:1.7.22:runtime
[INFO]    |  \- (org.slf4j:slf4j-api:jar:1.7.22:runtime - omitted for duplicate)
[INFO]    +- org.slf4j:jcl-over-slf4j:jar:1.7.22:compile
[INFO]    |  \- (org.slf4j:slf4j-api:jar:1.7.22:compile - omitted for duplicate)
[INFO]    +- org.apache.activemq:artemis-core-client:jar:1.5.6:compile
[INFO]    |  +- org.apache.activemq:artemis-commons:jar:1.5.6:compile
[INFO]    |  |  +- org.jboss.logging:jboss-logging:jar:3.3.0.Final:compile
[INFO]    |  |  +- (io.netty:netty-all:jar:4.1.5.Final:compile - omitted for duplicate)
[INFO]    |  |  +- commons-beanutils:commons-beanutils:jar:1.9.2:compile
[INFO]    |  |  |  \- (commons-collections:commons-collections:jar:3.2.1:compile - omitted for conflict with 3.2.2)
[INFO]    |  |  \- (com.google.guava:guava:jar:19.0:compile - omitted for conflict with 18.0)
[INFO]    |  +- (io.netty:netty-all:jar:4.1.5.Final:compile - omitted for conflict with 4.1.32.Final)
[INFO]    |  +- org.apache.geronimo.specs:geronimo-json_1.0_spec:jar:1.0-alpha-1:compile
[INFO]    |  \- org.apache.johnzon:johnzon-core:jar:0.9.5:compile
[INFO]    +- io.netty:netty-all:jar:4.1.32.Final:compile
[INFO]    +- com.datomic:query-support:jar:0.8.27:compile
[INFO]    +- com.h2database:h2:jar:1.3.171:compile
[INFO]    +- com.datomic:datomic-lucene-core:jar:3.3.0:compile
[INFO]    +- com.google.guava:guava:jar:18.0:compile
[INFO]    +- net.spy:spymemcached:jar:2.11.4:compile
[INFO]    +- org.apache.httpcomponents:httpclient:jar:4.5.9:compile
[INFO]    |  +- org.apache.httpcomponents:httpcore:jar:4.4.11:compile
[INFO]    |  \- (commons-codec:commons-codec:jar:1.11:compile - omitted for conflict with 1.10)
[INFO]    +- org.apache.tomcat:tomcat-jdbc:jar:7.0.27:compile
[INFO]    |  \- org.apache.tomcat:tomcat-juli:jar:7.0.27:compile
[INFO]    +- commons-collections:commons-collections:jar:3.2.2:compile
[INFO]    \- org.codehaus.janino:commons-compiler-jdk:jar:3.0.12:compile
[INFO]       \- org.codehaus.janino:commons-compiler:jar:3.0.12:compile
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  3.181 s
[INFO] Finished at: 2020-10-24T13:15:47+01:00
[INFO] ------------------------------------------------------------------------

无论我使用 OpenJDK 15 还是 Oracle 的 JDK 15,都会发生同样的情况。我还尝试在启动 Datomic 之前删除我的 Datomic 数据文件夹。


Datomic 交易者需要 Java 8 https://forum.datomic.com/t/java-11-0-1-ssl-exception/734并且确实not尚支持较新的版本。通过将transactor env切换到OpenJDK v1.8.0_272来解决:

brew cask install adoptopenjdk8
export JAVA_HOME=/Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home
bin/transactor config/dev-transactor.properties

我为此浪费了10个小时。也许如果交易者在启动时尝试连接到自身作为健全性检查,它可以提前警告用户。

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

连接到恢复的数据库时 Datomic 抛出 ActiveMQInternalErrorException 的相关文章

  • 在WPF中使用动画改变窗口大小

    我正在寻找一种方法来动画调整窗口大小 假设我有一个高度 300和宽度 300的窗口 我有2个按钮 当我单击第一个按钮时 窗口大小必须更改为高度 600并且宽度 600 当我单击另一个按钮时 窗口大小必须恢复到原始大小 我可以简单地更改高度和
  • 为什么错误处理程序不处理 Python/Flask 中包含尖号(“#”)符号的不存在 URL

    我正在构建一个 Python Flask 完全 ajax 无需重新加载整页 Web 应用程序 当 url 上的尖号 更改时 我更改了母版页的内容 本 阿尔曼 HashChange 事件 http benalman com projects
  • Spring - 在调用控制器的方法之前执行代码

    有没有类似的注释 PreAuthorize or PreFilter我可以用它在调用控制器中的方法之前运行代码吗 我需要将信息添加到请求上下文 特定于被调用的方法 然后由ExceptionHandler 例如 RestController
  • 如何使用 php if ($text contains "World") 搜索文本

    如何使用 php 搜索文本 就像是 除了更换if text contains World 具有工作条件 在你的情况下你可以只使用strpos http php net manual en function strpos php or str
  • 如何将十六进制字符串转换为 u8 切片?

    我有一个看起来像这样的字符串 090A0B0C 我想将其转换为看起来像这样的切片 9 10 11 12 我最好怎样做呢 我不想将单个十六进制字符元组转换为单个整数值 我想将由多个十六进制字符元组组成的字符串转换为多个整数值的切片 如果您想避

随机推荐

  • 如何在 UITableView 中像 iMessage iPhone 应用程序一样显示时间

    我在像 iMessage iPhone 应用程序一样滑动时无法在 UITableView 中显示时间 我已启用属性 显示水平滚动条 and 垂直弹跳 但它不能像 iMessage 应用程序一样正常工作 它需要压缩 UITableViewCe
  • Angular 无法使用 res.download 从 Express 获取文件下载

    在我的应用程序中 我在后端创建一个文件 然后我希望通过浏览器下载将其传递给用户 我已经尝试过无数次 这是 Express 后端 app get download req res gt res download filename txt fu
  • R中的指数曲线拟合

    time 1 100 head y 0 07841589 0 07686316 0 07534116 0 07384931 0 07238699 0 07095363 plot time y 这是一条指数曲线 在不知道公式的情况下如何在这条
  • 多态值类型和接口

    我有一个多态值类型 如下实现 class ShapeValue public template
  • 错误:CI_DB_mysql_result 类的对象无法转换为字符串

    我是 CodeIgniter 的新手 我尝试阅读 CI 的文档 但仍然无法解决我的问题 也许这里有人可以帮助解决我的问题 这是我的代码 在我的控制器中 class Registration extends CI Controller fun
  • 将第二个数据库添加到 alembic 上下文中

    我想在迁移过程中连接到第二个外部数据库 以将其部分数据移至本地数据库中 最好的方法是什么 将第二个数据库添加到 alembic 上下文后 我不知道该怎么做 在迁移期间如何在数据库上运行 SQL 语句 这就是我的env py现在看起来像 fr
  • 将多个变量从 HTML 传递到 PHP

    我想将两个变量传递到我的 php 页面 下拉变量工作得很好 但是当我添加一个附加变量时 它只发送 0 而不是我在表单中输入的内容 我觉得我已经非常接近这个问题的解决方案了 当我替换这一行上的数字时 xmlhttp open GET getd
  • Haskell:“Num [a] => a”和“Num a => [a]”之间有什么区别

    显然 我的类型签名已关闭 我现在已经知道原因了 现在 我有兴趣了解有关 GHCI 对我的拼写错误推断的签名的更多信息 我试图让这段代码工作 elemNum Eq a Num b gt a gt a gt b elemNum e l f e
  • 为什么我的 build.gradle android studio 中没有 allprojects{}?

    我正在开发一个 Android 应用程序 我需要将 PayPal 付款方式添加到该应用程序 所以我使用这个 https developer paypal com docs business native checkout android h
  • MariaDB Galera集群设置问题

    我正在尝试启动并运行 mariadb 集群 但它对我来说不起作用 现在我在 64 位 Red hat ES6 机器上使用 MariaDB Galera 5 5 36 我通过这里的存储库安装了 mariadb mariadb name Mar
  • pandas 切割多列

    我希望在多个列中应用一个容器 a 1 2 9 1 5 3 b 9 8 7 8 9 1 c a b print pd cut c 3 labels False 效果很好并创造了 0 0 2 0 1 0 2 2 2 2 2 0 但是 我想应用
  • 显示来自MySQL数据库的php中的所有表名

    好吧 我对 PHP 和 SQL MySQL 还很陌生 所以非常感谢您的帮助 我觉得我采取了正确的方法 我在 php net 上搜索 MySQL 显示所有表名称 它返回了一个已弃用的方法 并建议使用 MySQL 查询SHOW TABLES F
  • 如何更改Font Awesome感叹号三角形图标的内部白色?

    如何更改图标的内部 白色 颜色 i class fa fa exclamation triangle i 附 正在申请 i class fa fa exclamation triangle style color red i 不是答案 因为
  • 将 Admob 添加到 Libgdx 游戏

    我正在休憩本教程 https www youtube com watch v cwAN4LMXo58但是当我尝试进入货币化页面时 我无法货币化或添加任何横幅 因为与教程不同 我的游戏不在商店中 我的问题是 我是否需要在不添加 admob 代
  • 安排交互式 UILocalNotification - Obj-C

    我正在尝试安排一个互动UILocalNotifaction 我的尝试是使用以下代码 这是我从中获取的tutorial https nrj io simple interactive notifications in ios 8 NSStri
  • Twilio 客户端语音通话扬声器开/关问题

    我在用Twilio 客户端 https www twilio com docs api client ios用于通话的语音通话服务 在这里 我遇到了斯皮克开 关功能的问题 我可以将通话静音 取消静音 但无法打开 关闭扬声器 我有两个功能的相
  • 使用正则表达式匹配多行文本

    我正在尝试使用 Java 来匹配多行文本 当我使用Pattern类与Pattern MULTILINE修饰符 我能够匹配 但我无法这样做 m 相同的图案与 m 并使用String matches似乎不起作用 我确信我错过了一些东西 但不知道
  • Kohana v3.1.0 ORM _ignored_columns -- 既然它消失了,我该怎么办?

    看来在 Kohana 的 ORM v3 1 0 中 ignored columns财产已被删除 处理数据库中不存在的字段的推荐技术是什么 我现在的情况是password confirm 其中password是一个字段 但我们要求用户输入密码
  • 白色背景上带有透明标题的 iOS UIButton

    我有一个习惯UIButton具有透明背景和白色标题 我正在寻找一个简单的解决方案来反转它的突出显示 白色背景和透明标题 因为它是在系统上实现的UISegmentedControl 有没有比反转用作快照的 alpha 更简单的解决方案CALa
  • 连接到恢复的数据库时 Datomic 抛出 ActiveMQInternalErrorException

    我从 dev 存储备份了 Datomic v0 9 5786 数据库 datomic datomic pro 0 9 5786 bin datomic Xmx4g Xms4g backup db datomic dev localhost