[jbosstools-issues] [JBoss JIRA] (JBIDE-21829) Error when starting an OpenShift Server immediately after workspace startup

Fred Bricon (JIRA) issues at jboss.org
Thu Mar 17 15:56:00 EDT 2016


    [ https://issues.jboss.org/browse/JBIDE-21829?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13178699#comment-13178699 ] 

Fred Bricon edited comment on JBIDE-21829 at 3/17/16 3:55 PM:
--------------------------------------------------------------

The same problem occurs when starting an openshift server, after workspace startup (i.e. before the user even connected to openshift).
Clicking on server start will trigger the OpenShift connection wizard. Once connected the server will fail with 

{noformat}
[DEBUG] 2016-03-17 15:54:36,896 com.openshift.internal.restclient.DefaultClient - https://10.3.2.2:8443/oapi
[DEBUG] 2016-03-17 15:54:37,974 com.openshift.internal.restclient.DefaultClient - {"kind":"APIVersions","apiVersion":"v1","versions":["v1"]}

[DEBUG] 2016-03-17 15:54:37,984 com.openshift.internal.restclient.DefaultClient - https://10.3.2.2:8443/osapi
[DEBUG] 2016-03-17 15:54:38,022 com.openshift.internal.restclient.DefaultClient - {"kind":"APIVersions","apiVersion":"v1","versions":[]}

[DEBUG] 2016-03-17 15:54:38,029 com.openshift.internal.restclient.DefaultClient - https://10.3.2.2:8443/api
[DEBUG] 2016-03-17 15:54:38,069 com.openshift.internal.restclient.DefaultClient - {"kind":"APIVersions","apiVersion":"v1","versions":["v1","v1beta3"]}

[DEBUG] 2016-03-17 15:54:38,072 com.openshift.internal.restclient.URLBuilder - Built url: https://10.3.2.2:8443/api/v1/namespaces/sauce/services
[DEBUG] 2016-03-17 15:54:38,100 com.openshift.internal.restclient.DefaultClient - Could not list Service resources in namespace sauce: {
  "kind": "Status",
  "apiVersion": "v1",
  "metadata": {},
  "status": "Failure",
  "message": "User \"system:anonymous\" cannot list services in project \"sauce\"",
  "reason": "Forbidden",
  "details": {
    "kind": "services"
  },
  "code": 403
}

com.openshift.internal.restclient.http.HttpClientException: {
  "kind": "Status",
  "apiVersion": "v1",
  "metadata": {},
  "status": "Failure",
  "message": "User \"system:anonymous\" cannot list services in project \"sauce\"",
  "reason": "Forbidden",
  "details": {
    "kind": "services"
  },
  "code": 403
}

	at com.openshift.internal.restclient.http.UrlConnectionHttpClient.createException(UrlConnectionHttpClient.java:278)
	at com.openshift.internal.restclient.http.UrlConnectionHttpClient.request(UrlConnectionHttpClient.java:211)
	at com.openshift.internal.restclient.http.UrlConnectionHttpClient.request(UrlConnectionHttpClient.java:187)
	at com.openshift.internal.restclient.http.UrlConnectionHttpClient.get(UrlConnectionHttpClient.java:149)
	at com.openshift.internal.restclient.DefaultClient.list(DefaultClient.java:153)
	at com.openshift.internal.restclient.DefaultClient.list(DefaultClient.java:139)
	at org.jboss.tools.openshift.core.connection.Connection.getResources(Connection.java:387)
	at org.jboss.tools.openshift.core.server.OpenShiftServerUtils.getService(OpenShiftServerUtils.java:285)
	at org.jboss.tools.openshift.core.server.OpenShiftServerUtils.getService(OpenShiftServerUtils.java:274)
	at org.jboss.tools.openshift.core.server.behavior.OpenShiftPublishController.createRSync(OpenShiftPublishController.java:54)
	at org.jboss.tools.openshift.core.server.behavior.OpenShiftPublishController.publishStart(OpenShiftPublishController.java:80)
	at org.jboss.ide.eclipse.as.wtp.core.server.behavior.CachedPublisherProfileBehavior.publishStart(CachedPublisherProfileBehavior.java:47)
	at org.eclipse.wst.server.core.model.ServerBehaviourDelegate.publish(ServerBehaviourDelegate.java:942)
	at org.eclipse.wst.server.core.model.ServerBehaviourDelegate.publish(ServerBehaviourDelegate.java:774)
	at org.eclipse.wst.server.core.internal.Server.publishImpl(Server.java:3172)
	at org.eclipse.wst.server.core.internal.Server$PublishJob.run(Server.java:345)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
Caused by: java.io.IOException: Server returned HTTP response code: 403 for URL: https://10.3.2.2:8443/api/v1/namespaces/sauce/services
	at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1840)
	at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1441)
	at sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:254)
	at com.openshift.internal.restclient.http.UrlConnectionHttpClient.request(UrlConnectionHttpClient.java:207)
	... 15 more

