specifying the TiKV cluster endpoint as the backing data store error - tikv

1.start tikv commang:
# tiup playground --tag surrealdb --mode tikv-slim --pd 1 --kv 1
tiup is checking updates for component playground ...
Starting component `playground`: /root/.tiup/components/playground/v1.11.0/tiup-playground --tag surrealdb --mode tikv-slim --pd 1 --kv 1
Using the version v6.2.0 for version constraint "".
If you'd like to use a TiDB version other than v6.2.0, cancel and retry with the following arguments:
Specify version manually: tiup playground <version>
Specify version range: tiup playground ^5
The nightly version: tiup playground nightly
Playground Bootstrapping...
Start pd instance:v6.2.0
Start tikv instance:v6.2.0
PD client endpoints: [127.0.0.1:2379]
To view the Prometheus: http://127.0.0.1:9090
To view the Grafana: http://127.0.0.1:3000
2.start surrealdb,specifying the TiKV cluster endpoint as the backing data store.
[2022-09-25 04:12:10] INFO surrealdb::iam Root authentication is enabled
[2022-09-25 04:12:21] INFO surrealdb::iam Root username is 'root'
[2022-09-25 04:12:26] INFO surrealdb::dbs Database strict mode is disabled
[2022-09-25 04:12:32] INFO surrealdb::kvs Connecting to kvs store at tikv://127.0.0.1:2379
[2022-09-25 04:13:32] INFO surrealdb::kvs Connected to kvs store at tikv://127.0.0.1:2379
[2022-09-25 04:13:36] ERROR surrealdb::cli There was a problem with the database: There was a problem with the underlying datastore: [/home/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/tikv-client-pd-0.1.0/src/cluster.rs:174]: PD cluster failed to respond
prompt error:“ERROR surrealdb::cli There was a problem with the database: There was a problem with the underlying datastore: [/home/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/tikv-client-pd-0.1.0/src/cluster.rs:174]: PD cluster failed to respond”。

I had this exact problem on my M1 Mac Mini. Here are the steps I took to solve it.
Reinstall Surreal DB:
brew reinstall surreal
Reboot:
Just in case...
Open a terminal window and start tiup:
tiup playground --tag surrealdb --mode tikv-slim --pd 1 --kv 1
Open another terminal window and start SurrealDB:
surreal start --log debug --user root --pass root memory
Hope this helps.

Related

Why would an AppEngine deploy fail with a build failure?

