Skip to content
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

fix(connector-fabric): chain code deployment fails >1 scp concurrency #1570

Closed
petermetz opened this issue Nov 23, 2021 · 2 comments · Fixed by #1572
Closed

fix(connector-fabric): chain code deployment fails >1 scp concurrency #1570

petermetz opened this issue Nov 23, 2021 · 2 comments · Fixed by #1572
Assignees
Labels
bug Something isn't working Fabric P3 Priority 3: Medium

Comments

@petermetz
Copy link
Member

Describe the bug

The original report and a suggested fix is here in the chat:

https://chat.hyperledger.org/channel/cactus?msg=ezAMbp6vphCtGzkc6

deepakwipro
2:50 AM
Failed to deploy contract to fabric network: Error: Received exit code 127 while establishing SFTP session

peter_somogyvari
peter_somogyvari
8:00 AM
deepakwipro Could you please post the code that you've written to assemble the deploy contract request and the logs of the API server when the 127 exit code is returned?


deepakwipro
8:15 PM
deploy.js

deepakwipro - Tue Nov 23 2021 09:45:35 GMT+0530 (India Standard Time).txt


deepakwipro
12:45 AM
I found some solution regarding this issue:-
I made change at line 207 in node_modules/@hyperledger/cactus-plugin-ledger-connector-fabric/dist/lib/main/typescript/plugin-ledger-connector-fabric.js.
I replaced await ssh.putDirectory(tmpDirPath, remoteDirPath); with await ssh.putDirectory(tmpDirPath, remoteDirPath,{concurrency: 1});

peter_somogyvari
peter_somogyvari
3:40 PM
deepakwipro You are the best, thank you so much for coming up with the fix at the same time. 🙂
I'll commit the fix ASAP and we'll have a release with it hopefully next week in the form of 1.0.0-rc.3
Please keep an eye out for the release and the release notes to know when the fix is published onto npm.

https://app.zenhub.com/files/216610150/d33b46c9-ad0c-47d7-88ca-a6c545aa6543/download

@petermetz petermetz added bug Something isn't working Fabric P3 Priority 3: Medium labels Nov 23, 2021
@petermetz petermetz self-assigned this Nov 23, 2021
petermetz added a commit to petermetz/cacti that referenced this issue Nov 23, 2021
Fixes hyperledger#1570

Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>
petermetz added a commit that referenced this issue Nov 28, 2021
Fixes #1570

Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>
@petermetz
Copy link
Member Author

Reopening because: https://chat.hyperledger.org/channel/cactus?msg=fRsY5rytH5grnZbzv

(the fix wasn't a real fix after all)


deetho
4:03 AM
I am Deepakwipro. I tried on remoteVM then it again throws same error. Last time, i tried to test it on localhost only so may be for that it started working after adding concurrency:1. Pls look into this issue for remoteVM,
peter_somogyvari

dheerajbudhiraja
4:04 AM
Getting same error:
Failed to deploy contract to fabric network: Error: Received exit code 127 while establishing SFTP session
at SFTP.onExit (/home/ubuntu/NodePro/node_modules/ssh2/lib/client.js:1500:23)


@petermetz petermetz reopened this Nov 30, 2021
@petermetz
Copy link
Member Author

Could no longer re-produce this for a long time. Closing until we can reproduce it again. Please feel free to reopen but make sure to provide detailed reproduction steps.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Fabric P3 Priority 3: Medium
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant