检测数据/节点分区错误
上次我看到数据/分区节点错误是因为我启动了 erlang shell,它通过 cookies 等连接到同一 CPU 上的节点。启动后,shell 立即将分区错误转储到屏幕上。 这太麻烦了……
- 我该如何捕获这个异常?
- 如何以编程方式修复异常? (在另一个问题中问)
- 我如何防止这种异常?
[更新] 我有两个盒子正在运行我的 Yaws 应用程序。 数据库通过 Mnesia 的 extra_db_node 功能进行复制。 在服务器运行后的某个时间,我登录到其中一个盒子并使用不同的 sname 和相同的 cookie 启动“erl”,以便 3 个节点可以进行通信。 shell 稳定并显示 shell 提示符后不久...屏幕上会显示一个复杂的元组,表明存在网络分区错误。 此消息似乎是控制台转储,而不是可能被我的雅司病应用程序捕获的异常...但我希望我的雅司病应用程序能够检测到错误并采取纠正措施。
The last time I saw a data/partition node error it was because I launched the erlang shell which connected to the node on the same CPU via cookies etc. Immediately after startup the shell dumped the partition error on the screen. This is terribly bothersome....
- how do I trap this exception?
- how do I repair the exception programatically? (asked in another question)
- how do I prevent this exception?
[update] I have two boxes that are running my Yaws application. The databases are replicated via Mnesia's extra_db_node feature. At some time after the servers are running I log into one of the boxes and launch 'erl' with a different sname and same cookie so that the 3 nodes can communicate. Shortly after the shell stabilizes and the shell prompt is displayed... a complex tuple is displayed on the screen indicating that there is a network partition error. This message appears to be a console dump rather than an exception that could be trapped by my yaws applications... but I want my yaws applications to detect the error and take corrective action.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论