Uploaded image for project: 'A-MQ Broker'
  1. A-MQ Broker
  2. ENTMQBR-754

[AMQ7, hawtio, no internet access] 2 minute delay in hawtio startup on host with no internet access

    Details

    • Type: Bug
    • Status: Done
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: AMQ 7.0.2.GA
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None
    • Environment:
      • tested on amq-broker-7.0.2.CR2
    • Target Release:
    • Steps to Reproduce:
      Hide

      To reproduce startup delay behaviour

      • start AMQ
      • observe delay in startup time stamps
        16:35:31,315 INFO  [org.apache.activemq.artemis.core.server] AMQ221007: Server is now live
        16:35:31,316 INFO  [org.apache.activemq.artemis.core.server] AMQ221001: Apache ActiveMQ Artemis Message Broker version 2.0.0.amq-700011-redhat-1 [0.0.0.0, nodeID=d3f51a52-7c46-11e7-9b32-080027a9c410]
        INFO  | main | Initialized artemis-plugin plugin
        INFO  | main | Initialized dispatch-hawtio-console plugin
        16:37:41,604 INFO  [org.apache.activemq.artemis] AMQ241001: HTTP Server started at http://localhost:8161
        
        
      Show
      To reproduce startup delay behaviour in firewall block all outbound traffic ( on RHEL7 see https://access.redhat.com/solutions/1121463 ) start AMQ observe delay in startup time stamps 16:35:31,315 INFO [org.apache.activemq.artemis.core.server] AMQ221007: Server is now live 16:35:31,316 INFO [org.apache.activemq.artemis.core.server] AMQ221001: Apache ActiveMQ Artemis Message Broker version 2.0.0.amq-700011-redhat-1 [0.0.0.0, nodeID=d3f51a52-7c46-11e7-9b32-080027a9c410] INFO | main | Initialized artemis-plugin plugin INFO | main | Initialized dispatch-hawtio-console plugin 16:37:41,604 INFO [org.apache.activemq.artemis] AMQ241001: HTTP Server started at http: //localhost:8161
    • Workaround Description:
      Hide

      set the following env variables to avoid doing git pull

      export hawtio_config_pullOnStartup=false
      export hawtio_config_cloneOnStartup=false
      
      Show
      set the following env variables to avoid doing git pull export hawtio_config_pullOnStartup= false export hawtio_config_cloneOnStartup= false

      Description

      Hawtio appears to be doing a git pull on startup (see stack trace below). If the broker is running behind a firewall with outbound traffic blocked, this seem to introduce approx 2 minute delay in hawtio startup. I am *guessing* that the git pull is eventually timing out.

      "main" #1 prio=5 os_prio=0 tid=0x00007f26d400a000 nid=0xcc7 runnable [0x00007f26db22b000]
         java.lang.Thread.State: RUNNABLE
              at java.net.PlainSocketImpl.socketConnect(Native Method)
              at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350)
              - locked <0x00000000eacfab80> (a java.net.SocksSocketImpl)
              at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)
              at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)
              at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
              at java.net.Socket.connect(Socket.java:589)
              at sun.security.ssl.SSLSocketImpl.connect(SSLSocketImpl.java:673)
              at sun.net.NetworkClient.doConnect(NetworkClient.java:175)
              at sun.net.www.http.HttpClient.openServer(HttpClient.java:463)
              at sun.net.www.http.HttpClient.openServer(HttpClient.java:558)
              - locked <0x00000000eacfa540> (a sun.net.www.protocol.https.HttpsClient)
              at sun.net.www.protocol.https.HttpsClient.<init>(HttpsClient.java:264)
              at sun.net.www.protocol.https.HttpsClient.New(HttpsClient.java:367)
              at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.getNewHttpClient(AbstractDelegateHttpsURLConnection.java:191)
              at sun.net.www.protocol.http.HttpURLConnection.plainConnect0(HttpURLConnection.java:1181)
              at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:1032)
              at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:177)
              at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1546)
              - locked <0x00000000eace5670> (a sun.net.www.protocol.https.DelegateHttpsURLConnection)
              at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1474)
              - locked <0x00000000eace5670> (a sun.net.www.protocol.https.DelegateHttpsURLConnection)
              at java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:480)
              at sun.net.www.protocol.https.HttpsURLConnectionImpl.getResponseCode(HttpsURLConnectionImpl.java:338)
              at org.eclipse.jgit.transport.http.JDKHttpConnection.getResponseCode(JDKHttpConnection.java:98)
              at org.eclipse.jgit.util.HttpSupport.response(HttpSupport.java:174)
              at org.eclipse.jgit.transport.TransportHttp.connect(TransportHttp.java:469)
              at org.eclipse.jgit.transport.TransportHttp.openFetch(TransportHttp.java:296)
              at org.eclipse.jgit.transport.FetchProcess.executeImp(FetchProcess.java:136)
              at org.eclipse.jgit.transport.FetchProcess.execute(FetchProcess.java:122)
              at org.eclipse.jgit.transport.Transport.fetch(Transport.java:1138)
              at org.eclipse.jgit.api.FetchCommand.call(FetchCommand.java:130)
              at org.eclipse.jgit.api.PullCommand.call(PullCommand.java:266)
              at io.hawt.git.GitFacade.doPull(GitFacade.java:837)
              at io.hawt.git.GitFacade.initialiseGitRepo(GitFacade.java:713)
              at io.hawt.git.GitFacade.init(GitFacade.java:109)
              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
              at java.lang.reflect.Method.invoke(Method.java:498)
              at org.apache.aries.blueprint.utils.ReflectionUtils.invoke(ReflectionUtils.java:238)
              at org.apache.aries.blueprint.container.BeanRecipe.invoke(BeanRecipe.java:966)
              at org.apache.aries.blueprint.container.BeanRecipe.runBeanProcInit(BeanRecipe.java:706)
              at org.apache.aries.blueprint.container.BeanRecipe.internalCreate2(BeanRecipe.java:825)
              at org.apache.aries.blueprint.container.BeanRecipe.internalCreate(BeanRecipe.java:786)
              at org.apache.aries.blueprint.di.AbstractRecipe$1.call(AbstractRecipe.java:79)
              at java.util.concurrent.FutureTask.run(FutureTask.java:266)
              at org.apache.aries.blueprint.di.AbstractRecipe.create(AbstractRecipe.java:88)
              at org.apache.aries.blueprint.container.BlueprintRepository.createInstances(BlueprintRepository.java:245)
              at org.apache.aries.blueprint.container.BlueprintRepository.createAll(BlueprintRepository.java:183)
              at org.apache.aries.blueprint.container.BlueprintContainerImpl.instantiateEagerComponents(BlueprintContainerImpl.java:341)
              at org.apache.aries.blueprint.container.BlueprintContainerImpl.init(BlueprintContainerImpl.java:113)
              at org.apache.aries.blueprint.container.BlueprintContainerImpl.<init>(BlueprintContainerImpl.java:73)
              at io.hawt.blueprint.HawtioBlueprintContextListener.contextInitialized(HawtioBlueprintContextListener.java:95)
              at org.eclipse.jetty.server.handler.ContextHandler.callContextInitialized(ContextHandler.java:876)
              at org.eclipse.jetty.servlet.ServletContextHandler.callContextInitialized(ServletContextHandler.java:532)
              at org.eclipse.jetty.server.handler.ContextHandler.startContext(ContextHandler.java:839)
              at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:344)
              at org.eclipse.jetty.webapp.WebAppContext.startWebapp(WebAppContext.java:1480)
              at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1442)
              at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:799)
              at org.eclipse.jetty.servlet.ServletContextHandler.doStart(ServletContextHandler.java:261)
              at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:540)
              at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
              - locked <0x00000000f2c3dec8> (a java.lang.Object)
              at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:131)
              at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:113)
              at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:113)
              at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
              - locked <0x00000000f2c3ef78> (a java.lang.Object)
              at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:131)
              at org.eclipse.jetty.server.Server.start(Server.java:452)
              at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:105)
              at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:113)
              at org.eclipse.jetty.server.Server.doStart(Server.java:419)
              at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
              - locked <0x00000000f2c3e188> (a java.lang.Object)
              at org.apache.activemq.artemis.component.WebServerComponent.start(WebServerComponent.java:134)
              at org.apache.activemq.artemis.cli.commands.Run.execute(Run.java:88)
              at org.apache.activemq.artemis.cli.Artemis.internalExecute(Artemis.java:148)
              at org.apache.activemq.artemis.cli.Artemis.execute(Artemis.java:95)
              at org.apache.activemq.artemis.cli.Artemis.execute(Artemis.java:122)
              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
              at java.lang.reflect.Method.invoke(Method.java:498)
              at org.apache.activemq.artemis.boot.Artemis.execute(Artemis.java:129)
              at org.apache.activemq.artemis.boot.Artemis.main(Artemis.java:49)
      

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                martyn-taylor Martyn Taylor
                Reporter:
                pfox Patrick Fox
                Tester:
                Roman Vais
              • Votes:
                0 Vote for this issue
                Watchers:
                9 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: