fabric8io / fabric8

fabric8 is an open source microservices platform based on Docker, Kubernetes and Jenkins
http://fabric8.io/
1.76k stars 504 forks source link

Hawtio console fails to display when using Jube #3818

Open nmcl opened 9 years ago

nmcl commented 9 years ago

Mac OS 10.9.5 Java(TM) SE Runtime Environment (build 1.7.0_05-b05) Java HotSpot(TM) 64-Bit Server VM (build 23.1-b03, mixed mode)

Following instructions on http://fabric8.io/guide/getStartedJube.html

Jube appears to start ok:

2015-04-25 18:15:42,438 [main ] INFO ServerConnector - Started ServerConnector@1d06bdee{HTTP/1.1}{0.0.0.0:8585} 2015-04-25 18:15:42,438 [main ] INFO Server - Started @46803ms

________         ______
______(_)____  _____  /_ _____
_____  / _  / / /__  __ \_  _ \
____  /  / /_/ / _  /_/ //  __/
___  /   \__,_/  /_.___/ \___/
/___/

    Version 2.0.44

    Web console:   http://localhost:8585/hawtio/
    REST api:      http://localhost:8585/api/
    Documentation: http://fabric8.io/jube/goals.html

Environment variables check: ok

    KUBERNETES_MASTER=http://localhost:8585/
    FABRIC8_CONSOLE=http://localhost:8585/hawtio/

However, when attempting to view the Web console using Safari, Firefox or Chrome, nothing is displayed and the following console logging is output:

