You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by GitBox <gi...@apache.org> on 2022/03/10 04:22:40 UTC
[GitHub] [apisix-ingress-controller] Belyenochi opened a new issue #913: bug: apisix-ingress-controller start panic
Belyenochi opened a new issue #913:
URL: https://github.com/apache/apisix-ingress-controller/issues/913
### Issue description
apisix ingress controller start panic
### Environment
- your apisix-ingress-controller version (output of apisix-ingress-controller version --long):
1.4.0(master branch)
- your Kubernetes cluster version (output of kubectl version):
1.16.9
- if you run apisix-ingress-controller in Bare-metal environment, also show your OS version (uname -a):
Darwin MacBook-Pro.local 19.5.0 Darwin Kernel Version 19.5.0: Tue May 26 20:41:44 PDT 2020; root:xnu-6153.121.2~2/RELEASE_X86_64 x86_64
### Minimal test code / Steps to reproduce
1. Make sure that the apisix related CRD has been installed in the cluster
2. kubectl apply -f apisix-route.yaml
```
apiVersion: apisix.apache.org/v2beta1
kind: ApisixRoute
metadata:
name: foo-bar-route
spec:
http:
- name: foo
match:
hosts:
- foo.com
paths:
- "/foo*"
backend:
serviceName: foo
servicePort: 80
- name: bar
match:
paths:
- "/bar"
backend:
serviceName: bar
servicePort: 80
```
3. start local apisix-ingress-controller
```
ingress
\
--kubeconfig
/path/to/kubeconfig
\
--http-listen
:8082
\
--log-output
stderr
\
--default-apisix-cluster-base-url
http://127.0.0.1:9180/apisix/admin # 127.0.0.1:9180 need to be replaced
--default-apisix-cluster-admin-key
edd1c9f034335f136f87ad84b625c8f1
```
### Actual result
local apisix-ingress-controller panic
### Error log
2022-03-10T12:14:32+08:00 warn api/server.go:75 failed to load x509 key pair, will not start admission server {"Error": "open /etc/webhook/certs/cert.pem: no such file or directory", "CertFilePath": "/etc/webhook/certs/cert.pem", "KeyFilePath": "/etc/webhook/certs/key.pem"}
I0310 12:14:32.866418 19515 leaderelection.go:248] attempting to acquire leader lease default/ingress-apisix-leader...
2022-03-10T12:14:35+08:00 info ingress/controller.go:320 LeaderElection {"message": " became leader", "event_type": "Normal"}
I0310 12:14:35.634105 19515 leaderelection.go:258] successfully acquired lease default/ingress-apisix-leader
2022-03-10T12:14:35+08:00 info ingress/controller.go:406 controller tries to leading ... {"namespace": "default", "pod": ""}
2022-03-10T12:14:37+08:00 warn apisix/cluster.go:332 waiting cluster default to ready, it may takes a while
2022-03-10T12:14:37+08:00 info apisix/cluster.go:160 syncing cache {"cluster": "default"}
2022-03-10T12:14:37+08:00 info apisix/cluster.go:372 syncing schema {"cluster": "default"}
2022-03-10T12:14:40+08:00 info apisix/cluster.go:164 cache synced {"cost_time": "3.733667121s", "cluster": "default"}
2022-03-10T12:14:40+08:00 warn apisix/cluster.go:343 cluster default now is ready, cost time 3.733716272s
2022-03-10T12:14:41+08:00 info ingress/namespace.go:70 label selector watching namespaces {"namespaces": ["allns-r7sel9-0", "apisix", "cattle-prometheus", "cattle-system", "chaos-testing", "chaosblade", "default", "elastic-system", "ingress-apisix-e2e-tests-default-760463000", "ingress-apisix-e2e-tests-default-825238000", "ingress-nginx", "kafka", "kruise-system", "kube-node-lease", "kube-public", "kube-system", "leaf", "local-path-storage", "logging", "mcloud-cat", "middleware-paas", "minio", "monitoring", "nacos", "nacos-2", "nacos-3", "nacos-4", "nacos-5", "nacos-6", "nacos-test", "pvc-exporter", "pxc1", "redis", "security-scan", "syu-t", "syu-t2", "thrift", "xxl-job", "xxl-job1", "xxl-job2", "zookeeper"]}
I0310 12:14:42.501579 19515 request.go:665] Waited for 1.000136347s due to client-side throttling, not priority and fairness, request: GET:https://mke.my.myorg/k8s/clusters/c-dx6gd/apis/apisix.apache.org/v2beta3/namespaces/nacos-4/apisixroutes
panic: runtime error: index out of range [0] with length 0
goroutine 157 [running]:
github.com/apache/apisix-ingress-controller/pkg/kube/translation.(*translator).translateHTTPRouteV2beta3NotStrictly(0x0, 0xc00092c200, 0xc0008771e0)
/Users/jasonzhu/opensource/2022/apisix-ingress-controller/pkg/kube/translation/apisix_route.go:936 +0x899
github.com/apache/apisix-ingress-controller/pkg/kube/translation.(*translator).TranslateRouteV2beta3NotStrictly(0x0, 0x0)
/Users/jasonzhu/opensource/2022/apisix-ingress-controller/pkg/kube/translation/apisix_route.go:314 +0x72
github.com/apache/apisix-ingress-controller/pkg/ingress.(*Controller).CompareResources.func1.1({0xc000417b24, 0x7})
/Users/jasonzhu/opensource/2022/apisix-ingress-controller/pkg/ingress/compare.go:78 +0x852
created by github.com/apache/apisix-ingress-controller/pkg/ingress.(*Controller).CompareResources.func1
/Users/jasonzhu/opensource/2022/apisix-ingress-controller/pkg/ingress/compare.go:68 +0x248
### Expected result
_No response_
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-ingress-controller] tao12345666333 commented on issue #913: bug: apisix-ingress-controller start panic
Posted by GitBox <gi...@apache.org>.
tao12345666333 commented on issue #913:
URL: https://github.com/apache/apisix-ingress-controller/issues/913#issuecomment-1063673882
Can you check the commit id?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-ingress-controller] tao12345666333 commented on issue #913: bug: apisix-ingress-controller start panic
Posted by GitBox <gi...@apache.org>.
tao12345666333 commented on issue #913:
URL: https://github.com/apache/apisix-ingress-controller/issues/913#issuecomment-1063744969
I think we can close this one.
* This problem can be solved after modifying the configuration.
* And `v2beta1` will be removed soon, xref: #820
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-ingress-controller] Belyenochi commented on issue #913: bug: apisix-ingress-controller start panic
Posted by GitBox <gi...@apache.org>.
Belyenochi commented on issue #913:
URL: https://github.com/apache/apisix-ingress-controller/issues/913#issuecomment-1063718208
I found a fact that the CR I created is v2beta1, but can be obtained from the List method of ApisixV2Beta3, maybe the incompatible Beta1 and Beta3 CRD formats are causing the problem.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-ingress-controller] tao12345666333 commented on issue #913: bug: apisix-ingress-controller start panic
Posted by GitBox <gi...@apache.org>.
tao12345666333 commented on issue #913:
URL: https://github.com/apache/apisix-ingress-controller/issues/913#issuecomment-1063727098
`spec.http[].backend` has been removed. we should use `spec.http[].backends` .
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-ingress-controller] Belyenochi commented on issue #913: bug: apisix-ingress-controller start panic
Posted by GitBox <gi...@apache.org>.
Belyenochi commented on issue #913:
URL: https://github.com/apache/apisix-ingress-controller/issues/913#issuecomment-1063714916
> Can you check the commit id?
I don't know if starting two ingress controllers is what's causing the problem, there is already an apisix ingress controller in the cluster before I start it locally.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-ingress-controller] Belyenochi commented on issue #913: bug: apisix-ingress-controller start panic
Posted by GitBox <gi...@apache.org>.
Belyenochi commented on issue #913:
URL: https://github.com/apache/apisix-ingress-controller/issues/913#issuecomment-1063720909
Maybe we should update [this document](https://github.com/apache/apisix-ingress-controller/blob/master/docs/en/latest/concepts/apisix_route.md).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-ingress-controller] Belyenochi edited a comment on issue #913: bug: apisix-ingress-controller start panic
Posted by GitBox <gi...@apache.org>.
Belyenochi edited a comment on issue #913:
URL: https://github.com/apache/apisix-ingress-controller/issues/913#issuecomment-1063714291
> Can you check the commit id?
75098d1
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-ingress-controller] Belyenochi commented on issue #913: bug: apisix-ingress-controller start panic
Posted by GitBox <gi...@apache.org>.
Belyenochi commented on issue #913:
URL: https://github.com/apache/apisix-ingress-controller/issues/913#issuecomment-1063714291
> Can you check the commit id?
75098d1
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-ingress-controller] Belyenochi removed a comment on issue #913: bug: apisix-ingress-controller start panic
Posted by GitBox <gi...@apache.org>.
Belyenochi removed a comment on issue #913:
URL: https://github.com/apache/apisix-ingress-controller/issues/913#issuecomment-1063714916
> Can you check the commit id?
I don't know if starting two ingress controllers is what's causing the problem, there is already an apisix ingress controller in the cluster before I start it locally.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-ingress-controller] Belyenochi removed a comment on issue #913: bug: apisix-ingress-controller start panic
Posted by GitBox <gi...@apache.org>.
Belyenochi removed a comment on issue #913:
URL: https://github.com/apache/apisix-ingress-controller/issues/913#issuecomment-1063745529
> Here's a configuration that determines how to handle CRs. The CR version you are using needs to be the same as here.
>
> https://github.com/apache/apisix-ingress-controller/blob/75098d1e4b26136de3164a3aabd6ed018ffdcd6b/conf/config-default.yaml#L73-L74
>
> > Maybe we should update [this document](https://github.com/apache/apisix-ingress-controller/blob/master/docs/en/latest/concepts/apisix_route.md).
>
> Sure, I have created an issue, it is suitable for newbies to get involved in this project #915
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-ingress-controller] Belyenochi closed issue #913: bug: apisix-ingress-controller start panic
Posted by GitBox <gi...@apache.org>.
Belyenochi closed issue #913:
URL: https://github.com/apache/apisix-ingress-controller/issues/913
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-ingress-controller] tao12345666333 commented on issue #913: bug: apisix-ingress-controller start panic
Posted by GitBox <gi...@apache.org>.
tao12345666333 commented on issue #913:
URL: https://github.com/apache/apisix-ingress-controller/issues/913#issuecomment-1063738727
Here's a configuration that determines how to handle CRs. The CR version you are using needs to be the same as here.
https://github.com/apache/apisix-ingress-controller/blob/75098d1e4b26136de3164a3aabd6ed018ffdcd6b/conf/config-default.yaml#L73-L74
> Maybe we should update [this document](https://github.com/apache/apisix-ingress-controller/blob/master/docs/en/latest/concepts/apisix_route.md).
Sure, I have created an issue, it is suitable for newbies to get involved in this project https://github.com/apache/apisix-ingress-controller/issues/915
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-ingress-controller] Belyenochi commented on issue #913: bug: apisix-ingress-controller start panic
Posted by GitBox <gi...@apache.org>.
Belyenochi commented on issue #913:
URL: https://github.com/apache/apisix-ingress-controller/issues/913#issuecomment-1063745529
> Here's a configuration that determines how to handle CRs. The CR version you are using needs to be the same as here.
>
> https://github.com/apache/apisix-ingress-controller/blob/75098d1e4b26136de3164a3aabd6ed018ffdcd6b/conf/config-default.yaml#L73-L74
>
> > Maybe we should update [this document](https://github.com/apache/apisix-ingress-controller/blob/master/docs/en/latest/concepts/apisix_route.md).
>
> Sure, I have created an issue, it is suitable for newbies to get involved in this project #915
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org