goharbor / harbor-helm

The helm chart to deploy Harbor
Apache License 2.0
1.17k stars 760 forks source link

Using alioss to report an error: Failed to get total of charts under project library: http error: code 500, message oss: service returned error: StatusCode=403, ErrorCode=AccessDenied, ErrorMessage=The bucket you are attempting to access must be addressed using the specified endpoint. Please send all future requests to this endpoint. #300

Closed henry-proj closed 5 years ago

henry-proj commented 5 years ago

root@DESKTOP-62GGDFL:~/harbor# kubectl logs harbor-harbor-core-8c88cf58b-44xj7 2019/07/26 02:55:02 [D] [server.go:2619] | 172.20.5.1| 200 | 27.311553ms| match| GET /api/statistics r:/api/statistics 2019-07-26T02:55:02Z [DEBUG] [/core/filter/security.go:233]: OIDC CLI modifer only handles request by docker CLI or helm CLI 2019-07-26T02:55:02Z [DEBUG] [/core/filter/security.go:494]: got user information from session 2019-07-26T02:55:02Z [DEBUG] [/core/filter/security.go:514]: using local database project manager 2019-07-26T02:55:02Z [DEBUG] [/core/filter/security.go:516]: creating local database security context... 2019-07-26T02:55:02Z [DEBUG] [/common/dao/project.go:196]: query sql:select count(1) from project as p where p.deleted=false 2019-07-26T02:55:02Z [DEBUG] [/common/dao/project.go:173]: query sql:select distinct p.project_id, p.name, p.owner_id, p.creation_time, p.update_time from project as p where p.deleted=false 2019-07-26T02:55:02Z [DEBUG] [/chartserver/handler_repo.go:166]: Getting index.yaml from 'http://harbor-harbor-chartmuseum/library/index.yaml' 2019-07-26T02:55:02Z [ERROR] [/core/api/project.go:440]: Failed to get total of charts under project library: http error: code 500, message oss: service returned error: StatusCode=403, ErrorCode=AccessDenied, ErrorMessage=The bucket you are attempting to access must be addressed using the specified endpoint. Please send all future requests to this endpoint., RequestId=5D3A6B86F1BF4BD4FF5EDFDA 2019-07-26T02:55:02Z [ERROR] [/common/api/base.go:229]: 2019-07-26T02:55:02Z [ERROR] [/common/api/base.go:69]: GET /api/projects?page=1&page_size=15 failed with error: {"code":500,"message":"Internal Server Error"} 2019-07-26T02:55:02Z [DEBUG] [/chartserver/handler_repo.go:166]: Getting index.yaml from 'http://harbor-harbor-chartmuseum/develop/index.yaml' 2019-07-26T02:55:02Z [ERROR] [/core/api/project.go:440]: Failed to get total of charts under project develop: http error: code 500, message oss: service returned error: StatusCode=403, ErrorCode=AccessDenied, ErrorMessage=The bucket you are attempting to access must be addressed using the specified endpoint. Please send all future requests to this endpoint., RequestId=5D3A6B86F1BF4BD4FF5EE0CD 2019-07-26T02:55:02Z [ERROR] [/common/api/base.go:229]: 2019-07-26T02:55:02Z [ERROR] [/common/api/base.go:69]: GET /api/projects?page=1&page_size=15 failed with error: {"code":500,"message":"Internal Server Error"} 2019/07/26 02:55:02 [D] [server.go:2619] | 172.20.5.1| 500 | 207.94196ms| match| GET /api/projects r:/api/projects/ 2019-07-26T02:55:06Z [DEBUG] [/core/filter/security.go:233]: OIDC CLI modifer only handles request by docker CLI or helm CLI 2019-07-26T02:55:06Z [DEBUG] [/core/filter/security.go:491]: can not get user information from session 2019-07-26T02:55:06Z [DEBUG] [/core/filter/security.go:560]: user information is nil 2019-07-26T02:55:06Z [DEBUG] [/core/filter/security.go:574]: using local database project manager 2019-07-26T02:55:06Z [DEBUG] [/core/filter/security.go:576]: creating local database security context...

henry-proj commented 5 years ago

The cause of the error has been found。Is a problem with chartmuseum Turn off chartmuseum in values.yaml to temporarily resolve

chartmuseum: enabled: false image: repository: goharbor/chartmuseum-photon tag: v0.8.1-v1.8.1

ywk253100 commented 5 years ago

Seems it is related with the storage you configured:

2019-07-26T02:55:02Z [ERROR] [/core/api/project.go:440]: Failed to get total of charts under project develop: http error: code 500, message oss: service returned error: StatusCode=403, ErrorCode=AccessDenied, ErrorMessage=The bucket you are attempting to access must be addressed using the specified endpoint. Please send all future requests to this endpoint., RequestId=5D3A6B86F1BF4BD4FF5EE0CD