【问题标题】:Couldn't find network parameters file and compatibility zone wasn't configured/isn't reachable, corda找不到网络参数文件和兼容区域未配置/无法访问,corda
【发布时间】:2021-11-03 07:27:53
【问题描述】:

我卡住了,试图将 azure postgres 与 corda 集成。我正在使用 gradle 的 deployNodes 任务在本地创建网络。

以下是我得到的例外。

[ERROR] 2021-09-06T06:53:02,290Z [main] internal.NodeStartupLogging. - Exception during node startup: Couldn't find network parameters file and compatibility zone wasn't configured/isn't reachable. - Couldn't find network parameters file and compatibility zone wasn't configured/isn't reachable. [errorCode=1917kd6, moreInformationAt=https://errors.corda.net/OS/4.5/1917kd6]

当连接到我机器上安装的本地 postgres 实例时,我没有遇到任何问题。

下面给出的是出错的 azure postgres 配置。

extraConfig = [
            'dataSourceProperties' : [
                    'dataSourceClassName': 'org.postgresql.ds.PGSimpleDataSource',
                    'dataSource.url': 'jdbc:postgresql://azure_database_name.postgres.database.azure.com:5432/demo?searchpath=demo_schema?ssl=true',
                    'dataSource.user': 'userN@me@azure_database_name',
                    'dataSource.password': 'pa$$word'
            ]

【问题讨论】:

  • 您是否在 Azure VM 上部署了 Corda 节点,或者您的节点仍在连接到 Azure 数据库的笔记本电脑上?
  • 它还在我的机器上。一旦我得到这个工作,我将不得不把它移到一个虚拟机上。
  • 错误是找不到连接Corda网络所需的网络参数文件。请更新您的问题,添加您用于在本地创建 Corda 网络的内容:网络引导程序?所以我们可以为您提供帮助。谢谢!
  • @AlessandroBaffa 已更新问题。
  • 我已经复制了您提到的错误,并将我的答案放在下面。请让我知道它是否解决了您的问题@user16528894。

标签: postgresql blockchain corda azure-postgresql


【解决方案1】:

尝试这样做:

  • 在您的项目根文件夹中创建一个/drivers 文件夹。此文件夹将包含 PostgreSQL 的 postgresql-XX.X.jar
  • 更新您的 build.gradle 以使用 jarDirs 添加驱动程序 jar 的位置,如下所示:
extraConfig = [
            jarDirs : ['/your-project-absolute-path/drivers'],
            dataSourceProperties : [
                    'dataSourceClassName': 'org.postgresql.ds.PGSimpleDataSource',
                    'dataSource.url': 'jdbc:postgresql://azure_database_name.postgres.database.azure.com:5432/demo?searchpath=demo_schema?ssl=true',
                    'dataSource.user': 'userN@me@azure_database_name',
                    'dataSource.password': 'pa$$word'
            ]
        ]
  • 运行./gradlew deployNodes
  • 运行./build/nodes/runnodes
  • 节点应该启动(它需要一些时间,因为它必须连接到 Azure DB)

【讨论】:

  • 我在虚拟机上使用相同的设置建立了我的网络。但由于某种原因,它不能在我的本地机器上运行。关于驱动程序文件夹,我已经在我的配置中拥有它。
  • @user16528894 你是如何在你的虚拟机中启动节点的?你是在做 java -jar corda.jar 还是 ./build/nodes/runnodes ?
  • 我采用第二种方式 - ./build/nodes/runnodes。
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 2018-11-17
  • 2013-04-13
  • 1970-01-01
  • 1970-01-01
  • 2019-06-26
  • 2017-07-29
  • 2019-02-25
相关资源
最近更新 更多