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

Error running supply chain example #2312

Closed
inwonakng opened this issue Mar 7, 2023 · 3 comments
Closed

Error running supply chain example #2312

inwonakng opened this issue Mar 7, 2023 · 3 comments
Labels
bug Something isn't working

Comments

@inwonakng
Copy link

Describe the bug

I am trying to run the supply chain example application. I tried using the docker image as well as local build, and both seem to output a similar error with some connection error within the containers spawned by the app (my guess). The build and installation process work fine, but the last command yarn start is where the issue happens.

To Reproduce

  1. Configure project using node=16.14.2, following local instructions on https://github.com/hyperledger/cacti/tree/main/examples/supply-chain-app

  2. Run yarn start:supply-chain-app from the root folder

Expected behavior

Application frontend reachable at localhost:3200

Logs/Stack traces

[2023-03-07T21:46:38.868Z] DEBUG (FabricTestLedgerV1): [ghcr.io/hyperledger/cactus-fabric-all-in-one:v1.0.0-rc.2] '2023-03-07 21:46:38,859 INFO success: dockerd entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)\r\n'
[2023-03-07T21:46:38.868Z] DEBUG (FabricTestLedgerV1): [ghcr.io/hyperledger/cactus-fabric-all-in-one:v1.0.0-rc.2] ".2023-03-07 21:46:38,862 DEBG 'dockerd' stderr output:\r\n" <-- This prints multiple times, cropped out to save characters
[2023-03-07T21:46:38.869Z] DEBUG (FabricTestLedgerV1): [ghcr.io/hyperledger/cactus-fabric-all-in-one:v1.0.0-rc.2] '2023-03-07 21:46:38,862 INFO success: sshd entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)\r\n'
[2023-03-07T21:46:38.870Z] DEBUG (FabricTestLedgerV1): [ghcr.io/hyperledger/cactus-fabric-all-in-one:v1.0.0-rc.2] ".2023-03-07 21:46:38,870 DEBG 'dockerd' stderr output:\r\n"
[2023-03-07T21:46:39.000Z] DEBUG (FabricTestLedgerV1): [ghcr.io/hyperledger/cactus-fabric-all-in-one:v1.0.0-rc.2] "2023-03-07 21:46:38,998 INFO spawned: 'fabric-network' with pid 60\r\n"
[2023-03-07T21:46:39.002Z] DEBUG (FabricTestLedgerV1): [ghcr.io/hyperledger/cactus-fabric-all-in-one:v1.0.0-rc.2] ".2023-03-07 21:46:39,000 DEBG 'dockerd' stderr output:\r\n"
[2023-03-07T21:46:39.083Z] DEBUG (FabricTestLedgerV1): [ghcr.io/hyperledger/cactus-fabric-all-in-one:v1.0.0-rc.2] 'tar: write error: Broken pipe\r\n'
[2023-03-07T21:46:39.083Z] DEBUG (FabricTestLedgerV1): [ghcr.io/hyperledger/cactus-fabric-all-in-one:v1.0.0-rc.2] 'Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?\r\n'
[2023-03-07T21:46:39.083Z] DEBUG (FabricTestLedgerV1): [ghcr.io/hyperledger/cactus-fabric-all-in-one:v1.0.0-rc.2] "2023-03-07 21:46:39,082 DEBG 'fabric-network' stderr output:\r\n"
[2023-03-07T21:46:39.083Z] DEBUG (FabricTestLedgerV1): [ghcr.io/hyperledger/cactus-fabric-all-in-one:v1.0.0-rc.2] 'tar: write error: Broken pipe\r\n'
[2023-03-07T21:46:39.083Z] DEBUG (FabricTestLedgerV1): [ghcr.io/hyperledger/cactus-fabric-all-in-one:v1.0.0-rc.2] 'Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?\r\n'
[2023-03-07T21:46:39.084Z] DEBUG (FabricTestLedgerV1): [ghcr.io/hyperledger/cactus-fabric-all-in-one:v1.0.0-rc.2] ".2023-03-07 21:46:39,083 DEBG 'dockerd' stderr output:\r\n"
[2023-03-07T21:46:39.089Z] DEBUG (FabricTestLedgerV1): [ghcr.io/hyperledger/cactus-fabric-all-in-one:v1.0.0-rc.2] ".2023-03-07 21:46:39,088 DEBG 'dockerd' stderr output:\r\n"
[2023-03-07T21:46:39.091Z] DEBUG (FabricTestLedgerV1): [ghcr.io/hyperledger/cactus-fabric-all-in-one:v1.0.0-rc.2] '2023-03-07 21:46:39,089 DEBG fd 10 closed, stopped monitoring <POutputDispatcher at 139664074997232 for <Subprocess at 139664075167728 with name fabric-network in state STARTING> (stdout)>\r\n'
[2023-03-07T21:46:39.091Z] DEBUG (FabricTestLedgerV1): [ghcr.io/hyperledger/cactus-fabric-all-in-one:v1.0.0-rc.2] '2023-03-07 21:46:39,090 DEBG fd 16 closed, stopped monitoring <POutputDispatcher at 139664074997280 for <Subprocess at 139664075167728 with name fabric-network in state STARTING> (stderr)>\r\n'
[2023-03-07T21:46:39.092Z] DEBUG (FabricTestLedgerV1): [ghcr.io/hyperledger/cactus-fabric-all-in-one:v1.0.0-rc.2] '2023-03-07 21:46:39,090 INFO exited: fabric-network (exit status 1; not expected)\r\n'
[2023-03-07T21:46:39.092Z] DEBUG (FabricTestLedgerV1): [ghcr.io/hyperledger/cactus-fabric-all-in-one:v1.0.0-rc.2] '2023-03-07 21:46:39,090 DEBG received SIGCHLD indicating a child quit\r\n'