2015-04-25 18:15:45,835 [Timer-2 ] INFO KubernetesService - No GitFacade injected! Defaulting to the singleton 2015-04-25 18:16:00,001 [SessionTracker ] INFO ZooKeeperServer - Expiring session 0x14cf18cf3d80000, timeout of 60000ms exceeded 2015-04-25 18:16:00,001 [id:0 cport:-1):] INFO PrepRequestProcessor - Processed session termination for sessionid: 0x14cf18cf3d80000 2015-04-25 18:16:00,005 [ooKeeperGroup-0] INFO Replicator - Replicator is the master ====== Replicator is the master 2015-04-25 18:18:41,199 [tp1906946195-85] INFO KeycloakServlet - Keycloak integration is disabled 2015-04-25 18:19:02,078 [uler-1543056064] WARN HttpChannel - Commit failed java.util.concurrent.TimeoutException: Idle timeout expired: 30000/30000 ms at org.eclipse.jetty.io.IdleTimeout.checkIdleTimeout(IdleTimeout.java:154)[jetty-io-9.1.5.v20140505.jar:9.1.5.v20140505] at org.eclipse.jetty.io.IdleTimeout$1.run(IdleTimeout.java:50)[jetty-io-9.1.5.v20140505.jar:9.1.5.v20140505] at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)[:1.7.0_05] at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)[:1.7.0_05] at java.util.concurrent.FutureTask.run(FutureTask.java:166)[:1.7.0_05] at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:178)[:1.7.0_05] at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:292)[:1.7.0_05] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)[:1.7.0_05] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)[:1.7.0_05] at java.lang.Thread.run(Thread.java:722)[:1.7.0_05] 2015-04-25 18:19:02,080 [tp1906946195-79] WARN ServletHandler - /hawtio/app/app.js java.io.IOException: java.util.concurrent.TimeoutException: Idle timeout expired: 30000/30000 ms at org.eclipse.jetty.util.SharedBlockingCallback$Blocker.block(SharedBlockingCallback.java:193)[jetty-util-9.1.5.v20140505.jar:9.1.5.v20140505] at org.eclipse.jetty.server.HttpOutput.sendContent(HttpOutput.java:564)[jetty-server-9.1.5.v20140505.jar:9.1.5.v20140505] at org.eclipse.jetty.servlet.DefaultServlet.sendData(DefaultServlet.java:896)[jetty-servlet-9.1.5.v20140505.jar:9.1.5.v20140505] at org.eclipse.jetty.servlet.DefaultServlet.doGet(DefaultServlet.java:499)[jetty-servlet-9.1.5.v20140505.jar:9.1.5.v20140505] at javax.servlet.http.HttpServlet.service(HttpServlet.java:687)[javax.servlet-api-3.1.0.jar:3.1.0] at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)[javax.servlet-api-3.1.0.jar:3.1.0] at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:738)[jetty-servlet-9.1.5.v20140505.jar:9.1.5.v20140505] at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1651)[jetty-servlet-9.1.5.v20140505.jar:9.1.5.v20140505] at io.hawt.web.XFrameOptionsFilter.doFilter(XFrameOptionsFilter.java:28)[hawtio-system-1.4.47.jar:1.4.47] at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1639)[jetty-servlet-9.1.5.v20140505.jar:9.1.5.v20140505] at io.hawt.web.CORSFilter.doFilter(CORSFilter.java:42)[hawtio-system-1.4.47.jar:1.4.47] at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1639)[jetty-servlet-9.1.5.v20140505.jar:9.1.5.v20140505] at io.hawt.web.CacheHeadersFilter.doFilter(CacheHeadersFilter.java:37)[hawtio-system-1.4.47.jar:1.4.47] at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1639)[jetty-servlet-9.1.5.v20140505.jar:9.1.5.v20140505] at io.hawt.web.SessionExpiryFilter.process(SessionExpiryFilter.java:103)[hawtio-system-1.4.47.jar:1.4.47] at io.hawt.web.SessionExpiryFilter.doFilter(SessionExpiryFilter.java:47)[hawtio-system-1.4.47.jar:1.4.47] at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1631)[jetty-servlet-9.1.5.v20140505.jar:9.1.5.v20140505] at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:549)[jetty-servlet-9.1.5.v20140505.jar:9.1.5.v20140505] at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)[jetty-server-9.1.5.v20140505.jar:9.1.5.v20140505] at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:568)[jetty-security-9.1.5.v20140505.jar:9.1.5.v20140505] at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:221)[jetty-server-9.1.5.v20140505.jar:9.1.5.v20140505] at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1111)[jetty-server-9.1.5.v20140505.jar:9.1.5.v20140505] at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:478)[jetty-servlet-9.1.5.v20140505.jar:9.1.5.v20140505] at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:183)[jetty-server-9.1.5.v20140505.jar:9.1.5.v20140505] at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1045)[jetty-server-9.1.5.v20140505.jar:9.1.5.v20140505] at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)[jetty-server-9.1.5.v20140505.jar:9.1.5.v20140505] at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:109)[jetty-server-9.1.5.v20140505.jar:9.1.5.v20140505] at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)[jetty-server-9.1.5.v20140505.jar:9.1.5.v20140505] at org.eclipse.jetty.server.Server.handle(Server.java:462)[jetty-server-9.1.5.v20140505.jar:9.1.5.v20140505] at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:279)[jetty-server-9.1.5.v20140505.jar:9.1.5.v20140505] at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:232)[jetty-server-9.1.5.v20140505.jar:9.1.5.v20140505] at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:534)[jetty-io-9.1.5.v20140505.jar:9.1.5.v20140505] at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:607)[jetty-util-9.1.5.v20140505.jar:9.1.5.v20140505] at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:536)[jetty-util-9.1.5.v20140505.jar:9.1.5.v20140505] at java.lang.Thread.run(Thread.java:722)[:1.7.0_05] 2015-04-25 18:19:02,083 [tp1906946195-79] WARN HttpChannel - /hawtio/app/app.js?f9f85ff34e487c35 java.io.IOException: java.util.concurrent.TimeoutException: Idle timeout expired: 30000/30000 ms at org.eclipse.jetty.util.SharedBlockingCallback$Blocker.block(SharedBlockingCallback.java:193)[jetty-util-9.1.5.v20140505.jar:9.1.5.v20140505] at org.eclipse.jetty.server.HttpOutput.sendContent(HttpOutput.java:564)[jetty-server-9.1.5.v20140505.jar:9.1.5.v20140505] at org.eclipse.jetty.servlet.DefaultServlet.sendData(DefaultServlet.java:896)[jetty-servlet-9.1.5.v20140505.jar:9.1.5.v20140505] at org.eclipse.jetty.servlet.DefaultServlet.doGet(DefaultServlet.java:499)[jetty-servlet-9.1.5.v20140505.jar:9.1.5.v20140505] at javax.servlet.http.HttpServlet.service(HttpServlet.java:687)[javax.servlet-api-3.1.0.jar:3.1.0] at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)[javax.servlet-api-3.1.0.jar:3.1.0] at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:738)[jetty-servlet-9.1.5.v20140505.jar:9.1.5.v20140505] at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1651)[jetty-servlet-9.1.5.v20140505.jar:9.1.5.v20140505] at io.hawt.web.XFrameOptionsFilter.doFilter(XFrameOptionsFilter.java:28)[hawtio-system-1.4.47.jar:1.4.47] at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1639)[jetty-servlet-9.1.5.v20140505.jar:9.1.5.v20140505] at io.hawt.web.CORSFilter.doFilter(CORSFilter.java:42)[hawtio-system-1.4.47.jar:1.4.47] at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1639)[jetty-servlet-9.1.5.v20140505.jar:9.1.5.v20140505] at io.hawt.web.CacheHeadersFilter.doFilter(CacheHeadersFilter.java:37)[hawtio-system-1.4.47.jar:1.4.47] at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1639)[jetty-servlet-9.1.5.v20140505.jar:9.1.5.v20140505] at io.hawt.web.SessionExpiryFilter.process(SessionExpiryFilter.java:103)[hawtio-system-1.4.47.jar:1.4.47] at io.hawt.web.SessionExpiryFilter.doFilter(SessionExpiryFilter.java:47)[hawtio-system-1.4.47.jar:1.4.47] at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1631)[jetty-servlet-9.1.5.v20140505.jar:9.1.5.v20140505] at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:549)[jetty-servlet-9.1.5.v20140505.jar:9.1.5.v20140505] at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)[jetty-server-9.1.5.v20140505.jar:9.1.5.v20140505] at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:568)[jetty-security-9.1.5.v20140505.jar:9.1.5.v20140505] at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:221)[jetty-server-9.1.5.v20140505.jar:9.1.5.v20140505] at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1111)[jetty-server-9.1.5.v20140505.jar:9.1.5.v20140505] at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:478)[jetty-servlet-9.1.5.v20140505.jar:9.1.5.v20140505] at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:183)[jetty-server-9.1.5.v20140505.jar:9.1.5.v20140505] at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1045)[jetty-server-9.1.5.v20140505.jar:9.1.5.v20140505] at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)[jetty-server-9.1.5.v20140505.jar:9.1.5.v20140505] at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:109)[jetty-server-9.1.5.v20140505.jar:9.1.5.v20140505] at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)[jetty-server-9.1.5.v20140505.jar:9.1.5.v20140505] at org.eclipse.jetty.server.Server.handle(Server.java:462)[jetty-server-9.1.5.v20140505.jar:9.1.5.v20140505] at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:279)[jetty-server-9.1.5.v20140505.jar:9.1.5.v20140505] at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:232)[jetty-server-9.1.5.v20140505.jar:9.1.5.v20140505] at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:534)[jetty-io-9.1.5.v20140505.jar:9.1.5.v20140505] at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:607)[jetty-util-9.1.5.v20140505.jar:9.1.5.v20140505] at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:536)[jetty-util-9.1.5.v20140505.jar:9.1.5.v20140505] at java.lang.Thread.run(Thread.java:722)[:1.7.0_05] 2015-04-25 18:19:02,085 [tp1906946195-79] WARN HttpChannel - Could not send response error 500: java.io.IOException: java.util.concurrent.TimeoutException: Idle timeout expired: 30000/30000 ms

