首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >ManageIQ上次刷新: HTTP状态代码403,用户无法列出集群中的所有pods

ManageIQ上次刷新: HTTP状态代码403,用户无法列出集群中的所有pods
EN

Stack Overflow用户
提问于 2017-06-03 07:44:59
回答 0查看 158关注 0票数 0

我尝试使用manageiq建立到openshift的监控连接。容器提供者生成成功。

但问题是此连接无法刷新。我将身份验证模式设置为httpd,如下所示:

但是,这种配置抛出了403错误。

仅供参考,它们是ssl_error.log和evm.log

==ssl_error.log==

代码语言:javascript
复制
[Sat Jun 03 00:39:59.440542 2017] [proxy:error] [pid 2049] (111)Connection refused: AH00957: HTTP: attempt to connect to 0.0.0.0:3002 (0.0.0.0) failed
[Sat Jun 03 00:39:59.440548 2017] [proxy:error] [pid 2049] AH00959: ap_proxy_connect_backend disabling worker for (0.0.0.0) for 60s
[Sat Jun 03 00:39:59.440550 2017] [proxy_http:error] [pid 2049] [client 172.17.0.1:43722] AH01114: HTTP: failed to make connection to backend: 0.0.0.0, referer: https://localhost:8443/ems_container/1
[Sat Jun 03 00:39:59.570938 2017] [proxy:error] [pid 2049] (111)Connection refused: AH00957: HTTP: attempt to connect to 0.0.0.0:3001 (0.0.0.0) failed
[Sat Jun 03 00:39:59.570960 2017] [proxy:error] [pid 2049] AH00959: ap_proxy_connect_backend disabling worker for (0.0.0.0) for 60s
[Sat Jun 03 00:39:59.570963 2017] [proxy_http:error] [pid 2049] [client 172.17.0.1:43722] AH01114: HTTP: failed to make connection to backend: 0.0.0.0, referer: https://localhost:8443/ems_container/1

== evm.log ==

代码语言:javascript
复制
[----] E, [2017-06-03T00:43:41.697865 #2327:2ad9e81e2b4c] ERROR -- : MIQ(ManageIQ::Providers::Openshift::ContainerManager::EventCatcher::Runner#start_event_monitor) EMS [console.starter-us-east-1.openshift.com] as [] Event Monitor Thread aborted because [User "gladiator67@naver.com" cannot list all events in the cluster]
[----] E, [2017-06-03T00:43:41.698127 #2327:2ad9e81e2b4c] ERROR -- : [KubeException]: User "gladiator67@naver.com" cannot list all events in the cluster  Method:[rescue in block in start_event_monitor]
[----] E, [2017-06-03T00:43:41.698272 #2327:2ad9e81e2b4c] ERROR -- : /opt/rubies/ruby-2.3.1/lib/ruby/gems/2.3.0/gems/kubeclient-2.3.0/lib/kubeclient/common.rb:107:in `rescue in handle_exception'
/opt/rubies/ruby-2.3.1/lib/ruby/gems/2.3.0/gems/kubeclient-2.3.0/lib/kubeclient/common.rb:99:in `handle_exception'
/opt/rubies/ruby-2.3.1/lib/ruby/gems/2.3.0/gems/kubeclient-2.3.0/lib/kubeclient/common.rb:258:in `get_entities'
/opt/rubies/ruby-2.3.1/lib/ruby/gems/2.3.0/gems/kubeclient-2.3.0/lib/kubeclient/common.rb:169:in `block (2 levels) in define_entity_methods'
/opt/rubies/ruby-2.3.1/lib/ruby/gems/2.3.0/gems/kubeclient-2.3.0/lib/kubeclient/common.rb:79:in `method_missing'
/opt/rubies/ruby-2.3.1/lib/ruby/gems/2.3.0/bundler/gems/manageiq-gems-pending-e0f3ea8755bf/lib/gems/pending/kubernetes/events/kubernetes_event_monitor.rb:32:in `each'
/var/www/miq/vmdb/app/models/manageiq/providers/kubernetes/container_manager/event_catcher_mixin.rb:41:in `monitor_events'
/var/www/miq/vmdb/app/models/manageiq/providers/base_manager/event_catcher/runner.rb:164:in `block in start_event_monitor'

已更新

那么我如何在openshift online上只监控我自己的项目呢?在manageiq Docker容器上是不可能的吗?下面的代码是openshift Java客户端代码,它显示了我的openshift项目。

代码语言:javascript
复制
    IClient client = new ClientBuilder("https://console.starter-us-east-1.openshift.com")
                        .withUserName("gladiator67@naver.com")
                        .withPassword("111111")
                        .build();

client.getAuthorizationContext().setToken("is-ildn...");

                System.out.println("=======================================================================");
System.out.println(client.getOpenShiftAPIVersion() + ", " + client.getServerReadyStatus());
    System.out.println("\n========================Openshift Project====================================");
    IProject project = (IProject)client.getResourceFactory().stub(ResourceKind.PROJECT, "josephproject-openshift");
    System.out.println("Openshift API version : " + project.getApiVersion() 
                    +", Project namespace : " + project.getNamespace() + ", Project name : " + project.getName());

结果显示了我的openshift项目信息。

代码语言:javascript
复制
=======================================================================
v1, ok

========================Openshift Project====================================
Openshift API version : v1, Project namespace : josephproject-openshift, Project name : josephproject-openshift

我想我可以像这些客户端代码一样在manageiq上监控我的openshift项目。

EN

回答

页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/44338824

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档