2

I have successfully created and joined the channel following the session Create & Join Channel of Hyperledger Fabric Tutorials. And I followed the instruction of Using CouchDB to interact with the marbles02 chaincode without error.

However, I cannot navigate to the http://localhost:5984/_utils by the browser to view the state database through the CouchDB web interface.

Do I miss any steps to set my network?

Mika Sundland
  • 18,120
  • 16
  • 38
  • 50
Tiffany999
  • 43
  • 1
  • 7

2 Answers2

2

To setting the port mapping on VirtualBox, the following steps are for information.

  1. Launch the VirtualBox Manager.
  2. Select the running VM called “default”. Click on “Settings”. Select “Network”.
  3. Open the “Advanced” section and click on “Port Forwarding”.
  4. Click the “Adds new port forwarding rule” button. Then set Host Port to 6984 and Guest Port to 5984 as the screenshot.
Tiffany999
  • 43
  • 1
  • 7
1

If you inspect the docker-compose-couch.yaml you will find that the ports have been mapped to the host:

  couchdb1:
    container_name: couchdb1
    image: hyperledger/fabric-couchdb
    # Comment/Uncomment the port mapping if you want to hide/expose the CouchDB service,
    # for example map it to utilize Fauxton User Interface in dev environments.
    ports:
      - "6984:5984"

In this case, the compose file maps the default CouchDB port of 5984 to 6984 on the host. If you want to inspect the CouchDB running in the container started in this example, open http://localhost:6984/_utils/ in your browser.

christo4ferris
  • 4,039
  • 1
  • 17
  • 30
  • Thank you very much. I found the ports mapping in the docker-compose-couch.yaml like you said. But I still cannot connect when I open http://localhost:6984/_utils/ in my browser.Then, I figured out that I need to set the mapping between the linux VM and Windows on VirtualBox. After set the mapping, http://localhost:6984/_utils/ is workable.:) – Tiffany999 Oct 16 '17 at 03:32
  • ah;-) yeah, it worked seamlessly on Mac when I verified. – christo4ferris Oct 16 '17 at 14:14