!ENTRY org.jboss.tools.openshift.core 1 0 2016-03-17 15:54:38.187
!MESSAGE Unauthorized.  Trying to reauthenticate
[DEBUG] 2016-03-17 15:54:38,193 com.openshift.internal.restclient.URLBuilder - Built url: https://10.3.2.2:8443/oapi/v1/users/~
[DEBUG] 2016-03-17 15:54:38,368 com.openshift.internal.restclient.DefaultClient - Could not get resource ~ in namespace : Unauthorized

com.openshift.internal.restclient.http.UnauthorizedException: Unauthorized

	at com.openshift.internal.restclient.http.UrlConnectionHttpClient.createException(UrlConnectionHttpClient.java:274)
	at com.openshift.internal.restclient.http.UrlConnectionHttpClient.request(UrlConnectionHttpClient.java:211)
	at com.openshift.internal.restclient.http.UrlConnectionHttpClient.request(UrlConnectionHttpClient.java:187)
	at com.openshift.internal.restclient.http.UrlConnectionHttpClient.get(UrlConnectionHttpClient.java:149)
	at com.openshift.internal.restclient.DefaultClient.get(DefaultClient.java:308)
	at com.openshift.internal.restclient.DefaultClient.getCurrentUser(DefaultClient.java:499)
	at com.openshift.internal.restclient.authorization.AuthorizationClient.getContext(AuthorizationClient.java:93)
	at com.openshift.internal.restclient.DefaultClient.getContext(DefaultClient.java:504)
	at org.jboss.tools.openshift.core.connection.Connection.authorize(Connection.java:236)
	at org.jboss.tools.openshift.core.connection.Connection.connect(Connection.java:226)
	at org.jboss.tools.openshift.core.connection.Connection.retryList(Connection.java:445)
	at org.jboss.tools.openshift.core.connection.Connection.getResources(Connection.java:389)
	at org.jboss.tools.openshift.core.server.OpenShiftServerUtils.getService(OpenShiftServerUtils.java:285)
	at org.jboss.tools.openshift.core.server.OpenShiftServerUtils.getService(OpenShiftServerUtils.java:274)
	at org.jboss.tools.openshift.core.server.behavior.OpenShiftPublishController.createRSync(OpenShiftPublishController.java:54)
	at org.jboss.tools.openshift.core.server.behavior.OpenShiftPublishController.publishStart(OpenShiftPublishController.java:80)
	at org.jboss.ide.eclipse.as.wtp.core.server.behavior.CachedPublisherProfileBehavior.publishStart(CachedPublisherProfileBehavior.java:47)
	at org.eclipse.wst.server.core.model.ServerBehaviourDelegate.publish(ServerBehaviourDelegate.java:942)
	at org.eclipse.wst.server.core.model.ServerBehaviourDelegate.publish(ServerBehaviourDelegate.java:774)
	at org.eclipse.wst.server.core.internal.Server.publishImpl(Server.java:3172)
	at org.eclipse.wst.server.core.internal.Server$PublishJob.run(Server.java:345)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
Caused by: java.io.IOException: Server returned HTTP response code: 401 for URL: https://10.3.2.2:8443/oapi/v1/users/~
	at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1840)
	at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1441)
	at sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:254)
	at com.openshift.internal.restclient.http.UrlConnectionHttpClient.request(UrlConnectionHttpClient.java:207)
	... 20 more
[DEBUG] 2016-03-17 15:54:38,516 com.openshift.internal.restclient.URLBuilder - Built url: https://10.3.2.2:8443/oapi/v1/users/~
[DEBUG] 2016-03-17 15:54:38,547 com.openshift.internal.restclient.DefaultClient - {"kind":"User","apiVersion":"v1","metadata":{"name":"openshift-dev","selfLink":"/oapi/v1/users/openshift-dev","uid":"34d658b3-eabb-11e5-999b-525400b46e1a","resourceVersion":"442","creationTimestamp":"2016-03-15T14:35:47Z"},"identities":["htpasswd:openshift-dev"],"groups":null}

