-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error when invoking middleware/createTradeApp.js with release-1.4 #72
Comments
@Hull4Progress Just to make sure that versioning is consistent across modules, can you check what versions of the Typically there shouldn't be a breaking change across minor versions but there's no guarantee of that. If this still doesn't work, I'll do some debugging. |
Thank you for your ultra-quick response. Unfortunately the same bug seems to be occurring, but let me tell you some things that I attempted.
And, when I invoke "> node createTradeApp.js" I get the same error as before. I am attaching here a new set of logs from orderer.trade.com, peer0.importerorg.trade.com, and ca_peerImporterOrg, although these look the same as before. I am also attaching the output from when I ran "> npm install", in case that is useful. Thanks! ca_peerImporterOrg--log.txt |
@Hull4Progress I tested this out and made a small change to the (It seems version 1.4.5 requires these setting changes to be explicit whereas 1.4.0 didn't.) About your Xcode issues, I can't offer any advice as I develop on Linux. Perhaps @ldesrosi can help? |
Hi - Thank you for your comments. Here are some points
Do you have some additional suggestions? BTW, I am a former IBMer, and I am still in contact with Petr Novotny. I think you are in India, and I will be up for a while - would you possibly have some time when you start working this morning, in the next 2 or 3 hours, to have a skype or webex call to attempt to troubleshoot this in realtime? << contact info deleted >> Thanks |
@Hull4Progress I'm in the India Research Lab blockchain team and used to attend your weekly calls back in 2016, especially the discussions on the smart contract framework. I had meetings in the morning, so I'm just getting free time now, sorry. What you observed in (2) is strange. I know the version numbers were inconsistent, but I followed the example in the fabric samples: https://github.com/hyperledger/fabric-samples/blob/release-1.4/first-network/configtx.yaml. I assumed there's a reason for keeping different version numbers, and this worked for me. I suspect the version difference is why you are still getting the error in (4). Can you display the container image versions? Run |
@VRamakrishna -- Hi - Thanks for your reply and patience. Good news - when I started with the clean slate (removing channel-artifacts, crypto-config, and docker-compose-e2e.yaml, then it has worked, at least up to the "> node createTradeApp.js" command. (I'm not sure why it didn't work for me before, I thought I had started with a clean slate. Oh well). BTW, here is the listing of my images. I am curious why there are 3 versions of everything, and how does trade.sh know to use the 1.4.5 versions? rick@mac4hull network % docker images | grep hyperledger I will continue with the other steps in ../middleware. Hopefully it all works now. Thanks again. |
@Hull4Progress They aren't different versions but rather the same images with different sets of tags (see the image IDs, they are identical). If you examine the list, every image has a Anyway, glad you were able to get things to work. Good luck! I'll close this issue now. |
@VRamakrishna Hi - BTW - that is nice to know that we crossed paths a few years ago. Actually, there may be a further "bug". I was successful with createTradeApp.js, which runs through all of the steps. However, now I am attempting the "Test Run to Add a New Organization to the Network". I checked whether the config_upgrade.json was consistent with the specs in network folder, and that seems OK. (For one thing, config.json and config_upgrade.json agree on the 4 original orgs.) In the network folder I invoked "> ./trade.sh createneworg" to generate the cryptographic and channel artifacts for exportingentityorg. Here is the console output from that: ================ rick@mac4hull network % ./trade.sh createneworg ###################################################################### Generate certificates for new org using cryptogen tool######################################################################
/Users/rick/go/src/github.com/hyperledger/fabric/.build/bin/configtxgen
============================ However, there may have been something wrong with the outcome, because I see that in the folder ../network/channel-artifacts that there is a file exportingEntityOrg.json. Which doesn't match the pattern of the other orgs, which have files such as ImporterOrgMSPanchors.tx Anyway, then in the ../middleware folder I invoked "> node run-upgrade-channel.js" and got the following console output ======================== rick@mac4hull middleware % node run-upgrade-channel.js
Successfully enrolled user 'admin' for orderer CHANNEL UPGRADE FAILED: Error: Error: Error: Command failed: configtxlator proto_encode --input ./tmp/modified_config.json --type common.Config --output ./tmp/modified_config.pb
==================== ( I checked that I have version 1.4.5 for both fabric-client and fabric-ca-client, as shown by this command ===================== rick@mac4hull middleware % npm list | grep fabric ======================== |
@Hull4Progress First: run The file I don't know why you are getting an error with
The following looks like there is an incompatibility between the structure and the expected schema:
Now, assuming that you built |
Hi - BTW, I realize that when I make a "clean start" with ../network/trade.sh up, not only do I need to delete channel-artifacts, crypto-configs and docker-compose-e2e.yaml, but also I need to delete client-certs. Otherwise things break in the middle of executing ../middleware/createTradeApp.js. |
Also - I am still stuck on errors in ../middleware/run-upgrade-channel.js which read configtxlator: error: open /dev/stdout: permission denied, try --help I agree that there seems to be a read/write permission challenge here, but I haven't solved it. Can you please tell me the specific versions of node, npm, go that you are using? And whether it is different for different directories? Some of the versions I've been testing with include -- in the hyperledger directory I have node v10.19.0 / npm 5.6.0 , (because https://hyperledger-fabric.readthedocs.io/en/release-1.4/prereqs.html says that I should) -- in the ../middleware directory I have node v.9.8.0 / npm 5.7.1 (because https://github.com/HyperledgerHandsOn/trade-finance-logistics/tree/release-1.4/middleware says that I should) Does that match your set up? |
Yes, you need to delete |
I checked my setup, and I was running node v10.19.0. But I downgraded to 9.8.0 and ran the complete workflow successfully. I don't believe the application is very sensitive to node/npm versions. The suggestions made in the READMEs are just guidelines. |
It looks like you deleted an earlier comment? I got it in my email though. I believe you were getting those errors while running About the configtxlator, I'm not sure how to help. What the code is doing is trying to execute a shell command in the Node.js runtime (using the |
Yes - I did radically edit one of my comments, because at some point I realized that part of my problem was that I wasn't cleaning out the client-certs. Sorry about that. Thanks for pointing to the './trade.sh clean' capability. Yes, I tried to give global permissions for /dev/stdout, but that doesn't work immediately because /dev/stdout is being used as a link to other more concrete directories. I had also been experimenting with different versions of go, etc. But I will go back to trying to investigate the global permissions further. |
Hi @VRamakrishna -- Thank you for your observation that there seemed to be an access permissions problem going on. Indeed, it appears that with the OSX version that I am using -- Catalina 10.16.3 -- there are some new security features that block programs and apps from getting at certain things. I decided to switch to Ubuntu in VirtualBox, and I have successfully run the entire exercise for the network folder and the middleware folder. So, that is good news. (I will be trying the application folder soon.) Can I suggest that you alert users of your website (at least for release-1.4, but probably for all releases) that parts of the HL Fabric won't work with Mac OSX Catalina (and perhaps with some of the preceding OSX versions)? Perhaps in the README.md for the page https://github.com/HyperledgerHandsOn/trade-finance-logistics/tree/release-1.4. BTW, I did post a comment into the HL JIRA to see if they would give a response. You can see that as the second comment in https://jira.hyperledger.org/browse/FAB-16987?jql=text%20~%20%22catalina%22 . But perhaps I should have started a new thread in the JIRA - what do you think? I think it is now appropriate to close this issue. Thanks again very much for your timely and on-going assistance. |
@Hull4Progress Good to know you got it working, and thanks for letting me know. We will add warnings to our instructions as you suggest. (Not being a Mac developer nor having access to a Mac prevents me from even attempting to fix your issue.) @ldesrosi FYI. I'll close this now. |
Hi - I am attempting to run middleware/createTradeApp.js with release-1.4, but am getting an error (please see below)
I am following the instructions in the README.md at https://github.com/HyperledgerHandsOn/trade-finance-logistics/tree/release-1.4/middleware. I believe that all of my config parameters in the network and middleware directories are consistent.
I believe that my error is not related to Issue #3 (Race condition during channel join in createTradeApp.js). (As one attempt to debug, I extended the sleep time at line 196 of create-channel.js, but still getting same error.)
Here is the console output when I invoke createTradeApp.js:
++++++++++++++
rick@mac4hull middleware % node createTradeApp.js
2020-02-07T08:05:53.600Z - info: [ClientUtils]:
Successfully extracted the config update from the configtx envelope
Successfully enrolled user 'admin' for exporterorg
Successfully signed config as admin of exporterorg
Successfully enrolled user 'admin' for importerorg
Successfully signed config as admin of importerorg
Successfully enrolled user 'admin' for carrierorg
Successfully signed config as admin of carrierorg
Successfully enrolled user 'admin' for regulatororg
Successfully signed config as admin of regulatororg
Successfully enrolled user 'admin' for every org and obtained channel config signatures
Successfully enrolled user 'admin' for orderer
2020-02-07T08:05:53.987Z - error: [Orderer.js]: sendDeliver - rejecting - status:NOT_FOUND
Channel tradechannel does not exist yet (IGNORE ANY ORDERER ERROR MESSAGES YOU SEE ABOVE!!)
Successfully signed config update as orderer admin
{ status: 'BAD_REQUEST',
info: 'error validating channel creation transaction for new channel 'tradechannel', could not succesfully apply update to template configuration: error authorizing update: error validating DeltaSet: policy for [Group] /Channel/Application not satisfied: implicit policy evaluation failed - 0 sub-policies were satisfied, but this policy requires 1 of the 'Admins' sub-policies to be satisfied' }
"-------------------------"
CHANNEL CREATION FAILED: Error: Error: Failed to create the channel.
at Client.newDefaultKeyValueStore.then.then.then.then.then (/Users/rick/go/src/trade-finance-logistics/middleware/create-channel.js:201:10)
at
at process._tickCallback (internal/process/next_tick.js:189:7)
at Client.newDefaultKeyValueStore.then.then.then.then.then.then (/Users/rick/go/src/trade-finance-logistics/middleware/create-channel.js:209:9)
at
at process._tickCallback (internal/process/next_tick.js:189:7)
"-------------------------"
++++++++++++++
Any suggestions would be appreciated.
(In case it is useful, I have attached logs from 3 of the containers.)
ca_peerImporterOrg--log.txt
orderer.trade.com--log.txt
peer0.importerorg.trade.com--log.txt
Thanks
The text was updated successfully, but these errors were encountered: