Composer REST Server Localhost:3000 refused to connect

时间:2019-03-19 15:08:23

标签: rest localhost hyperledger hyperledger-composer

I've created a business network on Hyperledger Composer and tested it out on Composer playground and it works great. I could add participants, add assets, perform transactions etc. I tried to generate a bespoke rest API for the business network using the guide available at https://hyperledger.github.io/composer/latest/tutorials/developer-tutorial and it worked great as well.

The output for the command composer-rest-server --card admin@my-network is this:

Discovering types from business network definition ...
Discovering the Returning Transactions..
Discovered types from business network definition
Generating schemas for all types in business network definition ...
Generated schemas for all types in business network definition
Adding schemas for all types to Loopback ...
Added schemas for all types to Loopback
Web server listening at: http://localhost:3000
Browse your REST API at http://localhost:3000/explorer

It's a good output but when I navigate to http://localhost:3000 it fails with error This site can’t be reached localhost refused to connect.

I also generated a skeleton Angular application using the same guide and when I run npm start it returns a positive NG Live Development Server is running on http://0.0.0.0:4200which also fails with localhost refused to connect.

I'm using an Azure Ubuntu 18.04 to build and run the network. Any help will be appreciated.

1 个答案:

答案 0 :(得分:0)

禁用防火墙等端口阻止服务,然后重试。希望对您有帮助