nmcl commented 9 years ago

Worth adding that subsequent attempts to view the Web console don't generate any further error messages/stack traces but continue to fail to display anything.

What's interesting is that some data is obviously returned in all attempts to view the console. Looking at the page source in Chrome gives (snippet) ...

<!DOCTYPE html>

``` hawtio ```
davsclaus commented 9 years ago

The console may not work because of https://github.com/hawtio/hawtio/issues/1949

And there is some pom.xml alignment recently to ensure consistent naming. And some kubernetes model changes that seems to break jube for a bit until we get those resolved.

davsclaus commented 9 years ago

@iocanel I noticed that running jube from master code reported a bunch of cdi / kubenetes issues from weld. I think its those recent changes.

Also the quickstarts .48 version has not been released to central so jube cannot find that version during starting either.

davsclaus commented 9 years ago

We need to upgrade to v2 of hawtio https://github.com/fabric8io/jube/issues/275

davsclaus commented 9 years ago

@iocanel just a sample of the failure, you can try from jube with

davsclaus:~/workspace/jube/jube/target/jube (master)/$ ./run.sh
2015-04-27 08:50:50,359 [main           ] WARN  AbstractLifeCycle              - FAILED o.e.j.s.ServletContextHandler@2feda244{/,null,STARTING}: org.jboss.weld.exceptions.DeploymentException: Exception List with 3 exceptions:
Exception 0 :
org.jboss.weld.exceptions.DeploymentException: WELD-001408: Unsatisfied dependencies for type CuratorFramework with qualifiers @Default
  at injection point [BackedAnnotatedParameter] Parameter 1 of [BackedAnnotatedConstructor] @Singleton @Inject public io.fabric8.jube.apimaster.ApiMasterKubernetesModel(CuratorFramework, HostNodeModel)
  at io.fabric8.jube.apimaster.ApiMasterKubernetesModel.<init>(ApiMasterKubernetesModel.java:0)

    at org.jboss.weld.bootstrap.Validator.validateInjectionPointForDeploymentProblems(Validator.java:372)
    at org.jboss.weld.bootstrap.Validator.validateInjectionPoint(Validator.java:293)
    at org.jboss.weld.bootstrap.Validator.validateGeneralBean(Validator.java:134)
    at org.jboss.weld.bootstrap.Validator.validateRIBean(Validator.java:167)
    at org.jboss.weld.bootstrap.Validator.validateBean(Validator.java:531)
    at org.jboss.weld.bootstrap.ConcurrentValidator$1.doWork(ConcurrentValidator.java:68)
    at org.jboss.weld.bootstrap.ConcurrentValidator$1.doWork(ConcurrentValidator.java:66)
    at org.jboss.weld.executor.IterativeWorkerTaskFactory$1.call(IterativeWorkerTaskFactory.java:60)
    at org.jboss.weld.executor.IterativeWorkerTaskFactory$1.call(IterativeWorkerTaskFactory.java:53)
    at java.util.concurrent.FutureTask.run(FutureTask.java:262)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    at java.lang.Thread.run(Thread.java:744)