[DEBUG] 2016-03-17 15:54:38,550 com.openshift.internal.restclient.URLBuilder - Built url: https://10.3.2.2:8443/api/v1/services
[DEBUG] 2016-03-17 15:54:38,583 com.openshift.internal.restclient.DefaultClient - Could not list Service resources in namespace : {
  "kind": "Status",
  "apiVersion": "v1",
  "metadata": {},
  "status": "Failure",
  "message": "User \"openshift-dev\" cannot list all services in the cluster",
  "reason": "Forbidden",
  "details": {
    "kind": "services"
  },
  "code": 403
}

com.openshift.internal.restclient.http.HttpClientException: {
  "kind": "Status",
  "apiVersion": "v1",
  "metadata": {},
  "status": "Failure",
  "message": "User \"openshift-dev\" cannot list all services in the cluster",
  "reason": "Forbidden",
  "details": {
    "kind": "services"
  },
  "code": 403
}

	at com.openshift.internal.restclient.http.UrlConnectionHttpClient.createException(UrlConnectionHttpClient.java:278)
	at com.openshift.internal.restclient.http.UrlConnectionHttpClient.request(UrlConnectionHttpClient.java:211)
	at com.openshift.internal.restclient.http.UrlConnectionHttpClient.request(UrlConnectionHttpClient.java:187)
	at com.openshift.internal.restclient.http.UrlConnectionHttpClient.get(UrlConnectionHttpClient.java:149)
	at com.openshift.internal.restclient.DefaultClient.list(DefaultClient.java:153)
	at com.openshift.internal.restclient.DefaultClient.list(DefaultClient.java:139)
	at com.openshift.internal.restclient.DefaultClient.list(DefaultClient.java:134)
	at org.jboss.tools.openshift.core.connection.Connection.retryList(Connection.java:446)
	at org.jboss.tools.openshift.core.connection.Connection.getResources(Connection.java:389)
	at org.jboss.tools.openshift.core.server.OpenShiftServerUtils.getService(OpenShiftServerUtils.java:285)
	at org.jboss.tools.openshift.core.server.OpenShiftServerUtils.getService(OpenShiftServerUtils.java:274)
	at org.jboss.tools.openshift.core.server.behavior.OpenShiftPublishController.createRSync(OpenShiftPublishController.java:54)
	at org.jboss.tools.openshift.core.server.behavior.OpenShiftPublishController.publishStart(OpenShiftPublishController.java:80)
	at org.jboss.ide.eclipse.as.wtp.core.server.behavior.CachedPublisherProfileBehavior.publishStart(CachedPublisherProfileBehavior.java:47)
	at org.eclipse.wst.server.core.model.ServerBehaviourDelegate.publish(ServerBehaviourDelegate.java:942)
	at org.eclipse.wst.server.core.model.ServerBehaviourDelegate.publish(ServerBehaviourDelegate.java:774)
	at org.eclipse.wst.server.core.internal.Server.publishImpl(Server.java:3172)
	at org.eclipse.wst.server.core.internal.Server$PublishJob.run(Server.java:345)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
Caused by: java.io.IOException: Server returned HTTP response code: 403 for URL: https://10.3.2.2:8443/api/v1/services
	at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1840)
	at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1441)
	at sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:254)
	at com.openshift.internal.restclient.http.UrlConnectionHttpClient.request(UrlConnectionHttpClient.java:207)
	... 17 more

!ENTRY org.eclipse.wst.server.core 4 0 2016-03-17 15:54:38.597
!MESSAGE Could not publish to the server.
!STACK 0
com.openshift.restclient.authorization.ResourceForbiddenException: User "openshift-dev" cannot list all services in the cluster
	at com.openshift.internal.restclient.DefaultClient.createOpenShiftException(DefaultClient.java:483)
	at com.openshift.internal.restclient.DefaultClient.list(DefaultClient.java:158)
	at com.openshift.internal.restclient.DefaultClient.list(DefaultClient.java:139)
	at com.openshift.internal.restclient.DefaultClient.list(DefaultClient.java:134)
	at org.jboss.tools.openshift.core.connection.Connection.retryList(Connection.java:446)
	at org.jboss.tools.openshift.core.connection.Connection.getResources(Connection.java:389)
	at org.jboss.tools.openshift.core.server.OpenShiftServerUtils.getService(OpenShiftServerUtils.java:285)
	at org.jboss.tools.openshift.core.server.OpenShiftServerUtils.getService(OpenShiftServerUtils.java:274)
	at org.jboss.tools.openshift.core.server.behavior.OpenShiftPublishController.createRSync(OpenShiftPublishController.java:54)
	at org.jboss.tools.openshift.core.server.behavior.OpenShiftPublishController.publishStart(OpenShiftPublishController.java:80)
	at org.jboss.ide.eclipse.as.wtp.core.server.behavior.CachedPublisherProfileBehavior.publishStart(CachedPublisherProfileBehavior.java:47)
	at org.eclipse.wst.server.core.model.ServerBehaviourDelegate.publish(ServerBehaviourDelegate.java:942)
	at org.eclipse.wst.server.core.model.ServerBehaviourDelegate.publish(ServerBehaviourDelegate.java:774)
	at org.eclipse.wst.server.core.internal.Server.publishImpl(Server.java:3172)
	at org.eclipse.wst.server.core.internal.Server$PublishJob.run(Server.java:345)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
