[jbosstools-issues] [JBoss JIRA] (JBIDE-22201) Error contacting OpenShift after CDK is started

Rob Stryker (JIRA) issues at jboss.org
Tue Apr 19 16:09:00 EDT 2016


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

Rob Stryker commented on JBIDE-22201:
-------------------------------------

As I recall, there was previously an issue that despite starting up the CDK, sometimes openshift wasn't available. I was asked to add a check to /healthz just so users would be alerted to the problem. Obviously checking /healthz doesn't FIX the problem, but rather allows us to display an error when the problem exists. 

You indicate that simply pasting the url into a browser shows the URL is available, so maybe it's the case that it wasn't available when we first try to make the connection? ie, we're trying to check /healthz too quickly?  As I understood it, /healthz should be 100% available once the vagrant up command completes. I was told that absolutely nothing done during vagrant up is asynchronous.  

The code used is here:

{code}
    	Exception e = null;
    	IHttpClient client = builder.client();
    	try {
    		String ret = client.get(new URL(url), timeout);
    		if( "ok".equals(ret))
    			return true;
    	} catch(HttpClientException hce) {
    		e = hce;
    	} catch( SocketTimeoutException ste) {
    		e = ste;
    	} catch(MalformedURLException murle) {
    		e = murle;
    	}
	throw new OpenShiftNotReadyPollingException(CDKCoreActivator.statusFactory().errorStatus(CDKCoreActivator.PLUGIN_ID,
				"The CDK VM is up and running, but OpenShift is unreachable at url " + url, e,
				OpenShiftNotReadyPollingException.OPENSHIFT_UNREACHABLE_CODE));
{code}

So either there should be a nested exception in the log (is there? a caused-by?), or,  /healthz *did* return but did not return "ok".  

> Error contacting OpenShift after CDK is started
> -----------------------------------------------
>
>                 Key: JBIDE-22201
>                 URL: https://issues.jboss.org/browse/JBIDE-22201
>             Project: Tools (JBoss Tools)
>          Issue Type: Bug
>          Components: cdk, openshift
>    Affects Versions: 4.3.1.Final
>            Reporter: Martin Malina
>            Assignee: Rob Stryker
>            Priority: Blocker
>
> Today Marian and I started seeing this issue: When we start CDK, it will start and everything seems to work, but an error pops up:
> {code}
> Error contacting OpenShift
> org.jboss.tools.openshift.cdk.server.core.internal.adapter.VagrantPoller$OpenShiftNotReadyPollingException: The CDK VM is up and running, but OpenShift is unreachable at url https://10.1.2.2:8443/healthz/ready
> 	at org.jboss.tools.openshift.cdk.server.core.internal.adapter.VagrantPoller.checkOpenShiftHealth(VagrantPoller.java:209)
> 	at org.jboss.tools.openshift.cdk.server.core.internal.adapter.VagrantPoller.checkOpenShiftHealth(VagrantPoller.java:186)
> 	at org.jboss.tools.openshift.cdk.server.core.internal.adapter.VagrantPoller.onePing(VagrantPoller.java:170)
> 	at org.jboss.tools.openshift.cdk.server.core.internal.adapter.VagrantPoller.onePingSafe(VagrantPoller.java:150)
> 	at org.jboss.tools.openshift.cdk.server.core.internal.adapter.VagrantPoller.getCurrentStateSynchronous(VagrantPoller.java:129)
> 	at org.jboss.tools.openshift.cdk.server.core.internal.adapter.controllers.CDKLaunchController.handleProcessTerminated(CDKLaunchController.java:248)
> 	at org.jboss.tools.openshift.cdk.server.core.internal.adapter.controllers.CDKLaunchController.access$2(CDKLaunchController.java:240)
> 	at org.jboss.tools.openshift.cdk.server.core.internal.adapter.controllers.CDKLaunchController$2.run(CDKLaunchController.java:233)
> {code}
> When you actually copy&paste that url into a browser, you will get "ok".
> This happens to me on OS X with CDK 2.0 CR3 (the latest build). Marian is on Linux (Fedora 22).



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


More information about the jbosstools-issues mailing list