Exception 0 :
org.jboss.weld.exceptions.DeploymentException: WELD-001408: Unsatisfied dependencies for type CuratorFramework with qualifiers @Default
  at injection point [BackedAnnotatedParameter] Parameter 1 of [BackedAnnotatedConstructor] @Inject public io.fabric8.jube.replicator.Replicator(CuratorFramework, ApiMasterKubernetesModel, ProcessManager, @ConfigProperty long)
  at io.fabric8.jube.replicator.Replicator.<init>(Replicator.java:0)

    at org.jboss.weld.bootstrap.Validator.validateInjectionPointForDeploymentProblems(Validator.java:372)
    at org.jboss.weld.bootstrap.Validator.validateInjectionPoint(Validator.java:293)
    at org.jboss.weld.bootstrap.Validator.validateGeneralBean(Validator.java:134)
    at org.jboss.weld.bootstrap.Validator.validateRIBean(Validator.java:167)
    at org.jboss.weld.bootstrap.Validator.validateBean(Validator.java:531)
    at org.jboss.weld.bootstrap.ConcurrentValidator$1.doWork(ConcurrentValidator.java:68)
    at org.jboss.weld.bootstrap.ConcurrentValidator$1.doWork(ConcurrentValidator.java:66)
    at org.jboss.weld.executor.IterativeWorkerTaskFactory$1.call(IterativeWorkerTaskFactory.java:60)
    at org.jboss.weld.executor.IterativeWorkerTaskFactory$1.call(IterativeWorkerTaskFactory.java:53)
    at java.util.concurrent.FutureTask.run(FutureTask.java:262)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    at java.lang.Thread.run(Thread.java:744)
Exception 0 :
org.jboss.weld.exceptions.DeploymentException: WELD-001408: Unsatisfied dependencies for type CuratorFramework with qualifiers @Default
iocanel commented 9 years ago

Let me have a look

nmcl commented 9 years ago

