6 Replies Latest reply on Oct 2, 2017 10:29 AM by fairful

    Problem accessing new Metrics installation

    fairful

      Hi all,

       

      Here at Luminis (Luminis - Conversing Worlds ), we are evaluating time series databases with the purpose of selecting one for integration into our Information Grid product.  I am currently evaluating Hawkular Metrics, and I have a problem.  I have done the following so far.

      • Started the latest Cassandra docker image in a container, and linked the relevant ports to my local host. (7000, 7001, 7199, 9042)
      • Cloned the Metrics project on Github, branch release/0.23.0, commit Release 0.23.12.Final, and built it using ./mvnw install -DskipTests.  The build was successful, resulting in the artefact hawkular-metrics-wildfly-standalone-0.23.12.Final.tar.gz.
      • Extracted the files from that archive, then started the server from the bin directory using ./standalone.sh.  This seemed to work correctly, and I was able to put up the Wildfly server home page.  I created an admin user and can browse the Wildfly admin pages, and can see the hawkular-metrics deployment.
      • I tried to contact the metrics application by issuing curl -X POST http://127.0.0.1:8080/hawkular/metrics/tenants.   This didn't work.  I have attached the curl command and the server log copied from the terminal.

      This may be something simple like the wrong path or port - but the exception doesn't seem connected to that.  I'm a bit stuck now, any help would be appreciated.

       

      Regards,     Stuart Fairful

        • 1. Re: Problem accessing new Metrics installation
          fairful

          I can add that I tried again with the commit for release 0.23.9, which is marked as the "latest release".  I had the same problem.  So then I tried again with the 0.27.6 release which is the latest release mentioned in the blog.  This threw an error on startup, and Hawkular was not deployed correctly.  I will upload the log (can't seem to attach it to this reply), but the error was also a java.lang.EnumConstantNotPresentException, so the two are connected somehow.  A config problem?

           

          Stuart

          • 2. Re: Problem accessing new Metrics installation
            burmanm

            Hi,

             

            I'd actually recommend using 0.28.0 (compile from master or from the branch). If you compile it, the easiest way is to use the standalone-Wildfly-dist we create during the mvn clean install. You can easily launch it from the:

             

            hawkular-metrics/dist/standalone/wildfly-standalone/target/wildfly/wildfly-10.0.0.Final/bin/standalone.sh

             

            Without doing any other configuration (other than Cassandra). That should be a quick way to start testing.

            • 3. Re: Problem accessing new Metrics installation
              fairful

              Hi Michael, thanks for your suggestion.  I have tried what you suggest, without success, unfortunately.  I am running Cassandra in a docker container, with ports mapped to my local host.  Originally I tried with the latest docker image - v 3.11, but I saw from a blog post (albeit for 0.26 release) that the supported Cassandra version is 0.3.12, so I tried with that.  I saw from a recent blog post that setting environment variable CASSANDRA_START_RPC=true may be required, so I did that too.  I cloned and built release 0.28.2 (commit 8d5399b) and ran it.  It seems to start ok - some tables are created - but then it fails with a java.lang.EnumConstantNotPresentException.  I have attached the log, which also shows the docker run command used to start Cassandra. 

               

              I'm out of options here - I've tried everything I can think of or find in the doc.  If I can't solve this issue, we will have to use another TSDB, which would be a shame, as I like Hawkular Metrics - it's a real contender for us.  Any help would be very much appreciated.

               

              Regards,   Stuart

               

                    Update:  Just in case, I tried also with release 0.28.0 (commit 29147ecd).  Same result.

              • 4. Re: Problem accessing new Metrics installation
                burmanm

                Feels odd, that error should happen (it's thrown from Java SE standard library) only if you for some reason had old ConfigurationKey.class in your classpath. In which case the reflection would fail. Almost as if your 0.23 branch is somehow ghosting there, as it does not have these settings. The other reason is that the mentioned 0.23.12 you tried throws:

                 

                11:12:58,304 ERROR [org.jboss.resteasy.resteasy_jaxrs.i18n] (default task-11) RESTEASY002025: Unknown exception while executing POST /tenants: java.lang.EnumConstantNotPresentException: org.hawkular.metrics.api.jaxrs.config.ConfigurationKey.CACHE_CONTROL_HEADER

                 

                But then, 0.23.12 does not have such code, there's no word of "CACHE_CONTROL_HEADER" in the 0.23.12 branch (this feature was introduced to 0.27.x). So where is it reading this information? Are you sure you don't have some export environment variables that point to different installation? Such as JBOSS_HOME. Because it appears there's something in the environment that now loads code from few different versions at the same time.

                • 5. Re: Problem accessing new Metrics installation
                  fairful

                  Well something like that did cross my mind, especially since there was an "unknown source" in one of the early stack traces.  Now that you've confirmed this, I know what to be looking for.  I haven't done anything with Hawkular or JBoss before, and I simply cloned the repository and built, so it's difficult to imagine where the rogue code is coming from.  I did change branches and commits several times, but git takes care of that and it's not credible that it's the problem.  I will clean out everything I can find to do with Hawkular and start again.

                  • 6. Re: Problem accessing new Metrics installation
                    fairful

                    Well I started from scratch again.  I removed my local repo, cloned it again (release/0.28.0), built it, started Cassandra and the server, and it worked.  So that's pretty much exactly what I did the first time, except I started with a different branch. I am still mystified as to what could have happened that first time.  Anyway, thanks for your help Michael, it was much appreciated.

                     

                    Best regards,         Stuart