Caused by: com.openshift.internal.restclient.http.HttpClientException: {
  "kind": "Status",
  "apiVersion": "v1",
  "metadata": {},
  "status": "Failure",
  "message": "User \"openshift-dev\" cannot list all services in the cluster",
  "reason": "Forbidden",
  "details": {
    "kind": "services"
  },
  "code": 403
}

	at com.openshift.internal.restclient.http.UrlConnectionHttpClient.createException(UrlConnectionHttpClient.java:278)
	at com.openshift.internal.restclient.http.UrlConnectionHttpClient.request(UrlConnectionHttpClient.java:211)
	at com.openshift.internal.restclient.http.UrlConnectionHttpClient.request(UrlConnectionHttpClient.java:187)
	at com.openshift.internal.restclient.http.UrlConnectionHttpClient.get(UrlConnectionHttpClient.java:149)
	at com.openshift.internal.restclient.DefaultClient.list(DefaultClient.java:153)
	... 14 more
Caused by: java.io.IOException: Server returned HTTP response code: 403 for URL: https://10.3.2.2:8443/api/v1/services
	at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1840)
	at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1441)
	at sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:254)
	at com.openshift.internal.restclient.http.UrlConnectionHttpClient.request(UrlConnectionHttpClient.java:207)
{noformat}


was (Author: fbricon):
The same problem occurs when starting an openshift server, after workspace startup (i.e. before the user even connected to openshift).
Clicking on server start will trigger the OpenShift connection wizard. Once connected the server will fail with 

{noformat}
[DEBUG] 2016-03-17 15:46:57,009 com.openshift.internal.restclient.DefaultClient - https://10.3.2.2:8443/oapi
[DEBUG] 2016-03-17 15:46:57,960 com.openshift.internal.restclient.DefaultClient - {"kind":"APIVersions","apiVersion":"v1","versions":["v1"]}

[DEBUG] 2016-03-17 15:46:57,969 com.openshift.internal.restclient.DefaultClient - https://10.3.2.2:8443/osapi
[DEBUG] 2016-03-17 15:46:58,007 com.openshift.internal.restclient.DefaultClient - {"kind":"APIVersions","apiVersion":"v1","versions":[]}

[DEBUG] 2016-03-17 15:46:58,010 com.openshift.internal.restclient.DefaultClient - https://10.3.2.2:8443/api
[DEBUG] 2016-03-17 15:46:58,058 com.openshift.internal.restclient.DefaultClient - {"kind":"APIVersions","apiVersion":"v1","versions":["v1","v1beta3"]}

[DEBUG] 2016-03-17 15:46:58,062 com.openshift.internal.restclient.URLBuilder - Built url: https://10.3.2.2:8443/api/v1/namespaces/sauce/services
[DEBUG] 2016-03-17 15:46:58,115 com.openshift.internal.restclient.DefaultClient - Could not list Service resources in namespace sauce: {
  "kind": "Status",
  "apiVersion": "v1",
  "metadata": {},
  "status": "Failure",
  "message": "User \"system:anonymous\" cannot list services in project \"sauce\"",
  "reason": "Forbidden",
  "details": {
    "kind": "services"
  },
  "code": 403
}

