本文介绍了无法连接到Azure Blockchain Service的事务节点的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试连接到事务节点,我在"truffle-config.js"中定义了连接字符串。如示例中所述(https://docs.microsoft.com/en-us/azure/blockchain/service/send-transaction). 
$
````
var alpha =" https://alpha-test.blockchain.azure.com:3200 / ***********" ;;

var myAccount =" 0x1B21e60D66a0598F95096c214Fe84c960f80fF89" ;;

var myPassword =" *******" ;;

alpha:{

      provider:new Web3.providers.HttpProvider(alpha),

      network_id:" *",

     燃气:0,

      gasPrice:0

   每当我执行truffle console命令连接到alpha节点时,我都会返回以下错误:
$
``
```
`
$
$ truffle console --network alpha



无法连接到您的以太坊客户端。

请检查您的以太坊客户:

    - 正在运行

    - 正在接受RPC连接(即," - rpc"选项用于geth)

    - 可通过网络访问

    - 已在您的Truffle配置文件(truffle-config.js)中正确配置

```

而我能够连接到defaultnode和beta节点。我已经尝试使用浏览器访问rpc端点,它们似乎有效。但我无法通过松露这样做。请帮帮我。

I am trying to connect to transaction nodes, I've defined the connection strings in "truffle-config.js" as described in the example (https://docs.microsoft.com/en-us/azure/blockchain/service/send-transaction). 
```
var alpha = "https://alpha-test.blockchain.azure.com:3200/***********";
var myAccount = "0x1B21e60D66a0598F95096c214Fe84c960f80fF89";
var myPassword = "*******";
alpha: {
      provider: new Web3.providers.HttpProvider(alpha),
      network_id: "*",
      gas: 0,
      gasPrice: 0
    }
```
whenever I execute the truffle console command to connect to alpha node, I am returned the following error:
```
$ truffle console --network alpha

Could not connect to your Ethereum client.
Please check that your Ethereum client:
    - is running
    - is accepting RPC connections (i.e., "--rpc" option is used in geth)
    - is accessible over the network
    - is properly configured in your Truffle configuration file (truffle-config.js)
```
whereas I am able to connect to both the defaultnode and beta node. I've tried hitting the rpc endpoints using browser and they seem to work. But I am unable to do so via truffle. Please help me out.

推荐答案

我注意到您问了同样的问题在SO: 

I noticed that you asked the same question on SO: https://stackoverflow.com/questions/56129403/trouble-connecting-to-nodes-using-truffle-for-azure-blockchain-service

让我指出其他人参与SO并继续讨论因为有人已经建议尝试解决您遇到的问题。

Let me point others to SO and continue the discussion there as someone already suggested an action to try and solve the issue you are facing.

如果您继续被阻止,请在您所关注的文档下打开一个新问题:  https://docs.microsoft.com/en-us/azure/blockchain/service/send-transactio n

If you continue blocked please open a new issue under the documentation you are following: https://docs.microsoft.com/en-us/azure/blockchain/service/send-transaction

最后  请确认您之前已遵循所有先决条件?

谢谢!


这篇关于无法连接到Azure Blockchain Service的事务节点的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-17 04:10