Search code examples
dockeribm-blockchainibp-vscode-extension

Failed to start Local Fabric


VSCode Extension IBM Blockchain platfrom , While running the fabric getting this error in Windows:

Error: No such container: fabricvscodelocalfabric_peer0.org1.example.com [10/23/2019 3:37:43 PM] [INFO] Error: No such container: fabricvscodelocalfabric_peer0.org1.example.com [10/23/2019 3:37:43 PM] [INFO] Error: No such container: fabricvscodelocalfabric_peer0.org1.example.com [10/23/2019 3:37:44 PM] [ERROR] Failed to start Local Fabric: Error: Failed to execute command "cmd" with arguments "/c, start.cmd" return code 1


Solution

  • prerequisites ensure you have all the correct versions of required software mentioned in the plugin

    I had this same problem on Windows 10. Here is how I solved it.

    1. Setup docker and make sure you can run the hello world program
    2. Setup the shared drive with a user with admin authority (I named it DockerHost) in the Docker Desktop. I could not use my id I log in with it is Azure and uses a pin or fingerprint.
    3. Ensure the shared drive for docker is accessible to admins or uses who will run docker
    4. Modify the permissions to the folder and all sub directories on C:\Program Files\Docker . I added the user DockerHost and ensured it had all privileges
    5. Uninstall the extension in VSCode
    6. Remove all blockchain extensions under the folder ~/.vscode/extenstions e.g. ibmblockchain.ibm-blockchain-platform*
    7. remove the folder ~/.fabric-vscode reinstall the extension in VSCode
    8. Run it to test (worked for me)

    While trying to figure this out I did a few steps 1). try to run the start.cmd directly from a command prompt saw error 2). try to run the start.cmd from a powershell with admin privileges, saw it worked 3). Beat my head a bit

    In my case the problem, could have been solved most likely by just adding and giving all privileges to the user DockerHost and Administrators group to the folder C:\Program Files\Docker and it's sub directories