I don't see the error that Claus does, but I'm not using head only jube-2.0.44-image. As I said, for that version it seems to start ok. No error messages but the following warnings prior to the Jube ASCII art (what's the official name for those sorts of things?):

2015-04-27 11:29:20,883 [main ] WARN Interceptor - WELD-001700: Interceptor annotation class javax.ejb.PostActivate not found, interception based on it is not enabled 2015-04-27 11:29:20,883 [main ] WARN Interceptor - WELD-001700: Interceptor annotation class javax.ejb.PrePassivate not found, interception based on it is not enabled 2015-04-27 11:29:21,109 [main ] WARN Event - WELD-000411: Observer method [BackedAnnotatedMethod] protected org.apache.deltaspike.core.impl.message.MessageBundleExtension.detectInterfaces(@Observes ProcessAnnotatedType) receives events for all annotated types. Consider restricting events using @WithAnnotations or a generic type with bounds. 2015-04-27 11:29:21,125 [main ] WARN Event - WELD-000411: Observer method [BackedAnnotatedMethod] protected org.apache.deltaspike.core.impl.exclude.extension.ExcludeExtension.vetoBeans(@Observes ProcessAnnotatedType, BeanManager) receives events for all annotated types. Consider restricting events using @WithAnnotations or a generic type with bounds. 2015-04-27 11:29:21,588 [main ] INFO servletJetty - WELD-ENV-001201: Jetty 7.2+ detected, CDI injection will be available in Servlets and Filters. Injection into Listeners is not supported. 2015-04-27 11:29:22,103 [weld-worker-2 ] WARN Validator - WELD-001473: javax.enterprise.inject.spi.Bean implementation org.apache.cxf.cdi.CdiBusBean@10bbf022 declared a normal scope but does not implement javax.enterprise.inject.spi.PassivationCapable. It won't be possible to inject this bean into a bean with a passivating scope (@SessionScoped, @ConversationScoped). This can be fixed by assigning the Bean implementation a unique id by implementing the PassivationCapable interface. 20

Then after "the art" we have:

2015-04-27 11:29:22,983 [main ] WARN ResourceUtils - No resource methods have been found for resource class org.apache.cxf.jaxrs.swagger.SwaggerFeature 2015-04-27 11:29:22,989 [main ] WARN AnnotationUtils - Method updateReplicationController in io.fabric8.jube.apimaster.ApiMasterService has no JAX-RS Path or HTTP Method annotations 2015-04-27 11:29:22,990 [main ] WARN AnnotationUtils - Method getEndpoints in io.fabric8.jube.apimaster.ApiMasterService has no JAX-RS Path or HTTP Method annotations 2015-04-27 11:29:23,019 [main ] WARN AnnotationUtils - Method updateReplicationController in io.fabric8.jube.apimaster.ApiMasterService has no JAX-RS Path or HTTP Method annotations 2015-04-27 11:29:23,020 [main ] WARN AnnotationUtils - Method getEndpoints in io.fabric8.jube.apimaster.ApiMasterService has no JAX-RS Path or HTTP Method annotations 2

If you need to see more then let me know.

iocanel commented 9 years ago

The error Claus gets, is only affecting 2.0.48, so it makes sense you are not getting it. I think that currently it masks all other issues so we need to kill this one first.

nmcl commented 9 years ago

OK. Ping me here or email if you want me to try anything out locally for you.

iocanel commented 9 years ago

I've fixed the blocker issue and it seems that hawtio is now up and running.

No sign of the issue @nmcl hit. I'll download 2.0.44 and see how far I can get with the same disto.

davsclaus commented 9 years ago

Thanks @iocanel it works better now - I can start jube with hawtio now. But from latest code on master branches.

And I can install the camel-spring quickstart following: http://fabric8.io/guide/jubeRunQuickstart.html

A process is started but I think jube is using old v1 api. The quickstarts uses v2 and it fails with

2015-04-27 19:28:02,081 [tor-TreeCache-7] WARN  ApiMasterKubernetesModel       - Failed to parse the JSON: {
  "annotations" : { },
  "apiVersion" : "v1beta2",
  "id" : "quickstart-java-camel-spring-service",
  "kind" : "Service",
  "labels" : {
    "container" : "java",
    "group" : "quickstarts"
  },
  "namespace" : "default",
  "portalIP" : "localhost",
  "ports" : [ ],
  "publicIPs" : [ ],
  "selector" : {
    "container" : "java",
    "group" : "quickstarts"
  }
}. Reason: java.lang.IllegalArgumentException: port for service quickstart-java-camel-spring-service must be specified
java.lang.IllegalArgumentException: port for service quickstart-java-camel-spring-service must be specified
    at io.fabric8.utils.Objects.notNull(Objects.java:96)[fabric8-utils-2.0.48.jar:2.0.48]
    at io.fabric8.jube.proxy.ServiceInstance.<init>(ServiceInstance.java:53)[node-2.0-SNAPSHOT.jar:2.0-SNAPSHOT]
    at io.fabric8.jube.proxy.KubeProxy.serviceChanged(KubeProxy.java:93)[node-2.0-SNAPSHOT.jar:2.0-SNAPSHOT]
    at io.fabric8.jube.proxy.KubeProxy$2.entityChanged(KubeProxy.java:75)[node-2.0-SNAPSHOT.jar:2.0-SNAPSHOT]
    at io.fabric8.jube.proxy.KubeProxy$2.entityChanged(KubeProxy.java:72)[node-2.0-SNAPSHOT.jar:2.0-SNAPSHOT]
    at io.fabric8.jube.local.EntityListenerList.entityChanged(EntityListenerList.java:38)[node-2.0-SNAPSHOT.jar:2.0-SNAPSHOT]
    at io.fabric8.jube.apimaster.ApiMasterKubernetesModel.serviceChanged(ApiMasterKubernetesModel.java:488)[node-2.0-SNAPSHOT.jar:2.0-SNAPSHOT]
    at io.fabric8.jube.apimaster.ApiMasterKubernetesModel.updateLocalModel(ApiMasterKubernetesModel.java:438)[node-2.0-SNAPSHOT.jar:2.0-SNAPSHOT]
    at io.fabric8.jube.apimaster.ApiMasterKubernetesModel.treeCacheEvent(ApiMasterKubernetesModel.java:426)[node-2.0-SNAPSHOT.jar:2.0-SNAPSHOT]
    at io.fabric8.jube.apimaster.ApiMasterKubernetesModel$1.childEvent(ApiMasterKubernetesModel.java:67)[node-2.0-SNAPSHOT.jar:2.0-SNAPSHOT]
    at org.apache.curator.framework.recipes.cache.TreeCache$2.apply(TreeCache.java:685)[curator-recipes-2.7.1.jar:]
    at org.apache.curator.framework.recipes.cache.TreeCache$2.apply(TreeCache.java:679)[curator-recipes-2.7.1.jar:]
    at org.apache.curator.framework.listen.ListenerContainer$1.run(ListenerContainer.java:92)[curator-framework-2.7.1.jar:]
    at com.google.common.util.concurrent.MoreExecutors$DirectExecutorService.execute(MoreExecutors.java:299)[guava-18.0.jar:]
    at org.apache.curator.framework.listen.ListenerContainer.forEach(ListenerContainer.java:84)[curator-framework-2.7.1.jar:]
    at org.apache.curator.framework.recipes.cache.TreeCache.callListeners(TreeCache.java:678)[curator-recipes-2.7.1.jar:]
    at org.apache.curator.framework.recipes.cache.TreeCache.access$1400(TreeCache.java:69)[curator-recipes-2.7.1.jar:]
    at org.apache.curator.framework.recipes.cache.TreeCache$4.run(TreeCache.java:790)[curator-recipes-2.7.1.jar:]
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)[:1.7.0_45]
    at java.util.concurrent.FutureTask.run(FutureTask.java:262)[:1.7.0_45]
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)[:1.7.0_45]
    at java.util.concurrent.FutureTask.run(FutureTask.java:262)[:1.7.0_45]
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)[:1.7.0_45]
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)[:1.7.0_45]
    at java.lang.Thread.run(Thread.java:744)[:1.7.0_45]

