Closed jxiang1995 closed 2 years ago
I've no clue about this yet but will try with Go1.19 on my side because we are using Go1.18 in our CI.
I had the same problem.
➜ karmada git:(master) uname -a
Linux k8s-1 5.15.0-1016-gcp #21-Ubuntu SMP Fri Aug 5 12:17:08 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
➜ karmada git:(master) lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 22.04.1 LTS
Release: 22.04
Codename: jammy
➜ karmada git:(master) go version
go version go1.19 linux/amd64
➜ karmada git:(master)
upgrading cfssl to 1.6.1 can solve the problem of cfssl installation
go install github.com/cloudflare/cfssl/cmd/...@v1.6.1
@jxiang1995 can you try to update cfssl version to v1.6.1
and try again? like:
diff --git a/hack/deploy-karmada.sh b/hack/deploy-karmada.sh
index f874d4ca..2026535f 100755
--- a/hack/deploy-karmada.sh
+++ b/hack/deploy-karmada.sh
@@ -16,7 +16,7 @@ KARMADA_APISERVER_SECURE_PORT=${KARMADA_APISERVER_SECURE_PORT:-5443}
HOST_CLUSTER_NAME=${HOST_CLUSTER_NAME:-"karmada-host"}
ROOT_CA_FILE=${CERT_DIR}/ca.crt
ROOT_CA_KEY=${CERT_DIR}/ca.key
-CFSSL_VERSION="v1.5.0"
+CFSSL_VERSION="v1.6.1"
LOAD_BALANCER=${LOAD_BALANCER:-false} # whether create a 'LoadBalancer' type service for karmada apiserver
source "${REPO_ROOT}"/hack/util.sh
You might have to delete the old version of cfss:
$ command -v cfssl # find old cfssl path
$ rm xxxx/xxx/cfssl # remove it. The script will install a new one.
@RainbowMango @jxiang1995 Due to the use of go.rice, cfssl segfaults when installed with Go 1.19.
Need to install via go install github.com/cloudflare/cfssl/cmd/cfssl@master
https://github.com/cloudflare/cfssl/issues/1233
https://github.com/cloudflare/cfssl/pull/1236
@liys87x @RainbowMango yes! It's working! Thank you guys!
Final solution: Go version: 1.19 Install cfssl via go install github.com/cloudflare/cfssl/cmd/cfssl@master cfssl version 1.6.2 - as today 8/23/2022
Note: I'm using Azure and GCP to host Karmada. I found I need to set open file limitation to a higher value to avoid "too many files opened" problem.
what I did: ulimit - n 65535 sudo sysctl fs.inotify.max_user_instances=1024
Thanks @jxiang1995 .
This doc from Kind also addressed this issue: https://kind.sigs.k8s.io/docs/user/known-issues/#pod-errors-due-to-too-many-open-files
What happened: Error running hack/local-up-karmada.sh
How to reproduce it (as minimally and precisely as possible): run hack/local-up-karmada.sh.
Environment:
kubectl-karmada version
orkarmadactl version
): N/AConsole Record: azureuser@Karmada:~/downloads/karmada$ hack/local-up-karmada.sh Preparing: 'kind' existence check - passed Preparing: 'kubectl' existence check - passed Preparing kindClusterConfig in path: /tmp/tmp.MItcCAdRWj Creating cluster karmada-host and the log file is in /tmp/karmada/karmada-host.l og Creating cluster member1 and the log file is in /tmp/karmada/member1.log Creating cluster member2 and the log file is in /tmp/karmada/member2.log Creating cluster member3 and the log file is in /tmp/karmada/member3.log make: Entering directory '/home/azureuser/downloads/karmada' set -e;\ target=$(echo karmada-aggregated-apiserver);\ make $target GOOS=linux;\ VERSION=latest REGISTRY=swr.ap-southeast-1.myhuaweicloud.com/karmada BUILD_PLATF ORMS=linux/amd64 hack/docker.sh $target make[1]: Entering directory '/home/azureuser/downloads/karmada' LDFLAGS='-X github.com/karmada-io/karmada/pkg/version.gitVersion=v1.2.0-549-g79e 7820d -X github.com/karmada-io/karmada/pkg/version.gitCommit=79e7820dac159bbc9ac 7f52c00122945e37c3951 -X github.com/karmada-io/karmada/pkg/version.gitTreeState= dirty -X github.com/karmada-io/karmada/pkg/version.buildDate=2022-08-22T16:50:11 Z' BUILD_PLATFORMS=linux/amd64 hack/build.sh karmada-aggregated-apiserver !!! Building karmada-aggregated-apiserver for linux/amd64:
github.com/mattn/go-sqlite3
sqlite3-binding.c: In function ‘sqlite3SelectNew’: sqlite3-binding.c:123303:10: warning: function may return address of local varia ble [-Wreturn-local-addr] 123303 | return pNew; | ^~~~ sqlite3-binding.c:123263:10: note: declared here 123263 | Select standin; | ^
~~ ........+.+...............++++++++++++++++++++++++++++++++++++++++++++++++++++++ +++++++++++...+.+..++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +++++..+....+..............+.+...+.....+...+..........+..+.+......+.....+.+.... .....+.....+.........+......+.............+......+...........+...+...+.......... ..+...+....+...+..+...+............+......+...+......+.+..+...+.......+...+...+. .+.........+......+.......+......+..+.......+.....+...+.......+...+........+.+.. .......+.....+.+...........+....+.....+.++++++++++++++++++++++++++++++++++++++++ +++++++++++++++++++++++++ ...+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++.++++++++++ +++++++++++++++++++++++++++++++++++++++++++++++++++++++........+.........+..... .....+..+....+..+...+....+......+..+....+.....+......+.......+...+........+....+ ..+.+........+.+......+..+.+......+........+.......+...+......+.........+....... .+....+.....+...+...+..........+..+.......+..............+.+...............+.... .+.+............+......+.....+....+...+..................+...............+.....+ .+.....+.....................+...+....+...+.....+....+...+.................+.+.. +.+......+.........+......+...+...+..+++++++++++++++++++++++++++++++++++++++++++ ++++++++++++++++++++++...+.............+......+.........+.....++++++++++++++++++++++++++++++++++++++++ +++++++++++++++++++++++++.+........+...+.+...+............+......+.....+...++++ +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++..+........+....+. .......+......+.......+........+.......+........+....+.....+.................... .....+...+...+..+............+.+......+..................+.....+.+.....+......+. .....+....+...+............+...+...............+.....+.......+.....+.........+.. ..+...+..+......+......+....+......+....................+.+..+...+....+......+.. ...+.........+...+.+...............+..............+...+...+....+...........+.... ......+..+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ....+.+...+..+.......+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ++++++.....+..+...............+.+..+....+...+.....+.......+.....+....+.....+... .+...+...+..+....+...........+...+.......+.....+...+.+.....+++++++++++++++++++++ ++++++++++++++++++++++++++++++++++++++++++++........+....+..+.........+........ .....+............+...+............+........+.+.....+......+...+...+...+....+..+ .+.....+.......+..+...+.+..+............+.+.....+.+....................+....+... ..............+...+.+.....+.............+...............+...+..+................ .....+.+......+.........+...+...........+.+.....+..................+.......+.... .....+.....+.....................+......+...+..........+..+.........+....+.....+ ......+...+...+...+....+........+...+....+......+.....+....+........+.........+. .....+..........+..+.+...........+.........+......+.+..+.+......+......+..+..... .+..........+..+.......+..+.+..............+................+.....+.......+..... +.+.....+......+....+......+...+...........+....+...+........+......+...+....... +........................+..+.......+..+...+.+......+........+..........+..+.... ..+.......+........+...+..........+..+....+.........+............+...+.....+.... +..+...............+.+...+.....+.+......+..+..........+..+....+.........+.....+. +..+....+........+......+.+...............+........+.+.....+......+.+.....+...+. +......+............++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +++++
.+..+.......+........+...+.+.....+.+........++++++++++++++++++++++++++++++++++++ +++++++++++++++++++++++++++++.....+......+......+.+++++++++++++++++++++++++++++ ++++++++++++++++++++++++++++++++++++...................++++++++++++++++++++++++ +++++++++++++++++++++++++++++++++++++++++ ..+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++..+.....+... ...+.+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++..+..+... +...+...+.+.........+..+.......+++++++++++++++++++++++++++++++++++++++++++++++++ ++++++++++++++++
panic: runtime error: invalid memory address or nil pointer dereference [signal SIGSEGV: segmentation violation code=0x1 addr=0x18 pc=0x8ba386]
goroutine 1 [running]: debug/elf.(*Section).ReadAt(0xc0000b4320?, {0xc0002fac00?, 0x11f3230?, 0x34?}, 0 x40?)