maniankara / hyperledger-easydoser

A simpler and easy way to handle endorsement policies with Hyperledger Fabric based products.
https://wiki.hyperledger.org/pages/viewpage.action?pageId=29035323
GNU General Public License v3.0
3 stars 3 forks source link

Does not list channels #15

Closed maniankara closed 3 years ago

maniankara commented 4 years ago

On test network, when filled values, the server throws index out of range

exit status 1272020/07/06 16:35:03 http: panic serving [::1]:56412: runtime error: index out of range [1] with length 1
goroutine 6 [running]:
net/http.(*conn).serve.func1(0xc0001030e0)
    /usr/local/go/src/net/http/server.go:1772 +0x139
panic(0x7306c0, 0xc00009c0c0)
    /usr/local/go/src/runtime/panic.go:975 +0x3e3
main.getChannelList(0x7cab00, 0xc0000aa000, 0xc0000b2100)
    /home/anoop/Work/github/maniankara/hyperledger-easydoser/easyDoser-server/main.go:49 +0x903
net/http.HandlerFunc.ServeHTTP(0x76d7a8, 0x7cab00, 0xc0000aa000, 0xc0000b2100)
    /usr/local/go/src/net/http/server.go:2012 +0x44
github.com/gorilla/mux.(*Router).ServeHTTP(0xc000136000, 0x7cab00, 0xc0000aa000, 0xc000162000)
    /home/anoop/go/src/github.com/gorilla/mux/mux.go:210 +0xe2
net/http.serverHandler.ServeHTTP(0xc000148000, 0x7cab00, 0xc0000aa000, 0xc000162000)
    /usr/local/go/src/net/http/server.go:2807 +0xa3
net/http.(*conn).serve(0xc0001030e0, 0x7cb240, 0xc000058400)
    /usr/local/go/src/net/http/server.go:1895 +0x86c
created by net/http.(*Server).Serve
    /usr/local/go/src/net/http/server.go:2933 +0x35c
maniankara commented 4 years ago

easy-doser-bug

Abhimanyu121 commented 4 years ago

Orderer address would be localhost:7050 orderer.example.com is for inter container networking. Also, tls cert will be this one /mnt/265C6B275C6AF14B/fabric/test-network/organizations/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt

These are the values I am using --cfg /mnt/265C6B275C6AF14B/fabric/config
--address localhost:7051
--msp-id Org1MSP
--msp-config /mnt/265C6B275C6AF14B/fabric/test-network/organizations/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp/
--tls-cert /mnt/265C6B275C6AF14B/fabric/test-network/organizations/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt
--orderer-certificate /mnt/265C6B275C6AF14B/fabric/test-network/organizations/ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem

I will make it more clear on frontend side, as to what paths to enter. Thanks

maniankara commented 4 years ago

Ah yes, Its true that orderer.example.com is not resolvable from my host. However, still have problems

anoop@anoop-deb10:~/Work/github/maniankara/hyperledger-easydoser/easyDoser-frontend|master⚡ ⇒  docker ps
CONTAINER ID        IMAGE                                                                                                                                                                   COMMAND                  CREATED             STATUS              PORTS                                        NAMES
70e7c80c4b47        dev-peer0.org1.example.com-fabcar_1-762e0fe3dbeee0f7b08fb6200adeb4a3a20f649a00f168c0b3c2257e53b6e506-5016f400ec9078b1e7c00626e70b0094ec48651ea7f49e14b46a6995345e2431   "chaincode -peer.add…"   11 minutes ago      Up 11 minutes                                                    dev-peer0.org1.example.com-fabcar_1-762e0fe3dbeee0f7b08fb6200adeb4a3a20f649a00f168c0b3c2257e53b6e506
1e8d38e729bd        dev-peer0.org2.example.com-fabcar_1-762e0fe3dbeee0f7b08fb6200adeb4a3a20f649a00f168c0b3c2257e53b6e506-587e14d21fc7161ab1e246fbd5583966a3ff292484ddd7a52fa40ade4b60b120   "chaincode -peer.add…"   11 minutes ago      Up 11 minutes                                                    dev-peer0.org2.example.com-fabcar_1-762e0fe3dbeee0f7b08fb6200adeb4a3a20f649a00f168c0b3c2257e53b6e506
c951adac04dd        hyperledger/fabric-peer:latest                                                                                                                                          "peer node start"        13 minutes ago      Up 13 minutes       7051/tcp, 0.0.0.0:9051->9051/tcp             peer0.org2.example.com
3bda141377d8        hyperledger/fabric-peer:latest                                                                                                                                          "peer node start"        13 minutes ago      Up 13 minutes       0.0.0.0:7051->7051/tcp                       peer0.org1.example.com
06e7c8f17a63        hyperledger/fabric-couchdb                                                                                                                                              "tini -- /docker-ent…"   13 minutes ago      Up 13 minutes       4369/tcp, 9100/tcp, 0.0.0.0:7984->5984/tcp   couchdb1
ef7f371ee9dc        hyperledger/fabric-orderer:latest                                                                                                                                       "orderer"                13 minutes ago      Up 13 minutes       0.0.0.0:7050->7050/tcp                       orderer.example.com
65d05fdba215        hyperledger/fabric-couchdb                                                                                                                                              "tini -- /docker-ent…"   13 minutes ago      Up 13 minutes       4369/tcp, 9100/tcp, 0.0.0.0:5984->5984/tcp   couchdb0
anoop@anoop-deb10:~/Work/github/maniankara/hyperledger-easydoser/easyDoser-frontend|master⚡ ⇒  telnet localhost 7050
Trying ::1...
Connected to localhost.
Escape character is '^]'.
^CConnection closed by foreign host.
anoop@anoop-deb10:~/Work/github/maniankara/hyperledger-easydoser/easyDoser-frontend|master⚡ ⇒  

easy-doser-bug02

Abhimanyu121 commented 4 years ago

For EasyDoser server you have to enter localhost:8080 or with your custom port, I will make this clear in frontend so that user will know what exactly to enter