But the JVM bootup and is shown as controller, pods and services. The app page is still blank.

screen shot 2015-04-27 at 7 31 37 pm

iocanel commented 9 years ago

It seems like a regression in the mvn plugin. The generated json is borked.

jimmidyson commented 9 years ago

OK I know what this is. I was being "clever" & for apps that don't require a service for connection load balancing, I was still creating what is called a headless service in Kubernetes. This is to enable discovery via the service name to find endpoints, even if no network port is open for this service. It also works nicely in DNS in Kubernetes where A records are created for every endpoint mapped to the service name. Easy discovery without having to make requests to the API server.

In this case, the generated JSON includes portalIP: "None". That is how you specify a headless service in Kubernetes: it means don't allocate a service IP & don't open any service ports.

Jube needs to support headless services. At the moment it is replacing portalIP with the actual host IP (or localhost in this case). If portalIP: "None" is encountered Jube shouldn't open any ports for the service, but endpoints should be registered in ZK.

nmcl commented 9 years ago

Anything for me to try out yet ;) ?

iocanel commented 9 years ago

fwiw I tried 2.0.44 with no issues.

nmcl commented 9 years ago

Has someone recreated the zip referred to here then?

http://fabric8.io/guide/getStartedJube.html

I'll delete my current copy and try to download again, but obviously the one I got a couple of days ago continues to fail.

nmcl commented 9 years ago

Slightly different behaviour (did someone recreate the zip and give it the same name?) But it still fails to display on Safari or Chrome. On Firefox I get something (black folder icons), explorer-like, but it comes and goes (literally disappears to a completely white background).

Various error messages:

________         ______
______(_)____  _____  /_ _____
_____  / _  / / /__  __ \_  _ \
____  /  / /_/ / _  /_/ //  __/
___  /   \__,_/  /_.___/ \___/
/___/

    Version 2.0.44

    Web console:   http://localhost:8585/hawtio/
    REST api:      http://localhost:8585/api/
    Documentation: http://fabric8.io/jube/goals.html

Environment variables check: ok

    KUBERNETES_MASTER=http://localhost:8585/
    FABRIC8_CONSOLE=http://localhost:8585/hawtio/