Screenshots

None

Cloud provider or hardware configuration:

I am running on a local machine.

Operating system name, version, build:

Linux 5.19.0-35-generic x86_64
PRETTY_NAME="Ubuntu 22.04.2 LTS"
NAME="Ubuntu"
VERSION_ID="22.04"
VERSION="22.04.2 LTS (Jammy Jellyfish)"
VERSION_CODENAME=jammy
ID=ubuntu
ID_LIKE=debian
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
UBUNTU_CODENAME=jammy

docker --version output:

Docker version 20.10.12, build 20.10.12-0ubuntu4

Hyperledger Cactus release version or commit (git rev-parse --short HEAD):

Release Version 1.1.3 (unpacked from zip)

Hyperledger Cactus Plugins/Connectors Used

  • Besu, Fabric, Quorom (everything included in examples/cactus-examples-supply-chain-backend/main/typescript/supply-chain-app.ts

Additional context

I believe the error is happening at the contract instantiation step. I tried going through the debug outputs, and the client seems to fail after this message appears in during the contract step

[2023-03-07T21:50:31.519Z] DEBUG (FabricTestLedgerV1): [ghcr.io/hyperledger/cactus-fabric-all-in-one:v1.0.0-rc.2] 'Error: could not assemble transaction, err proposal response was not successful, error code 500, msg error starting container: error starting container: Failed to generate platform-specific docker build: Error executing build: API error (500): OCI runtime create failed: container_linux.go:370: starting container process caused: process_linux.go:326: applying cgroup configuration for process caused: failed to write 1 to memory.kmem.limit_in_bytes: write /sys/fs/cgroup/memory/docker/bcfdf24802d46eb4e40ce166a503f68572e17f67448404a68e1c0bcefb6c6cc7/memory.kmem.limit_in_bytes: operation not supported: unknown ""\r\n'

I think may be a docker permission issue related to #2073. I was previously getting the cgroup error, but after following a few 'hacks' online to resolve this issue, I don't get it anymore but am getting this new problem. The whole log file (before I killed the process) is attached.

supply-chain-app-log.txt

@inwonakng inwonakng added the bug Something isn't working label Mar 7, 2023
@inwonakng
Copy link
Author

I realized this was a ubuntu kernel error with docker, and was able to fix it by downgrading my kernel version to 5.15.20 using this method and re-installing docker.

@Yogesh01000100
Copy link
Contributor

Yogesh01000100 commented Nov 19, 2023

still getting those log errors cannot connect to docker
im using this on local machine
kernel: 5.15.0-72-generic
Distributor ID: Ubuntu
Description: Ubuntu 22.04.3 LTS
Release: 22.04
Codename: jammy : [2023-11-19T11:23:40.896Z] DEBUG (FabricTestLedgerV1): [ghcr.io/hyperledger/cactus-fabric-all-in-one:v1.0.0-rc.2] 'Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?\r\n'
[2023-11-19T11:23:40.896Z] DEBUG (FabricTestLedgerV1): [ghcr.io/hyperledger/cactus-fabric-all-in-one:v1.0.0-rc.2] 'tar: write error: Broken pipe\r\n'
[2023-11-19T11:23:40.897Z] DEBUG (FabricTestLedgerV1): [ghcr.io/hyperledger/cactus-fabric-all-in-one:v1.0.0-rc.2] "2023-11-19 11:23:40,895 DEBG 'fabric-network' stderr output:\r\n"
[2023-11-19T11:23:40.897Z] DEBUG (FabricTestLedgerV1): [ghcr.io/hyperledger/cactus-fabric-all-in-one:v1.0.0-rc.2] 'Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?\r\n'
[2023-11-19T11:23:40.898Z] DEBUG (FabricTestLedgerV1): [ghcr.io/hyperledger/cactus-fabric-all-in-one:v1.0.0-rc.2] 'tar: write error: Broken pipe\r\n'
[2023-11-19T11:23:40.899Z] DEBUG (FabricTestLedgerV1): [ghcr.io/hyperledger/cactus-fabric-all-in-one:v1.0.0-rc.2] ".2023-11-19 11:23:40,898 DEBG 'dockerd' stderr output:\r\n"
[2023-11-19T11:23:40.906Z] DEBUG (FabricTestLedgerV1): [ghcr.io/hyperledger/cactus-fabric-all-in-one:v1.0.0-rc.2] '2023-11-19 11:23:40,899 DEBG fd 10 closed, stopped monitoring <POutputDispatcher at 140323581095408 for <Subprocess at 140323581265904 with name fabric-network in state STARTING> (stdout)>\r\n'
[2023-11-19T11:23:40.909Z] DEBUG (FabricTestLedgerV1): [ghcr.io/hyperledger/cactus-fabric-all-in-one:v1.0.0-rc.2] '2023-11-19 11:23:40,899 DEBG fd 16 closed, stopped monitoring <POutputDispatcher at 140323581095456 for <Subprocess at 140323581265904 with name fabric-network in state STARTING> (stderr)>\r\n'
[2023-11-19T11:23:40.910Z] DEBUG (FabricTestLedgerV1): [ghcr.io/hyperledger/cactus-fabric-all-in-one:v1.0.0-rc.2] '2023-11-19 11:23:40,899 INFO exited: fabric-network (exit status 1; not expected)\r\n'

@petermetz
Copy link
Contributor

5.15.0

@Yogesh01000100 Not sure if this is the actual root cause or not but it definitely is an issue that you are using an old kernel that is older than what @inwonakng installed to fix the issue, so I'd look into those steps first.

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

No branches or pull requests

3 participants