[jbosstools-issues] [JBoss JIRA] (JBIDE-13569) Error when waiting for application to become reachable

Andre Dietisheim (JIRA) jira-events at lists.jboss.org
Fri Feb 15 09:58:56 EST 2013


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

Andre Dietisheim commented on JBIDE-13569:
------------------------------------------

I tried rhc cmd-line tooling and I dont see them requesting some health-path any more, they seem to only wait for DNS resolution:

{code}
[adietish at adietish-thinkpad jbosstools-openshift]$ rhc app create --app "freaky" jbossas-7
Invalid gemspec in [/usr/lib/ruby/gems/1.8/specifications/json_pure-1.6.1.gemspec]: invalid date format in specification: "2011-09-18 00:00:00.000000000Z"
Password: *********

Application Options
-------------------
  Namespace:  myops
  Cartridges: jbossas-7
  Gear Size:  default
  Scaling:    no

Creating application 'freaky' ... done

Waiting for your DNS name to be available ... done

Your public SSH key must be uploaded to the OpenShift server to access code.  Upload now? (yes|no) no
{code}

In terms of code, I also only see them waiting for successful DNS resolution - there's apparently no request to a health-url any more:

{code:title=https://github.com/openshift/rhc/blob/master/lib/rhc/commands/app.rb#L120}
        say "Waiting for your DNS name to be available ... "
          if dns_propagated? rest_app.host
            success "done"
          else
            warn "failure"
            add_issue("We were unable to lookup your hostname (#{rest_app.host}) in a reasonable amount of time and can not clone your application.",
                      "Clone your git repo",
                      "rhc git-clone #{rest_app.name}")

            output_issues(rest_app)
            return 0
          end
{code}

{code:title=https://github.com/openshift/rhc/blob/master/lib/rhc/commands/app.rb#L408}
 def dns_propagated?(host, sleep_time=2)
        #
        # Confirm that the host exists in DNS
        #
        debug "Start checking for application dns @ '#{host}'"

        found = false

        # Allow DNS to propagate
        Kernel.sleep 5

        # Now start checking for DNS
        host_found = hosts_file_contains?(host) or
        1.upto(MAX_RETRIES) { |i|
          host_found = host_exists?(host)
          break found if host_found

          say "    retry # #{i} - Waiting for DNS: #{host}"
          Kernel.sleep sleep_time.to_i
          sleep_time *= DEFAULT_DELAY_THROTTLE
        }

        debug "End checking for application dns @ '#{host} - found=#{found}'"

        host_found
      end

{code}
                
> Error when waiting for application to become reachable
> ------------------------------------------------------
>
>                 Key: JBIDE-13569
>                 URL: https://issues.jboss.org/browse/JBIDE-13569
>             Project: Tools (JBoss Tools)
>          Issue Type: Bug
>          Components: openshift
>    Affects Versions: 4.1.0.Alpha1
>            Reporter: Stefan Bunciak
>            Assignee: Stefan Bunciak
>             Fix For: 4.1.0.Alpha2
>
>         Attachments: error-waiting-for-reachable.png
>
>
> {code}
> com.openshift.client.NotFoundOpenShiftException: Could not find any OpenShift resource at "http://testapp-1360837500661.rhcloud.com/health"
> 	at com.openshift.internal.client.RestService.request(RestService.java:101)
> 	at com.openshift.internal.client.ApplicationResource.waitForPositiveHealthResponse(ApplicationResource.java:510)
> 	at com.openshift.internal.client.ApplicationResource.waitForAccessible(ApplicationResource.java:487)
> 	at org.jboss.tools.openshift.express.internal.ui.job.WaitForApplicationJob.doRun(WaitForApplicationJob.java:50)
> 	at org.jboss.tools.openshift.express.internal.ui.job.AbstractDelegatingMonitorJob.run(AbstractDelegatingMonitorJob.java:35)
> 	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:53)
> Caused by: com.openshift.internal.client.httpclient.NotFoundException: Could not find resource "http://testapp-1360837500661.rhcloud.com/health"
> 	at com.openshift.internal.client.httpclient.UrlConnectionHttpClient.get(UrlConnectionHttpClient.java:96)
> 	at com.openshift.internal.client.RestService.request(RestService.java:139)
> 	at com.openshift.internal.client.RestService.request(RestService.java:97)
> 	... 5 more
> Caused by: java.io.FileNotFoundException: http://testapp-1360837500661.rhcloud.com/health
> 	at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1434)
> 	at com.openshift.internal.client.httpclient.UrlConnectionHttpClient.get(UrlConnectionHttpClient.java:94)
> 	... 7 more
> {code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


More information about the jbosstools-issues mailing list