Solving the healthcheck issue

Hi folks!
We found out while looking at the syslog that there’s an issue with the sgx devices path.
It should look like this :

Jun  4 13:21:40 m2-skale01 dockerd[1642]: time="2020-06-04T13:21:40.968634383Z" level=error msg="stream copy error: reading from a closed fifo"
Jun  4 13:21:40 m2-skale01 dockerd[1642]: time="2020-06-04T13:21:40.968643930Z" level=error msg="stream copy error: reading from a closed fifo"
Jun  4 13:21:40 m2-skale01 dockerd[1642]: time="2020-06-04T13:21:40.969540676Z" level=warning msg="Health check for container 1fd769302cb36fc560cdf7b83bf449f71883cac4e451ddddefbb41b29101c4d9 error: OCI runtime exec failed: exec failed: container_linux.go:349: starting container process caused \"exec: \\\"ls /dev/isgx /dev/sg0\\\": stat ls /dev/isgx /dev/sg0: no such file or directory\": unknown"

@chadwick proposed a fix that solves the unhealty sgxwallet status.
You need to locate your sgxwallet folder and cd to run_sgx . Then you will need to edit the docker-compose.yml file and split the arguments as shown below :

healthcheck:
      test: ["CMD", "ls", "/dev/isgx","/dev/sg0"]

Devices names might vary on some machines.
Run ls /dev/mei0 /dev/bs0 /dev/isgx /dev/sg0 and see what’s yours.
An expected output would be the one below, where /dev/isgx /dev/sg0 are the listed devices:

ls: cannot access '/dev/mei0': No such file or directory
ls: cannot access '/dev/bs0': No such file or directory
/dev/isgx  /dev/sg0

After editing the docker-compose.yml file, do docker-compose down and docker-compose start.
docker ps -a | grep wallet should display a (healthy) status now.

6 Likes

Thanks for solving this.

Once you run

docker-compose down

you would need to run

docker-compose up -d

instead of docker-compose start

as the container wouldn’t exist anymore after the previous command.