api-gateway问题

  • 我是一键部署的。重启宿主机之后,就起不来了,看了api-gateway就一直这样,但我的register是可以访问的
www-data@api-gateway-7b4bf77747-rmnm9:/choerodon$ curl http://register-server:8000
<!doctype html>
<html class="no-js"> 
<head>
    <base href="/">
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>Eureka</title>
    <meta name="description" content="">
    <meta name="viewport" content="width=device-width">

    <link rel="stylesheet" href="static/css/wro.css">

</head>

<body id="one">
<nav class="navbar navbar-default" role="navigation">

是可以访问的,请问这是为啥

根据你提供的日志,看不出来啥,能有啥错误日志,或者部署的环境变量贴出来看看

环境变量是没问题的,之前还在用呢,前两天重启机器之后就不能用了,我把报错的组件日志都贴出来

base-service   knowledgebase-service  notify-service  test-manager-service

2020-05-11 15:33:43.437  INFO 7 --- [pool-6-thread-1] io.choerodon.feign.CustomMetadataRule    : Start to get CustomUserDetails
2020-05-11 15:33:43.437  INFO 7 --- [ool-10-thread-1] io.choerodon.feign.CustomMetadataRule    : CustomUserDetails is Empty
2020-05-11 15:33:43.437  INFO 7 --- [pool-6-thread-1] io.choerodon.feign.CustomMetadataRule    : CustomUserDetails is Empty
2020-05-11 15:33:43.437  INFO 7 --- [ool-10-thread-1] io.choerodon.feign.CustomMetadataRule    : No rule's servers: Host => 10.244.2.215, IP => 18080, Scheme => null
2020-05-11 15:33:43.437  INFO 7 --- [pool-6-thread-1] io.choerodon.feign.CustomMetadataRule    : No rule's servers: Host => 10.244.2.215, IP => 18080, Scheme => null
2020-05-11 15:33:43.437  INFO 7 --- [ool-10-thread-1] io.choerodon.feign.CustomMetadataRule    : Route to one of no rule's servers
2020-05-11 15:33:43.437  INFO 7 --- [pool-6-thread-1] io.choerodon.feign.CustomMetadataRule    : Route to one of no rule's servers

agile-service

2020-05-11 15:35:46.464  INFO [agile-service,,,] 7 --- [pool-7-thread-1] io.choerodon.feign.CustomMetadataRule    : Start to choose server to route
2020-05-11 15:35:46.465  INFO [agile-service,,,] 7 --- [pool-7-thread-1] io.choerodon.feign.CustomMetadataRule    : One of all servers: HOST => 10.244.2.215, IP => 18080, Scheme => null
2020-05-11 15:35:46.465  INFO [agile-service,,,] 7 --- [pool-7-thread-1] io.choerodon.feign.CustomMetadataRule    : Start to get CustomUserDetails
2020-05-11 15:35:46.465  INFO [agile-service,,,] 7 --- [pool-7-thread-1] io.choerodon.feign.CustomMetadataRule    : CustomUserDetails is Empty
2020-05-11 15:35:46.465  INFO [agile-service,,,] 7 --- [pool-7-thread-1] io.choerodon.feign.CustomMetadataRule    : No rule's servers: Host => 10.244.2.215, IP => 18080, Scheme => null
2020-05-11 15:35:46.465  INFO [agile-service,,,] 7 --- [pool-7-thread-1] io.choerodon.feign.CustomMetadataRule    : Route to one of no rule's servers
2020-05-11 15:36:20.398  INFO [agile-service,,,] 7 --- [trap-executor-0] c.n.d.s.r.aws.ConfigClusterResolver      : Resolving eureka endpoints via configuration

api-gateway

