hango-io / hango-gateway Goto Github PK
View Code? Open in Web Editor NEWHango API Gateway, build on Envoy & Istio.
Home Page: https://hango-io.github.io/
License: Apache License 2.0
Hango API Gateway, build on Envoy & Istio.
Home Page: https://hango-io.github.io/
License: Apache License 2.0
suppor for traffic-mark
enhance hango gateway docs and examples
refs: https://github.com/hango-io/hango-gateway/tree/master/docs
refs: https://github.com/hango-io/hango-gateway/tree/master/example
Describe the bug
A clear and concise description of what the bug is.
发布服务时,报错:401 Unauthorized,无法从“K8s注册中心”获取服务列表。
组件 hango-api-plane 日志详细信息:
2021-09-10 16:03:41.703 [http-nio-10880-exec-2] INFO o.h.c.w.i.RequestLogInterceptor ==== uuid:27c61646-f040-440c-a1e2-1033b2a2846e - ----- Request Id: 27c61646-f040-440c-a1e2-1033b2a2846e, Request Method: GET, Uri: /api?Action=GetServiceAndPortList&Type=Kubernetes&Version=2019-07-25 -----
2021-09-10 16:03:41.706 [http-nio-10880-exec-2] INFO o.h.c.c.k.http.DefaultK8sHttpClient ==== uuid:27c61646-f040-440c-a1e2-1033b2a2846e - Request{method=GET, url=https://10.43.0.1/api/v1/namespaces/hango-system/pods?labelSelector=app%3Distiod&fieldSelector=status.phase%3DRunning, tags={}}
2021-09-10 16:03:41.814 [http-nio-10880-exec-2] INFO o.h.c.c.k.http.DefaultK8sHttpClient ==== uuid:27c61646-f040-440c-a1e2-1033b2a2846e - Request{method=GET, url=https://10.43.0.1/api/v1/namespaces/hango-system/pods?labelSelector=app%3Distiod&fieldSelector=status.phase%3DRunning, tags={}}
2021-09-10 16:03:41.881 [http-nio-10880-exec-2] INFO o.h.c.u.i.RestTemplateLogInterceptor ==== uuid:27c61646-f040-440c-a1e2-1033b2a2846e - Request --> URI: http://10.42.97.240:8080/debug/endpointz?brief=true, Request Body:
2021-09-10 16:03:41.881 [http-nio-10880-exec-2] INFO o.h.c.u.i.RestTemplateLogInterceptor ==== uuid:27c61646-f040-440c-a1e2-1033b2a2846e - Request --> URI: http://10.42.97.240:8080/debug/endpointz?brief=true, Request Body:
2021-09-10 16:03:41.883 [http-nio-10880-exec-2] INFO o.h.c.u.i.RestTemplateLogInterceptor ==== uuid:27c61646-f040-440c-a1e2-1033b2a2846e - Response <-- Status code: 401
2021-09-10 16:03:41.883 [http-nio-10880-exec-2] INFO o.h.c.u.i.RestTemplateLogInterceptor ==== uuid:27c61646-f040-440c-a1e2-1033b2a2846e - Response <-- Status code: 401
2021-09-10 16:03:41.884 [http-nio-10880-exec-2] WARN o.h.cloud.core.istio.PilotHttpClient ==== uuid:27c61646-f040-440c-a1e2-1033b2a2846e -
org.springframework.web.client.HttpClientErrorException: 401 Unauthorized
at org.springframework.web.client.DefaultResponseErrorHandler.handleError(DefaultResponseErrorHandler.java:78)
at org.springframework.web.client.RestTemplate.handleResponse(RestTemplate.java:700)
at org.springframework.web.client.RestTemplate.doExecute(RestTemplate.java:653)
at org.springframework.web.client.RestTemplate.execute(RestTemplate.java:613)
at org.springframework.web.client.RestTemplate.getForEntity(RestTemplate.java:312)
at org.hango.cloud.core.istio.PilotHttpClient.getForEntity(PilotHttpClient.java:295)
at org.hango.cloud.core.istio.PilotHttpClient.access$100(PilotHttpClient.java:41)
at org.hango.cloud.core.istio.PilotHttpClient$1.load(PilotHttpClient.java:92)
at org.hango.cloud.core.istio.PilotHttpClient$1.load(PilotHttpClient.java:89)
at com.google.common.cache.LocalCache$LoadingValueReference.loadFuture(LocalCache.java:3708)
at com.google.common.cache.LocalCache$Segment.loadSync(LocalCache.java:2416)
at com.google.common.cache.LocalCache$Segment.lockedGetOrLoad(LocalCache.java:2299)
at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2212)
at com.google.common.cache.LocalCache.get(LocalCache.java:4147)
at com.google.common.cache.LocalCache.getOrLoad(LocalCache.java:4151)
at com.google.common.cache.LocalCache$LocalLoadingCache.get(LocalCache.java:5140)
at org.hango.cloud.core.istio.PilotHttpClient.getEndpoints(PilotHttpClient.java:199)
at org.hango.cloud.core.istio.PilotHttpClient.getEndpointList(PilotHttpClient.java:210)
at org.hango.cloud.core.istio.PilotHttpClient.getEndpointList(PilotHttpClient.java:248)
at org.hango.cloud.core.gateway.service.impl.DefaultResourceManager.getEndpointList(DefaultResourceManager.java:53)
at org.hango.cloud.core.gateway.service.impl.DefaultResourceManager.getServiceAndPortList(DefaultResourceManager.java:80)
at org.hango.cloud.service.impl.GatewayServiceImpl.getServiceAndPortList(GatewayServiceImpl.java:222)
at org.hango.cloud.web.controller.GatewayCommonController.getServiceAndPortList(GatewayCommonController.java:46)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:205)
at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:133)
at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:97)
at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:827)
at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:738)
at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:85)
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:967)
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:901)
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:970)
at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:861)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:634)
at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:846)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:741)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.hango.cloud.web.filter.CacheHttpRequestFilter.doFilter(CacheHttpRequestFilter.java:20)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.hango.cloud.web.filter.LogUUIDFilter.doFilter(LogUUIDFilter.java:33)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.hango.cloud.web.filter.RequestContextHolderFilter.doFilter(RequestContextHolderFilter.java:20)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:99)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.springframework.web.filter.HttpPutFormContentFilter.doFilterInternal(HttpPutFormContentFilter.java:108)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.springframework.web.filter.HiddenHttpMethodFilter.doFilterInternal(HiddenHttpMethodFilter.java:81)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:197)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.springframework.boot.web.support.ErrorPageFilter.doFilter(ErrorPageFilter.java:115)
at org.springframework.boot.web.support.ErrorPageFilter.access$000(ErrorPageFilter.java:59)
at org.springframework.boot.web.support.ErrorPageFilter$1.doFilterInternal(ErrorPageFilter.java:90)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
at org.springframework.boot.web.support.ErrorPageFilter.doFilter(ErrorPageFilter.java:108)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:199)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:528)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:139)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:81)
at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:678)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343)
at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:798)
at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:810)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1498)
at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:748)
2021-09-10 16:03:41.888 [http-nio-10880-exec-2] ERROR o.h.c.u.a.CommonExceptionHandler ==== uuid:27c61646-f040-440c-a1e2-1033b2a2846e - Request Id: 27c61646-f040-440c-a1e2-1033b2a2846e, Common exception handler catch :
com.google.common.util.concurrent.UncheckedExecutionException: org.hango.cloud.util.exception.ApiPlaneException: 401 Unauthorized
at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2218)
at com.google.common.cache.LocalCache.get(LocalCache.java:4147)
at com.google.common.cache.LocalCache.getOrLoad(LocalCache.java:4151)
at com.google.common.cache.LocalCache$LocalLoadingCache.get(LocalCache.java:5140)
at org.hango.cloud.core.istio.PilotHttpClient.getEndpoints(PilotHttpClient.java:199)
at org.hango.cloud.core.istio.PilotHttpClient.getEndpointList(PilotHttpClient.java:210)
at org.hango.cloud.core.istio.PilotHttpClient.getEndpointList(PilotHttpClient.java:248)
at org.hango.cloud.core.gateway.service.impl.DefaultResourceManager.getEndpointList(DefaultResourceManager.java:53)
at org.hango.cloud.core.gateway.service.impl.DefaultResourceManager.getServiceAndPortList(DefaultResourceManager.java:80)
at org.hango.cloud.service.impl.GatewayServiceImpl.getServiceAndPortList(GatewayServiceImpl.java:222)
at org.hango.cloud.web.controller.GatewayCommonController.getServiceAndPortList(GatewayCommonController.java:46)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:205)
at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:133)
at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:97)
at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:827)
at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:738)
at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:85)
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:967)
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:901)
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:970)
at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:861)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:634)
at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:846)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:741)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.hango.cloud.web.filter.CacheHttpRequestFilter.doFilter(CacheHttpRequestFilter.java:20)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.hango.cloud.web.filter.LogUUIDFilter.doFilter(LogUUIDFilter.java:33)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.hango.cloud.web.filter.RequestContextHolderFilter.doFilter(RequestContextHolderFilter.java:20)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:99)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.springframework.web.filter.HttpPutFormContentFilter.doFilterInternal(HttpPutFormContentFilter.java:108)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.springframework.web.filter.HiddenHttpMethodFilter.doFilterInternal(HiddenHttpMethodFilter.java:81)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:197)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.springframework.boot.web.support.ErrorPageFilter.doFilter(ErrorPageFilter.java:115)
at org.springframework.boot.web.support.ErrorPageFilter.access$000(ErrorPageFilter.java:59)
at org.springframework.boot.web.support.ErrorPageFilter$1.doFilterInternal(ErrorPageFilter.java:90)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
at org.springframework.boot.web.support.ErrorPageFilter.doFilter(ErrorPageFilter.java:108)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:199)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:528)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:139)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:81)
at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:678)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343)
at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:798)
at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:810)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1498)
at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:748)
Caused by: org.hango.cloud.util.exception.ApiPlaneException: 401 Unauthorized
at org.hango.cloud.core.istio.PilotHttpClient.getForEntity(PilotHttpClient.java:298)
at org.hango.cloud.core.istio.PilotHttpClient.access$100(PilotHttpClient.java:41)
at org.hango.cloud.core.istio.PilotHttpClient$1.load(PilotHttpClient.java:92)
at org.hango.cloud.core.istio.PilotHttpClient$1.load(PilotHttpClient.java:89)
at com.google.common.cache.LocalCache$LoadingValueReference.loadFuture(LocalCache.java:3708)
at com.google.common.cache.LocalCache$Segment.loadSync(LocalCache.java:2416)
at com.google.common.cache.LocalCache$Segment.lockedGetOrLoad(LocalCache.java:2299)
at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2212)
... 81 common frames omitted
To Reproduce
Steps to reproduce the behavior:
部署参考:
https://github.com/hango-io/hango-gateway/blob/master/install/README.zh_CN.md
Expected behavior
A clear and concise description of what you expected to happen.
Additional context
Add any other context about the problem here, e.g.
目前slime crd不支持K8S 1.22+, 需要对1.22+ 支持
比如Restriction插件阻止请求,直接响应403,无法统计在Prometheus中。
Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
Describe the solution you'd like
A clear and concise description of what you want to happen.
Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
Additional context
Add any other context or screenshots about the feature request here.
waf enhanced for security
Is your feature request related to a problem? Please describe.
Enhance wasm,integrated wasm into hango gateway.
Describe the solution you'd like
If enhance this feature, we can develop plugin by wasm,and more flexible
Describe the bug
执行 sh install.sh 完成后,提示如下:
hango pod running
-e [hango-install][2023-03-19 17:32:18] hango verfied ok
Init error, init_hango can be run independently
============================== Common mistakes ==============================
1.The same gateway has been created, please go to the hango-console to check
2.hango-portal is unhealthy, please check the hango-portal pod status
执行sh check.sh,显示如下
NAME READY STATUS RESTARTS AGE
hango-api-plane-6489ffc5f-lbtj5 0/1 OOMKilled 1 5m49s
hango-istiod-75cb8bd5fc-fxxdb 1/1 Running 0 5m49s
hango-portal-b99c964d7-xgqmf 1/1 Running 0 5m49s
hango-proxy-68b98fb64b-pmmbv 1/1 Running 0 5m49s
hango-ui-76b4d85469-z7gfj 1/1 Running 0 5m49s
istio-e2e-app-54dc57b7ff-d8znz 1/1 Running 0 5m49s
slime-hango-5d6c5fc5bc-z9h7w 1/1 Running 0 5m49s
执行kubectl -n hango-system logs -f hango-api-plane-6489ffc5f-lbtj5,看到部分异常日志如下
19-Mar-2023 17:35:23.339 SEVERE [localhost-startStop-1] org.apache.catalina.core.ContainerBase.addChildInternal ContainerBase.addChild: start:
org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[]]
at org.apache.catalina.util.LifecycleBase.handleSubClassException(LifecycleBase.java:440)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:198)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:711)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:688)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:661)
at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1177)
at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1925)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:750)
Caused by: java.lang.NullPointerException
at io.fabric8.kubernetes.client.dsl.base.CustomResourceDefinitionContext.fromCrd(CustomResourceDefinitionContext.java:52)
at org.hango.cloud.cache.K8sResourceCache.registryInformer(K8sResourceCache.java:83)
at org.hango.cloud.cache.K8sResourceCache.initInformer(K8sResourceCache.java:68)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.springframework.context.event.ApplicationListenerMethodAdapter.doInvoke(ApplicationListenerMethodAdapter.java:344)
at org.springframework.context.event.ApplicationListenerMethodAdapter.processEvent(ApplicationListenerMethodAdapter.java:229)
at org.springframework.context.event.ApplicationListenerMethodAdapter.onApplicationEvent(ApplicationListenerMethodAdapter.java:166)
at org.springframework.context.event.SimpleApplicationEventMulticaster.doInvokeListener(SimpleApplicationEventMulticaster.java:176)
at org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:169)
at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:143)
at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:421)
at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:378)
at org.springframework.boot.context.event.EventPublishingRunListener.running(EventPublishingRunListener.java:111)
at org.springframework.boot.SpringApplicationRunListeners.lambda$running$6(SpringApplicationRunListeners.java:79)
at java.util.ArrayList.forEach(ArrayList.java:1259)
at org.springframework.boot.SpringApplicationRunListeners.doWithListeners(SpringApplicationRunListeners.java:117)
at org.springframework.boot.SpringApplicationRunListeners.doWithListeners(SpringApplicationRunListeners.java:111)
at org.springframework.boot.SpringApplicationRunListeners.running(SpringApplicationRunListeners.java:79)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:358)
at org.springframework.boot.web.servlet.support.SpringBootServletInitializer.run(SpringBootServletInitializer.java:175)
at org.springframework.boot.web.servlet.support.SpringBootServletInitializer.createRootApplicationContext(SpringBootServletInitializer.java:155)
at org.springframework.boot.web.servlet.support.SpringBootServletInitializer.onStartup(SpringBootServletInitializer.java:97)
at org.springframework.web.SpringServletContainerInitializer.onStartup(SpringServletContainerInitializer.java:174)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:4940)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
... 10 more
19-Mar-2023 17:35:23.339 SEVERE [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Error deploying web application directory [/usr/local/tomcat/webapps/ROOT]
java.lang.IllegalStateException: Error starting child
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:715)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:688)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:661)
at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1177)
at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1925)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:750)
Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[]]
at org.apache.catalina.util.LifecycleBase.handleSubClassException(LifecycleBase.java:440)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:198)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:711)
... 9 more
Caused by: java.lang.NullPointerException
at io.fabric8.kubernetes.client.dsl.base.CustomResourceDefinitionContext.fromCrd(CustomResourceDefinitionContext.java:52)
at org.hango.cloud.cache.K8sResourceCache.registryInformer(K8sResourceCache.java:83)
at org.hango.cloud.cache.K8sResourceCache.initInformer(K8sResourceCache.java:68)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.springframework.context.event.ApplicationListenerMethodAdapter.doInvoke(ApplicationListenerMethodAdapter.java:344)
at org.springframework.context.event.ApplicationListenerMethodAdapter.processEvent(ApplicationListenerMethodAdapter.java:229)
at org.springframework.context.event.ApplicationListenerMethodAdapter.onApplicationEvent(ApplicationListenerMethodAdapter.java:166)
at org.springframework.context.event.SimpleApplicationEventMulticaster.doInvokeListener(SimpleApplicationEventMulticaster.java:176)
at org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:169)
at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:143)
at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:421)
at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:378)
at org.springframework.boot.context.event.EventPublishingRunListener.running(EventPublishingRunListener.java:111)
at org.springframework.boot.SpringApplicationRunListeners.lambda$running$6(SpringApplicationRunListeners.java:79)
at java.util.ArrayList.forEach(ArrayList.java:1259)
at org.springframework.boot.SpringApplicationRunListeners.doWithListeners(SpringApplicationRunListeners.java:117)
at org.springframework.boot.SpringApplicationRunListeners.doWithListeners(SpringApplicationRunListeners.java:111)
at org.springframework.boot.SpringApplicationRunListeners.running(SpringApplicationRunListeners.java:79)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:358)
at org.springframework.boot.web.servlet.support.SpringBootServletInitializer.run(SpringBootServletInitializer.java:175)
at org.springframework.boot.web.servlet.support.SpringBootServletInitializer.createRootApplicationContext(SpringBootServletInitializer.java:155)
at org.springframework.boot.web.servlet.support.SpringBootServletInitializer.onStartup(SpringBootServletInitializer.java:97)
at org.springframework.web.SpringServletContainerInitializer.onStartup(SpringServletContainerInitializer.java:174)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:4940)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
... 10 more
To Reproduce
Steps to reproduce the behavior:
sh install.sh
sh check.sh
Expected behavior
正常安装
Additional context
Add any other context about the problem here, e.g.
Is your feature request related to a problem? Please describe.
we need integrate ext auth to hango
Describe the solution you'd like
we can refer to https://www.envoyproxy.io/docs/envoy/latest/configuration/http/http_filters/ext_authz_filter
hango是否支持证书管理和HTTPS配置
use smartlimit for local limit and cluster limit to enhance hango rate limit
请问咱们hango用的哪一个版本的istio,没看到对应的开源项目。
Describe the bug
install\helm\hango-gateway\charts\operator-crd\templates\operator-crd.yaml
这个文件中有两个IstioOperator
安装后,在istio-operator中实际处理IstioOperator的顺序可能是hango-gateway在前,hango-istio在后
并且IstioOperator的处理看起来是单线程的
并且gateway-proxy的pod启动依赖istiod,导致等待一段时间后(默认300s,通过istio-operator的WAIT_FOR_RESOURCES_TIMEOUT环境变量配置),直到hango-gateway的IstioOperator状态ERROR后才能启动istiod,此后gateway-proxy的pod才能真正起来
碰到这种情况,只能把hango-gateway的IstioOperator删除后,重新执行helm upgrade
To Reproduce
Steps to reproduce the behavior:
helm install --namespace hango-system hango-gateway ./helm/hango-gateway/
Expected behavior
有没有办法可以解决这个问题,一次性安装成功?
比如同时并发处理IsitoOperator
Additional context
Add any other context about the problem here, e.g.
Describe the bug
A clear and concise description of what the bug is.
参考官网
安装版本为hango-gateway-1.5.0
安装完成
kubectl get pods -n hango-system
NAME READY STATUS RESTARTS AGE
hango-istiod-85b9f659dc-w7lqg 1/1 Running 1 (14d ago) 14d
hango-portal-6985fd754d-2zhgg 2/2 Running 2 (5h6m ago) 14d
hango-proxy-7ddcb9567d-w9k5x 1/1 Running 1 14d
hango-ui-6b6d9fd6f8-84n2j 1/1 Running 0 14d
istio-e2e-app-7d967f6867-kfp5x 1/1 Running 1 (5h6m ago) 14d
slime-hango-dc9556b64-jrflb 1/1 Running 0 14d
已执行install/init-hango/init.sh,成功
2.创建虚拟网关¶
通过虚拟网关管理界面创建虚拟网关,其中监听端口为Envoy暴露的访问端口,域名信息将为后续的服务路由所用(必要信息)
填写信息,保存
弹出“服务器内部错误”
如何解决,如何定位问题?
Add any other context about the problem here, e.g.
麻烦问下,hango-gateway数据面镜像版本在更新,代码没有更新吗?
我们期望通过这个 issue 收集更多 Hango 的社区用户信息,并借此与社区用户建立更多的联系,了解 Hango 的使用方式及遇到的问题,以更好的推动 Hango 的演进及生态发展。
您可以告诉我们使用 Hango 的经验及遇到的问题,也希望您能留下个人或企业的相关信息:
可以参考下面的示例:
公司:XXX
阶段:评估
关注:插件扩展
建议:XXX
联系方式:XXX
Through this issue, we hope to collect more information about Hango's community users and use it to build more connections with them, understand how Hango is used and what problems they encounter, in order to better promote the evolution and ecological development of Hango.
You can tell us your experience with Hango and the problems you encountered, and you can also leave your personal or business information:
-Name of the company you work for
-Phase (evaluation, development, testing, production, etc.)
-Features of Hango that you concern (service discovery, route management, traffic management, security, plugin extension etc.)
-Any suggestions for Hango, such as the features or problems you most want Hango to provide or solve
-Your contact information: email, etc.
You can refer to the following example:
Company: XXX
Phase: Evaluation
Concern: plugin extension
Recommendation: XXX
Contact: XXX
support nacos and eureka registry center
add milestone and roadmap
support http request for dubbp upstream
regex and input check for web console
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.