Open kapptob opened 5 days ago
Hey @kapptob! I'm here to assist you with any bugs, questions, or contributions for Apache DevLake. Let's work together to solve this issue.
To resolve the CrashLoopBackOff
issue with the devlake-lake
pod and the AxiosError: Request failed with status code 504
, you can follow these steps:
Check Pod Logs: Inspect the logs of the devlake-lake
pod to understand why it is crashing:
kubectl logs <devlake-lake-pod-name>
Verify Configuration: Ensure that all configurations, especially those related to the database, are correct. If you are using an external MySQL database, verify the connection details.
Check Resource Limits: Make sure your Minikube cluster has enough CPU and memory allocated. The recommended resource allocations are 4 CPUs and 8GB of memory [1].
Set Encryption Secret: Generate a secure encryption key and set it as an environment variable:
ENCRYPTION_SECRET=$(openssl rand -base64 2000 | tr -dc 'A-Z' | fold -w 128 | head -n 1)
export ENCRYPTION_SECRET=$ENCRYPTION_SECRET
Reinstall Helm Chart: Uninstall and reinstall the DevLake Helm chart with the encryption secret:
helm uninstall devlake
helm repo add devlake https://apache.github.io/incubator-devlake-helm-chart
helm repo update
helm install devlake devlake/devlake --version=1.0-beta1 --set lake.encryptionSecret.secret=$ENCRYPTION_SECRET
Port Forwarding: Ensure you are forwarding the correct ports to access the UI:
kubectl port-forward service/devlake-ui 30090:4000
kubectl port-forward service/devlake-grafana 30091:3000
Known Issues: There are known issues in version v1.0.0 that could cause the devlake-lake
pod to crash, such as the panic: invalid encKey
error and Go Panic in OpenShift Kubernetes. Refer to the GettingStarted/Upgrade documentation and issue #5612 for more details [2].
By following these steps, you should be able to diagnose and resolve the CrashLoopBackOff
issue with the devlake-lake
pod and the AxiosError: Request failed with status code 504
.
To continue talking to Dosu, mention @dosu.
Please share the pod log for diagnosis.
Here are the logs:
ubuntu@dds-t14-007:~$ kubectl logs devlake-lake-7b6f7d647f-jdjvk Defaulted container "lake" out of: lake, waiting-database-ready (init) time="2024-07-02T08:36:58Z" level=info msg="no [.env] file, devlake will read configuration from environment, please make sure you have set correct environment variable." Version: v1.0-beta1@60faf14 time="2024-07-02 08:36:58" level=info msg="migration initialized" time="2024-07-02 08:36:58" level=info msg="plugin loaded ae" time="2024-07-02 08:36:59" level=info msg="plugin loaded azuredevops_go" time="2024-07-02 08:36:59" level=info msg="plugin loaded bamboo" time="2024-07-02 08:36:59" level=info msg="plugin loaded bitbucket" time="2024-07-02 08:36:59" level=info msg="plugin loaded bitbucketserver" time="2024-07-02 08:36:59" level=info msg="plugin loaded circleci" time="2024-07-02 08:36:59" level=info msg="plugin loaded customize" time="2024-07-02 08:36:59" level=info msg="plugin loaded dbt" time="2024-07-02 08:37:01" level=info msg="plugin loaded dora" time="2024-07-02 08:37:01" level=info msg="plugin loaded feishu" time="2024-07-02 08:37:02" level=info msg="plugin loaded gitee"
ubuntu@dds-t14-007:~$ kubectl logs devlake-ui-6c9777d847-xw6f2 2024/07/02 08:30:45 [notice] 10#10: using the "epoll" event method 2024/07/02 08:30:45 [notice] 10#10: nginx/1.25.4 2024/07/02 08:30:45 [notice] 10#10: built by gcc 12.2.0 (Debian 12.2.0-14) 2024/07/02 08:30:45 [notice] 10#10: OS: Linux 5.10.207 2024/07/02 08:30:45 [notice] 10#10: getrlimit(RLIMIT_NOFILE): 1048576:1048576 2024/07/02 08:30:45 [notice] 10#10: start worker processes 2024/07/02 08:30:45 [notice] 10#10: start worker process 11 2024/07/02 08:30:45 [notice] 10#10: start worker process 12 10.244.0.1 - - [02/Jul/2024:08:30:50 +0000] "GET /health/ HTTP/1.1" 200 0 "-" "kube-probe/1.30" "-"
Search before asking
What happened
After Installing on my system using WSL Ubuntu and Helm, starting the Cluster with minikube and trying to access via kubectl port forwarding I get the following message:
AxiosError: Request failed with status code 504
I noticed following problem when running kubectl get pods: NAME READY STATUS RESTARTS AGE devlake-grafana-66fcd84bcb-wjsgn 0/1 Running 0 4m21s devlake-lake-7b6f7d647f-jdjvk 0/1 Running 1 (55s ago) 4m21s
After reinstalling:
NAME READY STATUS RESTARTS AGE devlake-lake-7455659445-8nh8v 0/1 Running 4 (61s ago) 5m1s
and a few minutes later: NAME READY STATUS RESTARTS AGE devlake-lake-7455659445-8nh8v 0/1 CrashLoopBackOff 6 (3m31s ago) 12m
The other devlake service run fine, so maybe that could be part of the problem. I tried to reinstall but it didn't help.
What do you expect to happen
Open Apache DevLake UI as usual.
How to reproduce
Install as documented on WSL Ubuntu with Helm.
Anything else
Happens everytime.
Version
v1.0-beta1
Are you willing to submit PR?
Code of Conduct