2020-05-11 15:30:59.320  INFO 8 --- [  XNIO-1 task-1] io.undertow.servlet                      : Initializing Spring DispatcherServlet 'dispatcherServlet'
2020-05-11 15:30:59.320  INFO 8 --- [  XNIO-1 task-1] o.s.web.servlet.DispatcherServlet        : Initializing Servlet 'dispatcherServlet'
2020-05-11 15:30:59.330  INFO 8 --- [  XNIO-1 task-1] o.s.web.servlet.DispatcherServlet        : Completed initialization in 10 ms
2020-05-11 15:30:59.339  INFO 8 --- [  XNIO-1 task-1] i.c.gateway.helper.AuthenticationHelper  : Request 403, context: RequestContext{request=CheckRequest{accessToken='null', uri='/', method='get'}, response=CheckResponse{jwt='null', message='This request mismatch any routes, uri: / , all routes: [ZuulRoute{id='agile', path='/agile/**', serviceId='agile-service', url='null', stripPrefix=true, retryable=null, sensitiveHeaders=[], customSensitiveHeaders=true, }, ZuulRoute{id='asgard', path='/asgard/**', serviceId='asgard-service', url='null', stripPrefix=true, retryable=null, sensitiveHeaders=[], customSensitiveHeaders=true, }, ZuulRoute{id='base-service', path='/base/**', serviceId='base-service', url='null', stripPrefix=true, retryable=null, sensitiveHeaders=[], customSensitiveHeaders=true, }, ZuulRoute{id='buzz', path='/buzz/**', serviceId='buzz-service', url='null', stripPrefix=true, retryable=null, sensitiveHeaders=[], customSensitiveHeaders=true, }, ZuulRoute{id='devops', path='/devops/**', serviceId='devops-service', url='null', stripPrefix=true, retryable=null, sensitiveHeaders=[], customSensitiveHeaders=true, }, ZuulRoute{id='file', path='/file/**', serviceId='file-service', url='null', stripPrefix=true, retryable=null, sensitiveHeaders=[], customSensitiveHeaders=true, }, ZuulRoute{id='hrds-code-repo', path='/rducm/**', serviceId='hrds-code-repo', url='null', stripPrefix=true, retryable=null, sensitiveHeaders=[], customSensitiveHeaders=true, }, ZuulRoute{id='hrds-doc-repo', path='/rdudm/**', serviceId='hrds-doc-repo', url='null', stripPrefix=true, retryable=null, sensitiveHeaders=[], customSensitiveHeaders=true, }, ZuulRoute{id='hrds-qa', path='/rdqam/**', serviceId='hrds-qa', url='null', stripPrefix=true, retryable=null, sensitiveHeaders=[], customSensitiveHeaders=true, }, ZuulRoute{id='iam', path='/iam/**', serviceId='iam-service', url='null', stripPrefix=true, retryable=null, sensitiveHeaders=[], customSensitiveHeaders=true, }, ZuulRoute{id='knowledge', path='/knowledge/**', serviceId='knowledgebase-ser
vice', url='null', stripPrefix=true, retryable=null, sensitiveHeaders=[], customSensitiveHeaders=true, }, ZuulRoute{id='manager', path='/manager/**', serviceId='manager-service', url='null', stripPrefix=true, retryable=null, sensitiveHeaders=[], customSensitiveHeaders=true, }, ZuulRoute{id='notify', path='/notify/**', serviceId='notify-service', url='null', stripPrefix=true, retryable=null, sensitiveHeaders=[], customSensitiveHeaders=true, }, ZuulRoute{id='oauth', path='/oauth/**', serviceId='oauth-server', url='null', stripPrefix=false, retryable=null, sensitiveHeaders=[none], customSensitiveHeaders=true, }, ZuulRoute{id='org', path='/org/**', serviceId='organization-service', url='null', stripPrefix=true, retryable=null, sensitiveHeaders=[], customSensitiveHeaders=true, }, ZuulRoute{id='test-manager', path='/test/**', serviceId='test-manager-service', url='null', stripPrefix=true, retryable=null, sensitiveHeaders=[], customSensitiveHeaders=true, }]', status=PERMISSION_SERVICE_ROUTE, routeRuleCode='null'}, requestKey='null', permission=null, route=null, trueUri='null', customUserDetails=null}
2020-05-11 15:34:39.698  INFO 8 --- [trap-executor-0] c.n.d.s.r.aws.ConfigClusterResolver      : Resolving eureka endpoints via configuration
2020-05-11 15:34:42.008  INFO 8 --- [ XNIO-2 task-56] c.c.c.ConfigServicePropertySourceLocator : Fetching config from server at : http://register-server:8000
2020-05-11 15:34:42.024  INFO 8 --- [ XNIO-2 task-56] c.c.c.ConfigServicePropertySourceLocator : Located environment: name=api-gateway, profiles=[default], label=, version=0.21.0, state=

asgard-service

2020-05-11 15:40:58.696  INFO 7 --- [ool-11-thread-1] io.choerodon.feign.CustomMetadataRule    : Start to choose server to route
2020-05-11 15:40:58.696  INFO 7 --- [ool-11-thread-1] io.choerodon.feign.CustomMetadataRule    : One of all servers: HOST => 10.244.2.215, IP => 18080, Scheme => null
2020-05-11 15:40:58.696  INFO 7 --- [ool-11-thread-1] io.choerodon.feign.CustomMetadataRule    : Start to get CustomUserDetails
2020-05-11 15:40:58.696  INFO 7 --- [ool-11-thread-1] io.choerodon.feign.CustomMetadataRule    : CustomUserDetails is Empty
2020-05-11 15:40:58.696  INFO 7 --- [ool-11-thread-1] io.choerodon.feign.CustomMetadataRule    : No rule's servers: Host => 10.244.2.215, IP => 18080, Scheme => null
2020-05-11 15:40:58.697  INFO 7 --- [ool-11-thread-1] io.choerodon.feign.CustomMetadataRule    : Route to one of no rule's servers
2020-05-11 15:40:58.700  INFO 7 --- [ XNIO-1 task-10] c.v.ScheduleTaskInstanceSiteV2Controller : poll ScheduleTaskInstance from asgard-service
2020-05-11 15:41:08.424  INFO 7 --- [ XNIO-1 task-23] c.v.ScheduleTaskInstanceSiteV2Controller : poll ScheduleTaskInstance from notify-service
2020-05-11 15:41:08.424  INFO 7 --- [ XNIO-1 task-17] i.c.a.a.c.v.SagaTaskInstanceV2Controller : poll SagaTaskInstance from notify-service
2020-05-11 15:41:12.362  INFO 7 --- [ XNIO-1 task-31] c.v.ScheduleTaskInstanceSiteV2Controller : poll ScheduleTaskInstance from knowledgebase-service
2020-05-11 15:41:12.362  INFO 7 --- [  XNIO-1 task-5] i.c.a.a.c.v.SagaTaskInstanceV2Controller : poll SagaTaskInstance from knowledgebase-service
2020-05-11 15:41:22.691  INFO 7 --- [pool-7-thread-1] io.choerodon.feign.CustomMetadataRule    : Start to choose server to route
2020-05-11 15:41:22.691  INFO 7 --- [pool-7-thread-1] io.choerodon.feign.CustomMetadataRule    : One of all servers: HOST => 10.244.2.215, IP => 18080, Scheme => null
2020-05-11 15:41:22.691  INFO 7 --- [pool-7-thread-1] io.choerodon.feign.CustomMetadataRule    : Start to get CustomUserDetails
2020-05-11 15:41:22.691  INFO 7 --- [pool-7-thread-1] io.choerodon.feign.CustomMetadataRule    : CustomUserDetails is Empty
2020-05-11 15:41:22.691  INFO 7 --- [pool-7-thread-1] io.choerodon.feign.CustomMetadataRule    : No rule's servers: Host => 10.244.2.215, IP => 18080, Scheme => null
2020-05-11 15:41:22.691  INFO 7 --- [pool-7-thread-1] io.choerodon.feign.CustomMetadataRule    : Route to one of no rule's servers
2020-05-11 15:41:22.695  INFO 7 --- [ XNIO-1 task-13] i.c.a.a.c.v.SagaTaskInstanceV2Controller : poll SagaTaskInstance from asgard-service

devops-service file-service oauth-server

2020-05-11 14:57:11.662  WARN 7 --- [pool-8-thread-1] i.c.a.common.AbstractAsgardConsumer      : error.asgard.scheduleRunning, msg: com.netflix.client.ClientException: Load balancer does not have available server for client: asgard-service
2020-05-11 14:57:11.662  WARN 7 --- [ool-12-thread-1] i.c.a.common.AbstractAsgardConsumer      : error.asgard.scheduleRunning, msg: com.netflix.client.ClientException: Load balancer does not have available server for client: asgard-service
2020-05-11 14:57:12.663  WARN 7 --- [ool-12-thread-1] i.c.a.common.AbstractAsgardConsumer      : error.asgard.scheduleRunning, msg: com.netflix.client.ClientException: Load balancer does not have available server for client: asgard-service
2020-05-11 14:57:12.663  WARN 7 --- [pool-8-thread-1] i.c.a.common.AbstractAsgardConsumer      : error.asgard.scheduleRunning, msg: com.netflix.client.ClientException: Load balancer does not have available server for client: asgard-service
2020-05-11 15:00:53.439  INFO 7 --- [trap-executor-0] c.n.d.s.r.aws.ConfigClusterResolver      : Resolving eureka endpoints via configuration
2020-05-11 15:01:18.548  INFO 7 --- [nio-8061-exec-4] c.c.c.ConfigServicePropertySourceLocator : Fetching config from server at : http://register-server:8000
2020-05-11 15:01:18.559  INFO 7 --- [nio-8061-exec-4] c.c.c.ConfigServicePropertySourceLocator : Located environment: name=devops-service, profiles=[default], label=, version=0.21.2, state=
2020-05-11 15:05:53.439  INFO 7 --- [trap-executor-0] c.n.d.s.r.aws.ConfigClusterResolver      : Resolving eureka endpoints via configuration

manager-service

2020-05-11 14:47:52.518  INFO 7 --- [trap-executor-0] c.n.d.s.r.aws.ConfigClusterResolver      : Resolving eureka endpoints via configuration
2020-05-11 14:52:52.519  INFO 7 --- [trap-executor-0] c.n.d.s.r.aws.ConfigClusterResolver      : Resolving eureka endpoints via configuration
2020-05-11 14:57:21.220  INFO 7 --- [freshExecutor-0] i.c.e.event.AbstractEurekaEventObserver  : Receive UP event, payload: EurekaEventPayload{id='10.244.2.215:asgard-service:18080', status='UP', appName='asgard-service', version='0.21.1', instanceAddress='10.244.2.215:18080', createTime=Mon May 11 14:57:21 CST 2020}
2020-05-11 14:57:21.686  INFO 7 --- [RxIoScheduler-8] i.c.m.a.e.EurekaEventObserver            : actuator data not change skip: 10.244.2.215:asgard-service:18080
2020-05-11 14:57:21.720  WARN 7 --- [RxIoScheduler-8] i.c.m.a.e.EurekaEventObserver            : process metadata data exception skip: EurekaEventPayload{id='10.244.2.215:asgard-service:18080', status='UP', appName='asgard-service', version='0.21.1', instanceAddress='10.244.2.215:18080', createTime=Mon May 11 14:57:21 CST 2020}
org.springframework.web.client.HttpClientErrorException$NotFound: 404 Not Found

eureka注册中心的信息

System Status
Current time	2020-05-11 07:52:53.02209869 +0000 UTC m=+154.198611575
DS Replicas
10.244.0.162:go-register-server:8000
Instances currently registered with Eureka
Application	AMIs	Available	InAvailable
notify-service	1/1	10.244.3.140:notify-service:18085 	
devops-service	1/1	10.244.2.197:devops-service:8060 	
knowledgebase-service	1/1	10.244.3.147:knowledgebase-service:8280 	
manager-service	1/1	10.244.2.210:manager-service:8963 	
test-manager-service	1/1	10.244.1.45:test-manager-service:8093 	
base-service	1/1	10.244.0.156:base-service:8030 	
asgard-service	1/1	10.244.2.215:asgard-service:18080 	
oauth-server	1/1	10.244.1.43:oauth-server:8020 	
api-gateway	1/1	10.244.0.146:api-gateway:8080 	
file-service	1/1	10.244.3.152:file-service:9090 	
workflow-service	1/1	10.244.3.155:workflow-service:8065 	
agile-service	1/1	10.244.0.159:agile-service:8378 	
go-register-server	1/1	10.244.0.162:go-register-server:8000 	
General Info
Name	Value
NamespaceOfRegisterServer	c7n-system
NamespacesOfListeningOn	[c7n-system]
NumOfCpu	8
UsedMemory	69MiB
Instance Info
Name	Value
IpAddr	10.244.0.162

你好,你现在遇到的问题是什么呢?

不能用是指什么不能用

除了harbor、数据库、redis组件正常,其他都不能访问。访问前端空白,访问gitlab404。上边的回复是组件的日志

你在集群内部查看一下没有正常运行的猪齿鱼组件的 /actuator/health

比如base-service 是 curl base-service.c7n-system.svc:8031/actuator/health

看一下是否有错误原因?

curl 所有组件都正常访问。
现在出现新的报错403, 以下是api-gateway的报错

2020-05-12 13:22:39.719  INFO 7 --- [  XNIO-1 task-9] i.c.gateway.helper.AuthenticationHelper  : Request 403, context: RequestContext{request=CheckRequest{accessToken='null', uri='/', method='get'}, response=CheckResponse{jwt='null', message='This request mismatch any routes, uri: / , all routes: [ZuulRoute{id='agile', path='/agile/**', serviceId='agile-service', url='null', stripPrefix=true, retryable=null, sensitiveHeaders=[], customSensitiveHeaders=true, }, ZuulRoute{id='asgard', path='/asgard/**', serviceId='asgard-service', url='null', stripPrefix=true, retryable=null, sensitiveHeaders=[], customSensitiveHeaders=true, }, ZuulRoute{id='base-service', path='/base/**', serviceId='base-service', url='null', stripPrefix=true, retryable=null, sensitiveHeaders=[], customSensitiveHeaders=true, }, ZuulRoute{id='buzz', path='/buzz/**', serviceId='buzz-service', url='null', stripPrefix=true, retryable=null, sensitiveHeaders=[], customSensitiveHeaders=true, }, ZuulRoute{id='devops', path='/devops/**', serviceId='devops-service', url='null', stripPrefix=true, retryable=null, sensitiveHeaders=[], customSensitiveHeaders=true, }, ZuulRoute{id='file', path='/file/**', serviceId='file-service', url='null', stripPrefix=true, retryable=null, sensitiveHeaders=[], customSensitiveHeaders=true, }, ZuulRoute{id='hrds-code-repo', path='/rducm/**', serviceId='hrds-code-repo', url='null', stripPrefix=true, retryable=null, sensitiveHeaders=[], customSensitiveHeaders=true, }, ZuulRoute{id='hrds-doc-repo', path='/rdudm/**', serviceId='hrds-doc-repo', url='null', stripPrefix=true, retryable=null, sensitiveHeaders=[], customSensitiveHeaders=true, }, ZuulRoute{id='hrds-qa', path='/rdqam/**', serviceId='hrds-qa', url='null', stripPrefix=true, retryable=null, sensitiveHeaders=[], customSensitiveHeaders=true, }, ZuulRoute{id='iam', path='/iam/**', serviceId='iam-service', url='null', stripPrefix=true, retryable=null, sensitiveHeaders=[], customSensitiveHeaders=true, }, ZuulRoute{id='knowledge', path='/knowledge/**
', serviceId='knowledgebase-service', url='null', stripPrefix=true, retryable=null, sensitiveHeaders=[], customSensitiveHeaders=true, }, ZuulRoute{id='manager', path='/manager/**', serviceId='manager-service', url='null', stripPrefix=true, retryable=null, sensitiveHeaders=[], customSensitiveHeaders=true, }, ZuulRoute{id='notify', path='/notify/**', serviceId='notify-service', url='null', stripPrefix=true, retryable=null, sensitiveHeaders=[], customSensitiveHeaders=true, }, ZuulRoute{id='oauth', path='/oauth/**', serviceId='oauth-server', url='null', stripPrefix=false, retryable=null, sensitiveHeaders=[none], customSensitiveHeaders=true, }, ZuulRoute{id='org', path='/org/**', serviceId='organization-service', url='null', stripPrefix=true, retryable=null, sensitiveHeaders=[], customSensitiveHeaders=true, }, ZuulRoute{id='test-manager', path='/test/**', serviceId='test-manager-service', url='null', stripPrefix=true, retryable=null, sensitiveHeaders=[], customSensitiveHeaders=true, }]', status=PERMISSION_SERVICE_ROUTE, routeRuleCode='null'}, requestKey='null', permission=null, route=null, trueUri='null', customUserDetails=null}
2020-05-12 13:23:04.898  INFO 7 --- [ XNIO-1 task-10] i.c.g.filter.route.HeaderWrapperFilter   : Request get empty jwt , request uri: /oauth/oauth/authorize method: GET
2020-05-12 13:23:04.902  INFO 7 --- [ XNIO-1 task-10] io.choerodon.feign.CustomMetadataRule    : Start to choose server to route
2020-05-12 13:23:04.906  WARN 7 --- [ XNIO-1 task-10] CustomErrorZuulFilter                    : Error during filtering
com.netflix.zuul.exception.ZuulException: Forwarding error
	at org.springframework.cloud.netflix.zuul.filters.route.RibbonRoutingFilter.handleException(RibbonRoutingFilter.java:198) ~[spring-cloud-netflix-zuul-2.1.2.RELEASE.jar!/:2.1.2.RELEASE]
	at org.springframework.cloud.netflix.zuul.filters.route.RibbonRoutingFilter.forward(RibbonRoutingFilter.java:173) ~[spring-cloud-netflix-zuul-2.1.2.RELEASE.jar!/:2.1.2.RELEASE]
	at org.springframework.cloud.netflix.zuul.filters.route.RibbonRoutingFilter.run(RibbonRoutingFilter.java:119) ~[spring-cloud-netflix-zuul-2.1.2.RELEASE.jar!/:2.1.2.RELEASE]
	at com.netflix.zuul.ZuulFilter.runFilter(ZuulFilter.java:117) ~[zuul-core-1.3.1.jar!/:1.3.1]

你好,这个问题解决了吗?