Consensys/quorum-examples

Windows 10 Docker-Machine filesystem mapping issue

richardackroyd opened this issue · 1 comments

Hi, this may owe to my local setup but flagging in case not. I found the TX Manager containers were giving json errors when running the java code. The root cause owed to not being able to open the keys provided through file mapping in docker-compose which resulted in a value missing in the json.

Output of the error :

`D:\code\quorum-examples>docker logs 270d0f6cbe8c

TxManager: tessera
cp: can't stat '/examples/keys/tm2.pub': No such file or directory
cp: can't stat '/examples/keys/tm2.key': No such file or directory
Tessera version (extracted from manifest file): 0.8
Config type
cat: can't open '/qdata/tm/tm.key': No such file or directory
cat: can't open '/qdata/tm/tm.pub': No such file or directory
cat: can't open '/qdata/tm/tm.key': No such file or directory
cat: can't open '/qdata/tm/tm.pub': No such file or directory
Invalid json, error is Invalid token=COMMA at (line no=56, column no=31, offset=1842). Expected tokens are: [CURLYOPEN, SQUAREOPEN, STRING, NUMBER, TRUE, FALSE, NULL]`

The issue was with the json file can be seen here:

"keyData": [ { "config": , "publicKey": "" }

where the config value should be 'cat tm.key' in the docker-compose.

When I investigated, the docker-machine was not seeing any content below ./examples/7nodes mapped to /examples in the docker-compose, preventing the content of tm.key being available. I manually created the 7nodes/keys directory, set permissions and copied the .key and .pub files over from my Windows 10 machine to the docker-machine and now the TC Manager starts up and becomes healthy.

Versions:

  • Docker version 18.09.1, build 4c52b90
  • docker-compose version 1.23.2, build 1110ad01
  • docker-machine version 0.16.1, build cce350d7
  • docker-machine using VirtualBox 5.2.16
  • Windows 10 Pro
trung commented

@richardackroyd i noticed that your location is D:\code\quorum-examples.

Have you configure Docker Desktop/Toolbox to have this shared?

For Docker Desktop: https://blogs.msdn.microsoft.com/stevelasker/2016/06/14/configuring-docker-for-windows-volumes/
For Docker Toolbox (boot2docker via Virutalbox): Virtual Box -> Right click on default -> Shared Folders. Remember to docker-machine restart default.