com.openshift.internal.restclient.http.HttpClientException: {
  "kind": "Status",
  "apiVersion": "v1",
  "metadata": {},
  "status": "Failure",
  "message": "User \"system:anonymous\" cannot list services in project \"sauce\"",
  "reason": "Forbidden",
  "details": {
    "kind": "services"
  },
  "code": 403
}

	at com.openshift.internal.restclient.http.UrlConnectionHttpClient.createException(UrlConnectionHttpClient.java:278)
	at com.openshift.internal.restclient.http.UrlConnectionHttpClient.request(UrlConnectionHttpClient.java:211)
	at com.openshift.internal.restclient.http.UrlConnectionHttpClient.request(UrlConnectionHttpClient.java:187)
	at com.openshift.internal.restclient.http.UrlConnectionHttpClient.get(UrlConnectionHttpClient.java:149)
	at com.openshift.internal.restclient.DefaultClient.list(DefaultClient.java:153)
	at com.openshift.internal.restclient.DefaultClient.list(DefaultClient.java:139)
	at org.jboss.tools.openshift.core.connection.Connection.getResources(Connection.java:387)
	at org.jboss.tools.openshift.core.server.OpenShiftServerUtils.getService(OpenShiftServerUtils.java:285)
	at org.jboss.tools.openshift.core.server.OpenShiftServerUtils.getService(OpenShiftServerUtils.java:274)
	at org.jboss.tools.openshift.core.server.behavior.OpenShiftPublishController.createRSync(OpenShiftPublishController.java:54)
	at org.jboss.tools.openshift.core.server.behavior.OpenShiftPublishController.publishStart(OpenShiftPublishController.java:80)
	at org.jboss.ide.eclipse.as.wtp.core.server.behavior.CachedPublisherProfileBehavior.publishStart(CachedPublisherProfileBehavior.java:47)
	at org.eclipse.wst.server.core.model.ServerBehaviourDelegate.publish(ServerBehaviourDelegate.java:942)
	at org.eclipse.wst.server.core.model.ServerBehaviourDelegate.publish(ServerBehaviourDelegate.java:774)
	at org.eclipse.wst.server.core.internal.Server.publishImpl(Server.java:3172)
	at org.eclipse.wst.server.core.internal.Server$PublishJob.run(Server.java:345)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
Caused by: java.io.IOException: Server returned HTTP response code: 403 for URL: https://10.3.2.2:8443/api/v1/namespaces/sauce/services
	at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1840)
	at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1441)
	at sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:254)
	at com.openshift.internal.restclient.http.UrlConnectionHttpClient.request(UrlConnectionHttpClient.java:207)
	... 15 more
{noformat}

> Error when starting an OpenShift Server immediately after workspace startup
> ---------------------------------------------------------------------------
>
>                 Key: JBIDE-21829
>                 URL: https://issues.jboss.org/browse/JBIDE-21829
>             Project: Tools (JBoss Tools)
>          Issue Type: Bug
>          Components: openshift
>    Affects Versions: 4.3.1.Beta2
>            Reporter: Xavier Coulon
>            Assignee: Jeff Cantrill
>             Fix For: 4.3.1.CR1
>
>
> I get the following error when my runtime Eclipse starts with the Server Editor opened on an OpenShift Server Adapter:
> {code}
> !ENTRY org.eclipse.core.jobs 4 2 2016-03-08 15:54:58.597
> !MESSAGE An internal error occurred during: "Setting connection, deploy project...".
> !STACK 0
> com.openshift.restclient.authorization.ResourceForbiddenException: User "test-admin" cannot list all services in the cluster
> 	at com.openshift.internal.restclient.DefaultClient.createOpenShiftException(DefaultClient.java:477)
> 	at com.openshift.internal.restclient.DefaultClient.list(DefaultClient.java:152)
> 	at com.openshift.internal.restclient.DefaultClient.list(DefaultClient.java:133)
> 	at com.openshift.internal.restclient.DefaultClient.list(DefaultClient.java:128)
> 	at org.jboss.tools.openshift.core.connection.Connection.retryList(Connection.java:434)
> 	at org.jboss.tools.openshift.core.connection.Connection.getResources(Connection.java:377)
> 	at org.jboss.tools.openshift.core.server.OpenShiftServerUtils.getService(OpenShiftServerUtils.java:267)
> 	at org.jboss.tools.openshift.core.server.OpenShiftServerUtils.getService(OpenShiftServerUtils.java:256)
> 	at org.jboss.tools.openshift.internal.ui.server.OpenShiftServerEditorSection$13.run(OpenShiftServerEditorSection.java:486)
> 	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
> {code}
> This error also happens when the editor is closed at start-up and opened later on.



--
This message was sent by Atlassian JIRA
(v6.4.11#64026)


More information about the jbosstools-issues mailing list