Failed to deploy hyperledger-fabric - blockchain

this is my first time deploy hyperledger in my machine. i follow the tutorial from this. i already installed go version 1.19 and just download docker. when i try to run this command ./network.sh deployCC -ccn basic -ccp ../asset-transfer-basic/chaincode-go -ccl go i got an error
Error: failed to read chaincode package at 'basic.tar.gz': open basic.tar.gz: no such file or directory
PACKAGE_ID=
Error: failed to normalize chaincode path: 'go list' failed with: error obtaining VCS status: exit status 128
Use -buildvcs=false to disable VCS stamping.: exit status 1
i already try to use this command go env -w GO111MODULE=auto and still got nothing.
i am using go version go1.19.5
i hope i can just to deploy the tutorial.

Related

How to install deb package in aws codebuild worker container

I'm trying to build docker container and push to to ECR repository. All is working fine locally, but once moved to AWS I'm getting error:
dpkg-deb: error: 'docker-ce_20.10.3_3-0_ubuntu-bionic_amd64.deb' is not a Debian format archive
dpkg: error processing archive docker-ce_20.10.3_3-0_ubuntu-bionic_amd64.deb (--install):
dpkg-deb --control subprocess returned error exit status 2
from following commands in Docker file:
COPY docker-assets/docker-ce_20.10.3_3-0_ubuntu-bionic_amd64.deb /home/folder/
RUN dpkg -i docker-ce_20.10.3_3-0_ubuntu-bionic_amd64.deb
Can anyone hit the same issue / help me out ?
I did workaround this with URL

Failed to Run ReactNative App after converting expo app into react-native

