How to run the graph-node in the rinkeby test rpc - blockchain

I am trying to write a subgraph for the contract which is deployed in the rinkeby test network.
for that I need to run the graph-node in the same rinkeby test network.
With the reference of the below repo
https://github.com/graphprotocol/graph-node
I am running it in my local machine using the below cargo command
cargo run -p graph-node --release -- --postgres-url postgresql://postgres:postgres#localhost:5432/graph-node --ethereum-rpc 'rinkeby:https://rinkeby.infura.io/v3/2a46ac7cdb4c44acac4de87dadfd6e39' --ipfs 127.0.0.1:5001
I used infura.io for getting the rinkeby rpc url.
but its throws an error 401 Unauthorized. I don't know where i am making the mistake.
I m unable to connect the rinkeby network.
Kindly please help me to resolve the issue.
Thanks in advance.

It looks like your Infura endpoint is not set up correctly, check your project ID and the permissions you have set up in your account, some examples can be found here or via your Infura login: https://infura.io/docs/gettingStarted/chooseaNetwork

I did a blunder mistake in the command.
removing the single quote in the rpc url resolves the issue
cargo run -p graph-node --release -- --postgres-url postgresql://postgres:postgres#localhost:5432/graph-node --ethereum-rpc rinkeby:https://rinkeby.infura.io/v3/2a46ac7cdb4c44acac4de87dadfd6e39 --ipfs 127.0.0.1:5001

Related

Problem Authenticating requests with NEWMAN while building on TRAVIS CI

I have made a POSTMAN COLLECTION that tests GOOGLE BOOKS API responses to POST requests.
I run this collection with NEWMAN and 2 environment variables : apiKey and dynamicToken.
I then push the project on github using TRAVIS CI to run the tests.
I am encountering remote authentification issues.
While locally (postman or newman cli) authentification works fine : responses status code 200
Once deployed and ran with TRAVIS authentification fails : responses status code 401
I have tried several ways to set the variables that handles authentification.
And finally to isolate the issue I ran the command with hard scripted apyKey and Token.
Here is the command that works locally but not on TRAVIS:
newman run gbook_test.postman_collection.json --env-var "apiKey=<apikeyValue>" --env-var "dynamicToken=<tokenValue>" -d gbook_test.postman_datas.json
Where
<apikeyValue>: is the valid value of my apikey,
<tokenValue>: is the valid value of my token.
What am I missing ?
Thanks.

Problems using Halyard to configure GCP as cloud provider in a new Spinnaker installation when my GCP Network is not called 'Default'

I'm using this guidelines:
https://www.spinnaker.io/setup/install/providers/gce/
When I'm running this line:
hal config provider google account add my-gce-account --project $PROJECT --json-path $SERVICE_ACCOUNT_DEST
I get an error:
Problems in default.provider.google: ! ERROR Network default not found via any configured google
When I run the entire process in a project that has a 'default' named network, it works fine.
I was not able to find how I say to Halyard that my network has another name.
Could someone help me?
Thanks
#Thiago you might have to go an edit .hal/config and modify network: default to network: <your-custom-network-name> and followed by hal deploy apply. We ran into same issue, this is a dirty hack that worked for us.
I had a similar problem, for my setup it turned out that bakery was running in the wrong zone, so expanding on the previous response:
$ hal config provider google bakery edit --network <your-custom-network-name>
$ hal config provider google bakery edit --zone <your-zone>
$ sudo hal deploy apply
The full spec for options can be found here:
https://www.spinnaker.io/reference/halyard/commands/#hal-config-provider-google-bakery-edit
Thanks to Sweeti Bharti's response, it led me to that response :)

appcfg.py request_logs certificate verify failed (_ssl.c:661)

