Giter Site home page Giter Site logo

Comments (14)

tmh1999 avatar tmh1999 commented on July 28, 2024 1

You are awesome, man. Thank you !

from cp-web.

masterDev1985 avatar masterDev1985 commented on July 28, 2024 1

@kamraanki Mind taking another look at this now that the CP demo has been updated? We've verified that it works against the Bluemix service, which uses TLS, but it might take a little work to get it working on your local network.

from cp-web.

himanshutyagi36 avatar himanshutyagi36 commented on July 28, 2024

@kamraanki I'm facing the same issue. Did you solve it ?

from cp-web.

kamraanki avatar kamraanki commented on July 28, 2024

@tortuga90 No i am still facing the same issue.

from cp-web.

krishvoor avatar krishvoor commented on July 28, 2024

@kamraanki & @tortuga90 Count me in, I am facing the same issue right now, did you guys have any chance solving it.

from cp-web.

dshuffma-ibm avatar dshuffma-ibm commented on July 28, 2024

this line concerns me:

I have disabled TLS in options of mycreds.json

The correct way to disable TLS is in the options object in app.js, near network options. Here is a section written for marbles that should help.

In summary you need to add an option field to app.js so that it looks like:

network:{
        peers: [peers[0]],
        users: users,   
        options: {
                tls: false
        }
...

just for more clarification this tls:false field is telling the REST based SDK to use http vs https.

from cp-web.

himanshutyagi36 avatar himanshutyagi36 commented on July 28, 2024

@dshuffma-ibm I've disabled in the app.js itself.

from cp-web.

dshuffma-ibm avatar dshuffma-ibm commented on July 28, 2024

could you post more logs? does it register any enrollIDs with a peer successfully? also @tortuga90 are you also using your own local network?

from cp-web.

himanshutyagi36 avatar himanshutyagi36 commented on July 28, 2024

@dshuffma-ibm yes, I'm running on my local network. The CA and Validating peer are in Vagrant VM, and the node.js app is running from outside the vagrant vm

from cp-web.

dshuffma-ibm avatar dshuffma-ibm commented on July 28, 2024

cp-web is not updated to work with the new hyperledger fabric. We have people working to update it, but it is not yet ready. You should hold off on using cp-web until we push an updated version. Marbles however will work fine.

from cp-web.

tmh1999 avatar tmh1999 commented on July 28, 2024

@dshuffma-ibm Please let me use this thread to ask a related question to marble. I am using marble and having this problem when running $ gulp at marbles/ root directory:

     Waiting...
[ibc-js] deploy - failure: 500
! looks like a deploy error, holding off on the starting the socket
 { name: 'deploy() error',
  code: 500,
  details: 
   { Error: Parse Error
       at Error (native)
       at Socket.socketOnData (_http_client.js:361:20)
       at emitOne (events.js:96:13)
       at Socket.emit (events.js:188:7)
       at readableAddChunk (_stream_readable.js:172:18)
       at Socket.Readable.push (_stream_readable.js:130:10)
       at TCP.onread (net.js:542:20) bytesParsed: 0, code: 'HPE_INVALID_CONSTANT' } }

My local dev is 2vp & CA using docker-compose.yml like this :

membersrvc:
  image: hyperledger/fabric-membersrvc
  command: membersrvc
vp0:
  image: hyperledger/fabric-peer
  environment:
    - CORE_PEER_ADDRESSAUTODETECT=true
    - CORE_VM_ENDPOINT=http://172.17.0.1:2375
    - CORE_LOGGING_LEVEL=DEBUG
    - CORE_PEER_ID=vp0
    - CORE_SECURITY_ENROLLID=test_vp0
    - CORE_SECURITY_ENROLLSECRET=111111111111
  command: peer node start
vp1:
  extends:
    service: vp0
  environment:
    - CORE_PEER_ID=vp1
    - CORE_SECURITY_ENROLLID=test_vp1
    - CORE_SECURITY_ENROLLSECRET=111111111111
    - CORE_PEER_DISCOVERY_ROOTNODE=vp0:30303
  links:
    - vp0

And my marbles/mycreds.json :

{
  "credentials": {
    "peers": [
      {
        "api_host": "172.17.0.2",
        "api_port_tls": 30303,
        "api_port": 30303,
        "id": "vp0"
      }
    ],
    "users": [
      {
        "enrollId": "test_vp0",
        "enrollSecret": "111111111111"
      }
    ]
  }
}

I have disabled tls in marbles/app.js.

from cp-web.

dshuffma-ibm avatar dshuffma-ibm commented on July 28, 2024

@tmh1999 could you add quiet: false to your options to see more details.

network:{
        peers: [peers[0]],
        users: users,   
        options: {
                tls: false,
               quiet: false
        }

from cp-web.

tmh1999 avatar tmh1999 commented on July 28, 2024

@dshuffma-ibm Yes here is the new output :

     Waiting...
[http POST - w] /chaincode
  body: {"jsonrpc":"2.0","method":"deploy","params":{"type":1,"chaincodeID":{"path":"https://github.com/ibm-blockchain/marbles-chaincode/hyperledger/part2"},"ctorMsg":{"function":"init","args":["99"]}},"id":1470232091636}
[http POST - w] Error - unknown issue with request:  { Error: Parse Error
    at Error (native)
    at Socket.socketOnData (_http_client.js:361:20)
    at emitOne (events.js:96:13)
    at Socket.emit (events.js:188:7)
    at readableAddChunk (_stream_readable.js:172:18)
    at Socket.Readable.push (_stream_readable.js:130:10)
    at TCP.onread (net.js:542:20) bytesParsed: 0, code: 'HPE_INVALID_CONSTANT' }
[ibc-js] deploy - failure: 500
! looks like a deploy error, holding off on the starting the socket
 { name: 'deploy() error',
  code: 500,
  details: 
   { Error: Parse Error
       at Error (native)
       at Socket.socketOnData (_http_client.js:361:20)
       at emitOne (events.js:96:13)
       at Socket.emit (events.js:188:7)
       at readableAddChunk (_stream_readable.js:172:18)
       at Socket.Readable.push (_stream_readable.js:130:10)
       at TCP.onread (net.js:542:20) bytesParsed: 0, code: 'HPE_INVALID_CONSTANT' } }

from cp-web.

dshuffma-ibm avatar dshuffma-ibm commented on July 28, 2024

You are sending the HTTP deploy request to the gRPC port. Your mycreds.json should not have 30303 as the api_port. Its probably like 5000. Check your core.yaml.

from cp-web.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.