0

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

4b0
  • 21,981
  • 30
  • 95
  • 142
  • i tried with restart/stop/tearDown fabric still it is not working – Suma Satiwada Oct 23 '19 at 11:08
  • What version of windows are you using home/pro/enterprise ? what version of docker are you using, docker toolbox or docker for windows ? – david_k Oct 23 '19 at 11:10
  • window version i am using is Pro, docker version 19.03.1 for windows – Suma Satiwada Oct 23 '19 at 11:29
  • I am trying to do IBM Blockchain platform extension in VSCODE .while staring the local fabric i am getting the error 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 – Suma Satiwada Oct 23 '19 at 11:32
  • Can you provide the complete log that the extension outputs when trying to start the local fabric. The cause is likely to be somewhere in that log. Couple of other things to check though. 1 Make sure it isn't docker toolbox for windows (docker has 2 different versions for windows and the toolbox version won't work). 2. Ensure you have configured docker for linux containers not windows containers. 3 Ensure hyper-v has been enabled. – david_k Oct 23 '19 at 11:35
  • https://justpaste.it/1rzkh please go through that link I pasted the logs in that link – Suma Satiwada Oct 23 '19 at 11:52
  • Looks like a problem with your docker installation `The system cannot find the file specified. In the default daemon configuration on Windows, the docker client must be run elevated to connect. This error may also indicate that the docker daemon is not running` I would suggest going through the docker documentation to help verify you have docker working correctly. Also would recommend a reboot as well as I see that windows has also locked some files which may provide a further complication. – david_k Oct 23 '19 at 11:56
  • Now i am getting this error Error response from daemon: Container 0d60c15fb27a2722742402df2b4c40e88a4506ec7e2b37d917da13e10cc09822 is not running [10/24/2019 11:18:57 AM] [INFO] Error response from daemon: Container 0d60c15fb27a2722742402df2b4c40e88a4506ec7e2b37d917da13e10cc09822 is not running [10/24/2019 11:18:58 AM] [INFO] Error response from daemon: Container 0d60c15fb27a2722742402df2b4c40e88a4506ec7e2b37d917da13e10cc09822 is not running [10/24/2019 11:18:58 AM] [ERROR] Failed to start Local Fabric: Error: Failed to execute command "cmd" with arguments "/c, – Suma Satiwada Oct 24 '19 at 05:52
  • try searching all issues (both open and closed) here https://github.com/IBM-Blockchain/blockchain-vscode-extension/issues as other people have hit similar problems to see if their solns work for you. If not then raise an issue and provide as much detail as possible about the probem (including logs) plus what actions you have taken – david_k Oct 24 '19 at 11:51

3 Answers3

0

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

34blast
  • 16
  • 1
0

I ran across same issues on Windows 10, VS Code with IBM Blockchain platform extension. I am new to blockchain and I was following the documentation. This is how I resolved it:

Error: [INFO] Error: No such container: fabricvscodelocalfabric_peer0.org1.example.com

  1. Under Docker settings I shared my C drive and give Administrator password.

  2. Started Docker as a regular windows user. I got below error:

    Error: [INFO] Error response from daemon: Container 0d60c15fb27a2722742402df2b4c40e88a4506ec7e2b37d917da13e10cc09822 is not running

  3. This time restarted windows, and started Docker as an Administrator. I was able to finally start my local fabric successfully:

    [SUCCESS] Connected to Local Fabric
    

Hope this helps someone.

Community
  • 1
  • 1
user11160452
  • 43
  • 1
  • 9
0

Go to C:\Program Files\Docker, right-click the docker folder, go to permissions, security, Change permissions to full control and click okay and apply. This will allow the fabric environment to run in visual studio code

Hlobile S
  • 111
  • 1
  • 4