2015-04-28 14:37:07,948 [Timer-10 ] INFO KubernetesService - No GitFacade injected! Defaulting to the singleton 2015-04-28 14:41:14,005 [p1960569037-150] INFO KeycloakServlet - Keycloak integration is disabled 2015-04-28 14:41:42,690 [duler-310350397] WARN HttpChannel - Commit failed java.util.concurrent.TimeoutException: Idle timeout expired: 30000/30000 ms at org.eclipse.jetty.io.IdleTimeout.checkIdleTimeout(IdleTimeout.java:154)[jetty-io-9.1.5.v20140505.jar:9.1.5.v20140505] at org.eclipse.jetty.io.IdleTimeout$1.run(IdleTimeout.java:50)[jetty-io-9.1.5.v20140505.jar:9.1.5.v20140505] at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)[:1.7.0_05] at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)[:1.7.0_05] at java.util.concurrent.FutureTask.run(FutureTask.java:166)[:1.7.0_05] at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:178)[:1.7.0_05] at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:292)[:1.7.0_05] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)[:1.7.0_05] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)[:1.7.0_05] at java.lang.Thread.run(Thread.java:722)[:1.7.0_05] 2015-04-28 14:41:42,693 [p1960569037-147] WARN ServletHandler - /hawtio/app/app.js java.io.IOException: java.util.concurrent.TimeoutException: Idle timeout expired: 30000/30000 ms at org.eclipse.jetty.util.SharedBlockingCallback$Blocker.block(SharedBlockingCallback.java:193)[jetty-util-9.1.5.v20140505.jar:9.1.5.v20140505] at org.eclipse.jetty.server.HttpOutput.sendContent(HttpOutput.java:564)[jetty-server-9.1.5.v20140505.jar:9.1.5.v20140505] at org.eclipse.jetty.servlet.DefaultServlet.sendData(DefaultServlet.java:896)[jetty-servlet-9.1.5.v20140505.jar:9.1.5.v20140505] at org.eclipse.jetty.servlet.DefaultServlet.doGet(DefaultServlet.java:499)[jetty-servlet-9.1.5.v20140505.jar:9.1.5.v20140505] at javax.servlet.http.HttpServlet.service(HttpServlet.java:687)[javax.servlet-api-3.1.0.jar:3.1.0] at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)[javax.servlet-api-3.1.0.jar:3.1.0] at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:738)[jetty-servlet-9.1.5.v20140505.jar:9.1.5.v20140505] at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1651)[jetty-servlet-9.1.5.v20140505.jar:9.1.5.v20140505] at io.hawt.web.XFrameOptionsFilter.doFilter(XFrameOptionsFilter.java:28)[hawtio-system-1.4.47.jar:1.4.47] at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1639)[jetty-servlet-9.1.5.v20140505.jar:9.1.5.v20140505] at io.hawt.web.CORSFilter.doFilter(CORSFilter.java:42)[hawtio-system-1.4.47.jar:1.4.47] at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1639)[jetty-servlet-9.1.5.v20140505.jar:9.1.5.v20140505] at io.hawt.web.CacheHeadersFilter.doFilter(CacheHeadersFilter.java:37)[hawtio-system-1.4.47.jar:1.4.47] at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1639)[jetty-servlet-9.1.5.v20140505.jar:9.1.5.v20140505] at io.hawt.web.SessionExpiryFilter.process(SessionExpiryFilter.java:103)[hawtio-system-1.4.47.jar:1.4.47] at io.hawt.web.SessionExpiryFilter.doFilter(SessionExpiryFilter.java:47)[hawtio-system-1.4.47.jar:1.4.47] at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1631)[jetty-servlet-9.1.5.v20140505.jar:9.1.5.v20140505] at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:549)[jetty-servlet-9.1.5.v20140505.jar:9.1.5.v20140505] at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)[jetty-server-9.1.5.v20140505.jar:9.1.5.v20140505] at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:568)[jetty-security-9.1.5.v20140505.jar:9.1.5.v20140505] at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:221)[jetty-server-9.1.5.v20140505.jar:9.1.5.v20140505] at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1111)[jetty-server-9.1.5.v20140505.jar:9.1.5.v20140505] at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:478)[jetty-servlet-9.1.5.v20140505.jar:9.1.5.v20140505] at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:183)[jetty-server-9.1.5.v20140505.jar:9.1.5.v20140505] at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1045)[jetty-server-9.1.5.v20140505.jar:9.1.5.v20140505] at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)[jetty-server-9.1.5.v20140505.jar:9.1.5.v20140505] at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:109)[jetty-server-9.1.5.v20140505.jar:9.1.5.v20140505] at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)[jetty-server-9.1.5.v20140505.jar:9.1.5.v20140505] at org.eclipse.jetty.server.Server.handle(Server.java:462)[jetty-server-9.1.5.v20140505.jar:9.1.5.v20140505] at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:279)[jetty-server-9.1.5.v20140505.jar:9.1.5.v20140505] at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:232)[jetty-server-9.1.5.v20140505.jar:9.1.5.v20140505] at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:534)[jetty-io-9.1.5.v20140505.jar:9.1.5.v20140505] at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:607)[jetty-util-9.1.5.v20140505.jar:9.1.5.v20140505] at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:536)[jetty-util-9.1.5.v20140505.jar:9.1.5.v20140505] at java.lang.Thread.run(Thread.java:722)[:1.7.0_05] 2015-04-28 14:41:42,696 [p1960569037-147] WARN HttpChannel - /hawtio/app/app.js?f9f85ff34e487c35 java.io.IOException: java.util.concurrent.TimeoutException: Idle timeout expired: 30000/30000 ms at org.eclipse.jetty.util.SharedBlockingCallback$Blocker.block(SharedBlockingCallback.java:193)[jetty-util-9.1.5.v20140505.jar:9.1.5.v20140505] at org.eclipse.jetty.server.HttpOutput.sendContent(HttpOutput.java:564)[jetty-server-9.1.5.v20140505.jar:9.1.5.v20140505] at org.eclipse.jetty.servlet.DefaultServlet.sendData(DefaultServlet.java:896)[jetty-servlet-9.1.5.v20140505.jar:9.1.5.v20140505] at org.eclipse.jetty.servlet.DefaultServlet.doGet(DefaultServlet.java:499)[jetty-servlet-9.1.5.v20140505.jar:9.1.5.v20140505] at javax.servlet.http.HttpServlet.service(HttpServlet.java:687)[javax.servlet-api-3.1.0.jar:3.1.0] at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)[javax.servlet-api-3.1.0.jar:3.1.0] at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:738)[jetty-servlet-9.1.5.v20140505.jar:9.1.5.v20140505] at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1651)[jetty-servlet-9.1.5.v20140505.jar:9.1.5.v20140505] at io.hawt.web.XFrameOptionsFilter.doFilter(XFrameOptionsFilter.java:28)[hawtio-system-1.4.47.jar:1.4.47] at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1639)[jetty-servlet-9.1.5.v20140505.jar:9.1.5.v20140505] at io.hawt.web.CORSFilter.doFilter(CORSFilter.java:42)[hawtio-system-1.4.47.jar:1.4.47] at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1639)[jetty-servlet-9.1.5.v20140505.jar:9.1.5.v20140505] at io.hawt.web.CacheHeadersFilter.doFilter(CacheHeadersFilter.java:37)[hawtio-system-1.4.47.jar:1.4.47] at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1639)[jetty-servlet-9.1.5.v20140505.jar:9.1.5.v20140505] at io.hawt.web.SessionExpiryFilter.process(SessionExpiryFilter.java:103)[hawtio-system-1.4.47.jar:1.4.47] at io.hawt.web.SessionExpiryFilter.doFilter(SessionExpiryFilter.java:47)[hawtio-system-1.4.47.jar:1.4.47] at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1631)[jetty-servlet-9.1.5.v20140505.jar:9.1.5.v20140505] at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:549)[jetty-servlet-9.1.5.v20140505.jar:9.1.5.v20140505] at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)[jetty-server-9.1.5.v20140505.jar:9.1.5.v20140505] at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:568)[jetty-security-9.1.5.v20140505.jar:9.1.5.v20140505] at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:221)[jetty-server-9.1.5.v20140505.jar:9.1.5.v20140505] at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1111)[jetty-server-9.1.5.v20140505.jar:9.1.5.v20140505] at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:478)[jetty-servlet-9.1.5.v20140505.jar:9.1.5.v20140505] at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:183)[jetty-server-9.1.5.v20140505.jar:9.1.5.v20140505] at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1045)[jetty-server-9.1.5.v20140505.jar:9.1.5.v20140505] at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)[jetty-server-9.1.5.v20140505.jar:9.1.5.v20140505] at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:109)[jetty-server-9.1.5.v20140505.jar:9.1.5.v20140505] at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)[jetty-server-9.1.5.v20140505.jar:9.1.5.v20140505] at org.eclipse.jetty.server.Server.handle(Server.java:462)[jetty-server-9.1.5.v20140505.jar:9.1.5.v20140505] at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:279)[jetty-server-9.1.5.v20140505.jar:9.1.5.v20140505] at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:232)[jetty-server-9.1.5.v20140505.jar:9.1.5.v20140505] at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:534)[jetty-io-9.1.5.v20140505.jar:9.1.5.v20140505] at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:607)[jetty-util-9.1.5.v20140505.jar:9.1.5.v20140505] at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:536)[jetty-util-9.1.5.v20140505.jar:9.1.5.v20140505] at java.lang.Thread.run(Thread.java:722)[:1.7.0_05] 2015-04-28 14:41:42,697 [p1960569037-147] WARN HttpChannel - Could not send response error 500: java.io.IOException: java.util.concurrent.TimeoutException: Idle timeout expired: 30000/30000 ms 2015-04-28 14:43:35,295 [p1960569037-149] WARN HttpParser - badMessage: 400 Illegal character for HttpChannelOverHttp@4e44462d{r=0,a=IDLE,uri=-}