I started working on an app and suddenly it fails to deploy to appengine, with the following error message:
siim#pebble:~/projects/xyz$ gcloud app deploy
Services to deploy:
descriptor: [/home/siim/projects/xyz/app.yaml]
source: [/home/siim/projects/xyz]
target project: [xyz]
target service: [default]
target version: [20220313t182940]
target url: [https://xyz.uc.r.appspot.com]
target service account: [App Engine default service account]
Do you want to continue (Y/n)? y
Beginning deployment of service [default]...
╔════════════════════════════════════════════════════════════╗
╠═ Uploading 2 files to Google Cloud Storage ═╣
╚════════════════════════════════════════════════════════════╝
File upload done.
Updating service [default]...failed.
ERROR: (gcloud.app.deploy) Error Response: [9] Cloud build 016c4604-6ea6-47df-8144-e7f1471c6df6 status: FAILURE
removing /layers/google.go.gomod/gopath: unlinkat /layers/google.go.gomod/gopath/pkg/mod/github.com/golang/protobuf#v1.3.1/regenerate.sh: permission denied
Full build logs: https://console.cloud.google.com/cloud-build/builds;region=us-central1/016c4604-6ea6-47df-8144-e7f1471c6df6?project=576574664421
Clicking through to the build log, I see:
===> DETECTING
google.go.appengine_gomod 0.9.0
google.go.gomod 0.9.0
google.go.build 0.9.0
google.go.appengine 0.9.0
google.utils.label 0.0.2
===> ANALYZING
Previous image with name "us.gcr.io/xyz/app-engine-tmp/app/default/ttl-18h:69af35b6-6fc6-4167-88f3-da16f9cfc7e7" not found
Restoring metadata for "google.go.gomod:gopath" from cache
===> RESTORING
Restoring data for "google.go.gomod:gopath" from cache
===> BUILDING
=== App Engine Gomod (google.go.appengine_gomod#0.9.0) ===
--------------------------------------------------------------------------------
Running "cp --dereference -R . /layers/google.go.appengine_gomod/srv"
Done "cp --dereference -R . /layers/google.go.appengine_gomod/srv" (53.220262ms)
=== Go - Gomod (google.go.gomod#0.9.0) ===
DEBUG: go.mod SHA has changed: clearing GOPATH layer's cache
Failure: (ID: f51775d1) removing /layers/google.go.gomod/gopath: unlinkat /layers/google.go.gomod/gopath/pkg/mod/github.com/golang/protobuf#v1.3.1/regenerate.sh: permission denied
--------------------------------------------------------------------------------
Running "mv -f /builder/outputs/output-5577006791947779410 /builder/outputs/output"
Done "mv -f /builder/outputs/output-5577006791947779410 /builder/o..." (5.980458ms)
ERROR: failed to build: exit status 1
I'm completely mystified by this. AFAICT this is something AppEngine does internally so I don't think I have any way to debug this further? FWIW, my app is super simple ATM:
module xyz
go 1.17
require (
github.com/go-chi/chi/v5 v5.0.7
go.etcd.io/bbolt v1.3.6
google.golang.org/appengine/v2 v2.0.1
)
require (
github.com/golang/protobuf v1.3.1 // indirect
golang.org/x/sys v0.0.0-20200923182605-d9f96fdee20d // indirect
)
And:
runtime: go116
main: ./cmd/server
The solution was to go to container registry (maybe artifact registry soon) in the cloud console and delete all the containers there. The issue was quite likely just one of those images (maybe the build cache one) but my app is not released so I could just delete all of them.
I resolve it using --no-cache option, but its not perfect because cache is not enabled.
$ gcloud app deploy app.yaml --no-cache

React.js not connecting to (localhost) Ganache on EC2: ERR_CONNECTION_REFUSED 127.0.0.1:8545

Using the following installation on Ubuntu Server 20.04 :
sudo apt-get update
sudo apt-get install nodejs
sudo apt install python2
sudo apt install npm
npm install ganache-cli
npm install node-gyp#3.6.2
npm install truffle#5.1.39
sudo npm install create-react-app#3.3.1 -global
npm install
I am having the error
Failed to load resource: net::ERR_CONNECTION_REFUSED 127.0.0.1:8545/:1
I am running ganache with the command line interface:
I can test the connection via node command prompt
To which I am able to verify a connection to ganache private blockchain
Then I try App.js in React
obtaining the following error:
I have tried the following:
1.) Setting up a proxy under package.json : http://127.0.0.1:8545
2.) Trying http://0.0.0.0:8545
3.) Setting up a middleware proxy account as presented in the following solution:
https://medium.com/bb-tutorials-and-thoughts/react-how-to-proxy-to-backend-server-5588a9e0347
"proxy": "http://127.0.0.1:8545"
4.) addressing cache related issues through rm -r package-lock.json node_modules and npm install updating react.js to latest version
5.) trying different port: 7545
6.) updating react to latest version on ubuntu
I figured it out - thanks to all who reviewed my problem. - hopefully this will help someone in the same situation. To connect to an ec2 instance with React.js / blockchain dapp you need to follow five steps:
1.) set appropriate security rules (you will need to allow access for an instance to reach your server) I set the following rules in a very liberal fashion since this was only a test:
you need to start ganache with explicit chainId specified and a direct reference to your public domain IPv4 DNS domain e.g (
http://ec2-54-186-149-26.us-west-2.compute.amazonaws.com)
the command should look as follows:
3.) the same domain mnemonic needs to be specified in metamask (along with an imported account from your ganache server ) It should look as follows:
4.) React.js also needs to access the domain from EC2 directly (do not use localhost ,even you are running on the server the loopback will not work! - also do not use a shortcut with or (||) condition as that also produced errors for me ). It should look similar to below:
5.) your smart contracts also need this domain specified explicitly - so you will also need to edit your truffle-config.js as follows:
Finally i can read my blockchain via React.js on a test network (ganache) via EC2.
Below is blockchain data presented to screen.
I hope this helps someone out there - this was not found easily.
regards
John D.

