Open FYhassy opened 1 year ago
It looks like your Docker environment ran out of memory. If so, I guess the only solution might be to increase the resources available to Docker.
Thank you for an answer. I will check the memory usage as you told me. If it still doesn't work, please let me consult with you again.
[Describe the bug]
The following command fails when a large number of packages are installed. (In this environment, 56 chaincodes have been installed under different names.)
peer lifecycle chaincode install /var/tmp/fabcar057.tar.gz
--errormessage1-- Error: chaincode install failed with status: 500 - failed to invoke backing implementation of 'InstallChaincode': could not build chaincode: docker build failed: docker image build failed: Post "http://xxx.xxx.xxx.xxx:xxxx/build?networkmode=fabric_default&t=CHAINCODE-CONTAINER-NAME": docker build failed: Error executing build: API error (500): failed to create shim: OCI runtime create failed: container_linux.go:380: starting container process caused: process_linux.go:545: container init caused: Running hook #0:: error running hook: exit status 2, stdout: , stderr: runtime/cgo: pthread_create failed: Resource temporarily unavailable --errormessage2-- Error: chaincode install failed with status: 500 - failed to invoke backing implementation of 'InstallChaincode': could not build chaincode: docker build failed: docker image build failed: Post "http://xxx.xxx.xxx.xxx:xxxx/build?networkmode=fabric_default&t=CHAINCODE-CONTAINER-NAME": docker build failed: Error executing build: API error (500): failed to create shim: OCI runtime create failed: container_linux.go:380: starting container process caused: process_linux.go:545: container init caused: Running hook #0:: error running hook: exit status 2, stdout: , stderr: fatal error: runtime: cannot allocate memory
[Expected behavior]
The package can be installed.
[Logs/Stack traces]
Refer to Describe the bug
[Operating system name, version, build]
XXXX@server:~$ printf "$(uname -srm)\n$(cat /etc/os-release)\n" Linux 5.4.0-97-generic x86_64 NAME="Ubuntu" VERSION="20.04.4 LTS (Focal Fossa)" ID=ubuntu ID_LIKE=debian PRETTY_NAME="Ubuntu 20.04.4 LTS" VERSION_ID="20.04" 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" VERSION_CODENAME=focal UBUNTU_CODENAME=focal