This is mentioned that firstly I have created a react-native application using expo init ProjectName and it's run on my device what I wanted. But I am failed to make an APK file from this react native app (expo init ProjectName). This is why I wanna to create a react native using npx react-native init ProjectName and copy all the source code, app.js, package.json, and assets. After moving all the files I have used npm install --force because it's failed to install when I have used npm install. And then I have faced the error to run this code and the error is given bellow,
info Running jetifier to migrate libraries to AndroidX. You can disable it using "--no-jetifier" flag.
Jetifier found 1839 file(s) to forward-jetify. Using 8 workers...
info Starting JS server...
info Installing the app...
WARNING:: Please remove usages of `jcenter()` Maven repository from your build scripts and migrate your build to other Maven repositories.
This repository is deprecated and it will be shut down in the future.
See http://developer.android.com/r/tools/jcenter-end-of-service for more information.
Currently detected usages in: project ':react-native-picker_picker', project ':react-native-safe-area-context', project ':react-native-screens'
> Task :react-native-community_datetimepicker:compileDebugJavaWithJavac FAILED
66 actionable tasks: 61 executed, 5 up-to-date
Warning: Mapping new ns http://schemas.android.com/repository/android/common/02 to old ns http://schemas.android.com/repository/android/common/01
Warning: Mapping new ns http://schemas.android.com/repository/android/generic/02 to old ns http://schemas.android.com/repository/android/generic/01
Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/addon2/02 to old ns http://schemas.android.com/sdk/android/repo/addon2/01
Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/repository2/02 to old ns http://schemas.android.com/sdk/android/repo/repository2/01
Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/sys-img2/02 to old ns http://schemas.android.com/sdk/android/repo/sys-img2/01
D:\ReactNative\CovidVisa\node_modules\#react-native-community\datetimepicker\android\src\main\java\com\reactcommunity\rndatetimepicker\RNDatePickerDialogModule.java:23: error: package com.facebook.react.modul
e.annotations does not exist
import com.facebook.react.module.annotations.ReactModule;
^
D:\ReactNative\CovidVisa\node_modules\#react-native-community\datetimepicker\android\src\main\java\com\reactcommunity\rndatetimepicker\RNDatePickerDialogModule.java:31: error: cannot find symbol
#ReactModule(name = RNDatePickerDialogModule.FRAGMENT_TAG)
^
symbol: class ReactModule
D:\ReactNative\CovidVisa\node_modules\#react-native-community\datetimepicker\android\src\main\java\com\reactcommunity\rndatetimepicker\RNTimePickerDialogModule.java:13: error: package com.facebook.react.modul
e.annotations does not exist
D:\ReactNative\CovidVisa\node_modules\#react-native-community\datetimepicker\android\src\main\java\com\reactcommunity\rndatetimepicker\RNDateTimePickerPackage.java:12: error: com.reactcommunity.rndatetimepick
er.RNDateTimePickerPackage is not abstract and does not override abstract method createJSModules() in com.facebook.react.ReactPackage
public class RNDateTimePickerPackage implements ReactPackage {
^
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
5 errors
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':react-native-community_datetimepicker:compileDebugJavaWithJavac'.
> Compilation failed; see the compiler error output for details.
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 8s
error Failed to install the app. Make sure you have the Android development environment set up: https://reactnative.dev/docs/environment-setup. Run CLI with --verbose flag for more details.
Error: Command failed: gradlew.bat app:installDebug -PreactNativeDevServerPort=8081
Warning: Mapping new ns http://schemas.android.com/repository/android/common/02 to old ns http://schemas.android.com/repository/android/common/01
Note: The error is also given on the attached file, please concern about that. Advanced Thanks!

AWS Amplify CLI: An error occurred when pushing the resources to the cloud

I'm trying to upload some changes to a lambda function to the backend using amplify push. I've used it quite a few times with no issues whatsoever, but all of a sudden I've been getting errors and cannot push resources to the cloud
The errors happen after the following gets done:
Successfully pulled backend environment dev from the cloud.
I've been getting various error messages. This is the first:
Command failed with exit code 1: C:\Users\Name\go\bin\build-lambda-zip.exe -o H:\Documents\React
JS\ihubdashboard\amplify\backend\function\testgo\dist\latest-build.zip H:\Documents\React
JS\ihubdashboard\amplify\backend\function\testgo\bin\main
failed to compress file: open H:\Documents\React
JS\ihubdashboard\amplify\backend\function\testgo\bin\main: The system cannot find the file specified.
An error occurred during the push operation: Command failed with exit code 1:
C:\Users\Name\go\bin\build-lambda-zip.exe -o H:\Documents\React
JS\ihubdashboard\amplify\backend\function\testgo\dist\latest-build.zip H:\Documents\React
JS\ihubdashboard\amplify\backend\function\testgo\bin\main
failed to compress file: open H:\Documents\React
JS\ihubdashboard\amplify\backend\function\testgo\bin\main: The system cannot find the file specified.
This was the other:
Command failed with exit code 1: C:\Users\Name\go\bin\build-lambda-zip.exe -o H:\Documents\React
JS\ihubdashboard\amplify\backend\function\completeregistration\dist\latest-build.zip
H:\Documents\React JS\ihubdashboard\amplify\backend\function\completeregistration\bin\main
failed to compress file: open H:\Documents\React
JS\ihubdashboard\amplify\backend\function\completeregistration\bin\main: The system cannot find the
file specified.
An error occurred during the push operation: Command failed with exit code 1:
C:\Users\Name\go\bin\build-lambda-zip.exe -o H:\Documents\React
JS\ihubdashboard\amplify\backend\function\completeregistration\dist\latest-build.zip
H:\Documents\React JS\ihubdashboard\amplify\backend\function\completeregistration\bin\main
failed to compress file: open H:\Documents\React
JS\ihubdashboard\amplify\backend\function\completeregistration\bin\main: The system cannot find the
file specified.
Command failed with exit code 1: go get -u github.com/aws/aws-lambda-go/cmd/build-lambda-zip
# cd C:\Users\Name\go\src\github.com\aws\aws-lambda-go; git pull --ff-only
fatal: Unable to create 'C:/Users/Name/go/src/github.com/aws/aws-lambda-go/.git/ORIG_HEAD.lock': File
exists.
This is the current error message I am getting:
If no other git process is currently running, this probably means a
git process crashed in this repository earlier. Make sure no other git
process is running and remove the file manually to continue.
package github.com/aws/aws-lambda-go/cmd/build-lambda-zip: exit status 128
An error occurred during the push operation: Command failed with exit code 1: go get -u
github.com/aws/aws-lambda-go/cmd/build-lambda-zip
# cd C:\Users\Name\go\src\github.com\aws\aws-lambda-go; git pull --ff-only
fatal: Unable to create 'C:/Users/Name/go/src/github.com/aws/aws-lambda-go/.git/ORIG_HEAD.lock': File
exists.
If no other git process is currently running, this probably means a
git process crashed in this repository earlier. Make sure no other git
process is running and remove the file manually to continue.
package github.com/aws/aws-lambda-go/cmd/build-lambda-zip: exit status 128
Anybody experience this before? Or know what to do?
Thanks in advance
Turned out to be a bug - will be fixed. More details can be found in the following:
https://github.com/aws-amplify/amplify-cli/issues/6679
https://github.com/aws-amplify/amplify-cli/issues/6693

AWS: ERROR: Pre-processing of application version xxx has failed and Some application versions failed to process. Unable to continue deployment

Hi I am trying to deploy a node application from cloud 9 to ELB but I keep getting the below error.
Starting environment deployment via CodeCommit
--- Waiting for Application Versions to be pre-processed --- ERROR: Pre-processing of application version app-491a-200623_151654 has
failed. ERROR: Some application versions failed to process. Unable to
continue deployment.
I have attached an image of the IAM roles that I have. Any solutions?
Go to your console and open up your elastic beanstalk console. Go to both applications and environments and delete them. Then in your terminal hit
eb init #Follow instructions
eb create --single ##Follow instructions.
It would fix the error, which is due to some application states which are failed. If you want to check those do
aws elasticbeanstalk describe-application-versions
I was searching for this answer as a result of watching a YouTube tutorial for how to pass the AWS Certified Developer Associate exam. If anyone else gets this error as a result of that tutorial, delete the 002_node_command.config file created in the tutorial and commit that change, as that is causing the error to occur.
A failure within the pre-processing phase, may be caused by an invalid manifest, configuration or .ebextensions file.
If you deploy an (invalid) application version using eb deploy and you enable the preprocess option, The details of the error will not be revealed.
You can remove the --process flag and enable the verbose option to improve error output.
in my case I deploy using this command:
eb deploy -l "XXX" -p
And can return a failure when I mess around with .ebextensions:
ERROR: Pre-processing of application version xxx has failed.
ERROR: Some application versions failed to process. Unable to continue deployment.
With that result I can't figure up what is wrong,
but deploying without -p (or --process)and adding -v (verbose) flag:
eb deploy -l "$deployname" -v
It returns something more useful:
Uploading: [##################################################] 100% Done...
INFO: Creating AppVersion xxx
ERROR: InvalidParameterValueError - The configuration file .ebextensions/16-my_custom_config_file.config in application version xxx contains invalid YAML or JSON.
YAML exception: Invalid Yaml: while scanning a simple key
in 'reader', line 6, column 1:
(... details of the error ...)
, JSON exception: Invalid JSON: Unexpected character (#) at position 0.. Update the configuration file.
Now I can fix the problem.

Hyperledger Fabric My first network

I am trying to work on my first network in Hyperledger Fabric. Using the following documentation http://hyperledger-fabric.readthedocs.io/en/latest/build_network.html
I have completed the setup till http://hyperledger-fabric.readthedocs.io/en/latest/build_network.html#create-join-channel but when I run the
peer channel create -o orderer.example.com:7050 -c $CHANNEL_NAME -f ./channel-artifacts/channel.tx --tls $CORE_PEER_TLS_ENABLED --cafile /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem
I got hte following error:
Error: Got unexpected status: BAD_REQUEST
In attempt to resolve i follow the solution given at First network in hyperledger but faced error on running
/bin/bash -c './scripts/script.sh ${CHANNEL_NAME}; sleep $TIMEOUT'
I brought my network down using
./bfyn.sh -m down
and bring the network up that gave me following error:
ERROR: for orderer.example.com Cannot start service orderer.example.com: oci runtime error: container_linux.go:265: starting container process caused "process_
linux.go:368: container init caused \"rootfs_linux.go:57: mounting \\"/c/Users/lenovo/fabric-samples/first-network/channel-artifacts/genesis.block\\" to rootfs \\"/mnt/sda1/var/lib/docker/aufs/mnt/16c8954b277dec9a00370bdaa4316db282759b3dd6892ffc25f860a4c9e06d58\\" at\"/mnt/sda1/var/lib/docker/aufs/mnt/16c8954b277dec9a00370bdaa4316db282759b3dd6892ffc25f860a4c9e06d58/var/hyperledger/orderer/orderer.genesis.block\\" caused \\"not a directory\\"\"":Are you trying to mount a directory onto a file (or vice-versa)? Check if the specified host path exists and is the expected type ERROR: Encountered errors while bringing up the project.
ERROR !!!! Unable to start network
Error response from daemon: No such container: cli
Delete as admin the channel-artifacts folder, down the network and restart it. Your error must be related to an error at channel-artifacts generation.
You need to be in /c/users when you run the curl command, as documented here.
Continue on with other setup instructions
also, please make sure you run your docker command prompt in administrator mode.