We've been using appcfg.py request_logs to download GAE logs, every once in a while it throws the error:
httplib2.SSLHandshakeError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:661)
But after a few times trying it works out, sometimes also it works after updating gcloud using gcloud components update. We thought it might be some network throttling issue of some kind and didn't give it enough thought. Lately though, we're trying to figure out what is causing this.
The full command we use is:
appcfg.py request_logs -A testapp --version=20180321t073239 --severity=0 all_logs.log --append --no_cookies
It seems the error is related to httplib2 library, but since it is part of the appcfg.py calls we're not sure we should tamper with something within its calls
Versions:
Python 2.7.13
Google Cloud SDK 196.0.0
app-engine-python 1.9.67
This has become more persistent now and I couldn't download logs for a few days now no matter how many times I try.
Looking at the download logs command I tried the same command again but without the --no_cookies flag to see what would happen.
appcfg.py request_logs -A testapp --version=20180321t073239 --severity=0 all_logs.log --append
I got the error:
Error 403: --- begin server output ---
You do not have permission to modify this app (app_id=u'e~testapp').
--- end server output ---
Which lead me to the answer provided here https://stackoverflow.com/a/34694577/1394228 by #ninjahoahong. This worked for me and logs where downloaded from first trial in case someone faces the same issue
There's also this Google Group post which I didn't try but seems like it does the same thing.
Not sure if removing the file ~/.appcfg_oauth2_tokens would have other effects, yet to find out.
Update:
I also found out that my httplib2 located at /Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/lib/httplib2 was version = "0.7.5", I upgraded it to version = '0.11.3' using target location(directory) upgrade command:
sudo pip2 install --upgrade httplib2 -t /Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/lib/httplib2/

WSO2 Identity Server SAML Error encrypting XMLObject at Example Travelocity

When setting in the sample app: Travelocity.properties
#Specify if SAM LAssertion element is encrypted
SAML.EnableAssertionEncryption=true
And also tick the Identity server configuration option:
Enable Assertion Encryption [ticked]
Certificate Alias: wso2carbon
I receive the following error at the server log:
Error at Log: 2015-05-05 15:56:10,282 Error encrypting XMLObject
Without the encryption feature enabled, the SAML authentication flow with the Travelocity sample code starts working.
Hints are welcome how to fix this issue.
Regards,
Claude
It seems like you are working on the installed java runtime for the first time. I am using ubuntu 14. The same problem came to me. For me it worked in the following way.
1. Download the respective files according to your runtime from here.
http://www.oracle.com/technetwork/java/javase/downloads/jce-7-download-432124.html
http://www.oracle.com/technetwork/java/javase/downloads/jce-6-download-429243.html
http://www.oracle.com/technetwork/java/javase/downloads/jce8-download-2133166.html
2. Extract the folder you downloaded. There will be two .jar files.
3. For ubuntu you can run echo $JAVA_HOME to find the java home. Copy above jar files into {JAVA_HOME}/jre/lib/security. You may need sudo access depending on you JAVA_HOME location. If so run the following from the location you extracted the zip file.
cp local_policy.jar /{JAVA_HOME}/jre/lib/security
cp US_export_policy.jar /{JAVA_HOME}/jre/lib/security
There should be only one slash (/) at /{JAVA_HOME}.
4. Restart wso2 identity server again and retry the procedure to login to travelocity.com
Hope this will fix your issue.

How to change an existing build status in Artifactory from a Jenkins job

Hi I am having a Jenkins build pipeline like this: 1. builds the app and deploys to Artifactory; 2. runs an SSH exec command on the test server (remote) to download the artifacts and deploys them into the right directory; 3. runs web tests against the test server, if passed, changes the build status in Artifactory to something like pre-staging for further manual UAT testing. My question is, how to change the build status in Artifactory from a Jenkins job. If using Artifactory's RESTAPI is necessary, can someone share an example? Much appreciated!
Yes, REST API is the easiest way.
You need to perform a Build Promotion call. Please note it requires Artifactory Pro.
It's a POST request, accepting simple json string, in which only two properties are mandatory: status and ciUser.
The call should look something like this:
curl -X POST -u admin:password -H "Content-Type: application/json" -d '{"status":"tests passed","ciUser":"jenkinsAdmin"}' "http://localhost:8081/artifactory/api/build/promote/buildName/buildNumber"