davsclaus commented 9 years ago

The next release 2.0.49 should fix this.

Though we work on migrating hawtio v1 to use v2 so we use the same web console for jube and on docker/openshift. But that takes a bit more work to do and is captured by other tickets.

nmcl commented 9 years ago

OK, I'll wait for .49. Can you email me when it's out just in case I miss the update?

davsclaus commented 9 years ago

Okay so the kubernetes v1beta3 api changes was bigger changes and therefore the 2.0.x branch is now dropped in favor of 2.1.x where the v1beta3 migration is complete.

For jube that migration is not fully complete, the web console needs to use the v2 of hawito, as the old v1 does not support v1beta3. That last bit is still ongoing, but we would work on this. Then the fabric8 v2 will onwards use the same hawtio v2 web console for the docker/OS and Jube distributions.

Fabric8 v2.1.1. has been released - but as said the jube migration isn't fully done yet. So hang on until we get a release out with jube fully working again.

nmcl commented 9 years ago

I'll keep on hanging on :)

kragoth commented 9 years ago

Is there an issue I can follow for jube changes? I would really like to try fabric8 out to see if it can be used to improve my development/deployment process but, the examples all fail (I need to use jube as I am on solaris sigh).

davsclaus commented 9 years ago

We are in the process of releasing fabric8 2.2.0 that includes the latest v1 api from kubernetes and os3 upgrade and whatnot.

In that process @iocanel did some upgrades to jube as well.

Jube may run better now but its AFAIK mainly the web console that wont work - the move to v2 hasn't been complete.

Though you may be able to run jube without the web console and use the fabric8 maven plugin to deploy to jube.

You can also try just the quickstarts from the https://github.com/fabric8io/quickstarts as you can build jube images, and as they are a standalone .zip file you can unzip those and use the run scripts to run the JVM with the app.

That is what jube does when it mangages the processes, uses those scripts to run / stop / start / kill etc.

kragoth commented 9 years ago

Thanks for the reply davsclaus.

I did try using the maven plugin to deploy and I kept getting exceptions (ClassNotFound - I can't remember which class it was but, it was one of either java.util.logging or log4j but, it was definitely something to do with logging), so, I need to figure that out first. But, before I spend too much time on getting Fabric8/jube etc all working I need to make sure I'm actually heading in the right direction to solve my problem.

I don't want to hijack this issue with my questions so I have started a discussion at: https://groups.google.com/forum/#!topic/fabric8/NIkZRpn3x38

If you have any advice on that topic or can point me to something that can help I would be most grateful. :)