FLINK : Deployment took more than 60 seconds

I am new to flink and trying to deploy my jar on EMR cluster. I have used 3 node cluster (1 master and 2 slaves) with their default configuration. I have not done any configuration changes and sticking with default configuration. On running the following command on my master node:
flink run -m yarn-cluster -yn 2 -c Main /home/hadoop/myjar-0.1.jar
I am getting the following error:
INFO org.apache.flink.yarn.YarnClusterDescriptor- Deployment took more than 60 seconds. Please check if the requested resources are available in the YARN cluster
Can anyone please explain what could be the possible reason for this error?
As you didn't determine any resources (Memory, CPU core), I guess it's because the YARN cluster has not the desired resource, especially memory.
Try submitting your jar file using the following type of commands:
flink run -m yarn-cluster -yn 5 -yjm 768 -ytm 1400 -ys 2 -yqu streamQ my_program.jar
You can find more information about the command here
You can check application logs in YARN WebUI to see what's the problem exactly.
Also, check this posts:
Post1
post2

DC/OS installation failure during preflight

I am using 5 cloud-based VMs to install DC/OS
1 mesos master
3 mesos agent
1 launching VM
I have installed Docker on my launching VM and start installing DC/OS. It is running successfully during install_prereqs stage without any errors. But it's failing during preflight with below errors for each of my VM system.
STDERR:
Connection to 129.114.18.235 closed.
STDOUT:
Running preflight checks /opt/dcos_install_tmp/dcos_install.sh: line 225: getenforce: command not found
Checking if docker is installed and in PATH: FAIL
Checking if unzip is installed and in PATH: FAIL
Checking if ipset is installed and in PATH: FAIL
Checking if systemd-notify is installed and in PATH: FAIL
/opt/dcos_install_tmp/dcos_install.sh: line 387: systemctl: command not found
Checking if systemctl is installed and in PATH: FAIL
Checking Docker is configured with a production storage driver: /opt/dcos_install_tmp/dcos_install.sh: line 285: docker: command not found
Do I need to install all the required software into my master and agents VMS? Please guide.
We have a similar setup but using straight vm's. We found docker needs to be running on all nodes, including masters, before running the install. Also, make sure you look at: /etc/sysconfig/docker-storageand have: DOCKER_STORAGE_OPTIONS= -s overlayset in the file on all nodes.
I don't believe this is the production setup but should get you running. You also may want to check the privilege of the user executing the install on the remote nodes, does it have permission to see/run systemctl?
I had the same error with the DC/OS web installer in version 1.9
I solved the error after double-checking the bootstraps machines's private key in the web form. To create the key, log into the bootstrap machine and run:
$ ssh-keygen -t rsa
$ for i in `cat dcos-ips.txt`; do ssh-copy-id root#$i; done
$ cat ~/.ssh/id_rsa

Google cloud sdks doesn't start preview for Docker image Mac OS

My app.yaml
runtime: custom
vm: true
api_version: 1
health_check:
enable_health_check: False
Dockerfile
# Use the official go docker image built on debian.
FROM golang:1.5.1
# Grab the source code and add it to the workspace.
ADD . /go/
# Install revel and the revel CLI.
RUN go get github.com/revel/revel
RUN go get github.com/revel/cmd/revel
# Use the revel CLI to start up our application.
ENTRYPOINT revel run 4quorum-appengine dev 8080
# Open up the port where the app is running.
EXPOSE 8080
I was working through this article
http://jbeckwith.com/2015/05/08/docker-revel-appengine/
Preview
I am trying to preview it:
gcloud preview app run app.yaml --custom-entrypoint "revel run 4quorum-appengine dev 8080"
WARNING: The `app run` command is deprecated and will soon be removed.
Please use dev_appserver.py (in the same directory as the `gcloud` command) instead.
Module [default] found in file [/Users/802619/Projects/src/4quorum_root/app.yaml]
INFO: Looking for the Dockerfile in /Users/802619/Projects/src/4quorum_root
INFO: Using Dockerfile found in /Users/802619/Projects/src/4quorum_root
INFO 2015-11-06 18:03:44,226 application_configuration.py:399] No version specified. Generated version id: 20151106t180344
INFO 2015-11-06 18:03:44,226 devappserver2.py:763] Skipping SDK update check.
INFO 2015-11-06 18:03:44,266 api_server.py:205] Starting API server at: http://localhost:62780
INFO 2015-11-06 18:03:44,272 dispatcher.py:197] Starting module "default" running at: http://localhost:8080
INFO 2015-11-06 18:03:44,277 admin_server.py:116] Starting admin server at: http://localhost:8000
ERROR 2015-11-06 18:03:44,282 instance.py:280] [Errno 2] No such file or directory
The same thing if trying dev_appserver.py
Deploy
Deploy also doesn't work. Fails because of timeout.
gcloud preview app deploy ./app.yaml
WARNING: Soon, deployments will set the deployed version to receive all traffic by
default.
To keep the current behavior (where new deployments do not receive any traffic),
use the `--no-promote` flag or run the following command:
$ gcloud config set app/promote_by_default false
To adopt the new behavior early, use the `--promote` flag or run the following
command:
$ gcloud config set app/promote_by_default true
Either passing one of the new flags or setting one of these properties will
silence this message.
You are about to deploy the following modules:
- vaulted-gift-112113/default (from [/Users/802619/Projects/src/4quorum_root/app.yaml])
Deployed URL: [https://20151106t204027-dot-vaulted-gift- 112113.appspot.com]
(add --promote if you also want to make this module available from
[https://vaulted-gift-112113.appspot.com])
Beginning deployment...
Verifying that Managed VMs are enabled and ready.
Provisioning remote build service.
Copying certificates for secure access. You may be prompted to create an SSH keypair.
Building and pushing image for module [default]
Saving [.dockerignore] to [/Users/802619/Projects/src/4quorum_root].
----------------------------- DOCKER BUILD OUTPUT ------------------------------
Step 0 : FROM golang:1.5.1
---> f6271e8f3723
Step 1 : ADD . /go/
---> 94fafc5e8a30
Removing intermediate container cfbe197f6e93
Step 2 : RUN go get github.com/revel/revel
---> Running in d7ad8c923144
---> b65877cf3049
Removing intermediate container d7ad8c923144
Step 3 : RUN go get github.com/revel/cmd/revel
---> Running in 2a9b3320ce47
---> 428defd008f3
Removing intermediate container 2a9b3320ce47
Step 4 : ENTRYPOINT revel run 4quorum-appengine dev 8080
---> Running in 8b9e38ec69ec
---> 3749ee8a6636
Removing intermediate container 8b9e38ec69ec
Step 5 : EXPOSE 8080
---> Running in a0e6c66b56c8
---> dafff62b9643
Removing intermediate container a0e6c66b56c8
Successfully built dafff62b9643
--------------------------------------------------------------------------------
Copying files to Google Cloud Storage...
Synchronizing files to [gs://staging.vaulted-gift-112113.appspot.com/].
Updating module [default]...|Deleted [https://www.googleapis.com/compute/v1/projects/vaulted-gift- 112113/zones/us-central1-f/instances/gae-builder-vm-20151106t204027].
Updating module [default]...failed.
ERROR: (gcloud.preview.app.deploy) Error Response: [4] Timed out creating VMs.
About to drop this.
Moved to heroku. Google App Engine is not ready yet.

Resources