7 Replies Latest reply on Apr 22, 2014 4:11 PM by mithomps

    RHQ and Cassandra

    muesli

      Hi everyone,

       

      at the moment I'm trying to install and configure RHQ 4.8.0 the first time.

      I was able to solve some problems already, but when I run

      ./rhq-installer.sh (after I started rhq-server.sh) I get the following error:

       

       

      08:30:19,157 ERROR [org.rhq.enterprise.server.installer.Installer] An error occurred: java.lang.Exception: Could not complete Cassandra schema installation: All host(s) tried for query failed (tried: [/10.10.253.197])
              at org.rhq.enterprise.server.installer.InstallerServiceImpl.prepareDatabase(InstallerServiceImpl.java:497) [rhq-installer-util-4.8.0.jar:4.8.0]
              at org.rhq.enterprise.server.installer.InstallerServiceImpl.install(InstallerServiceImpl.java:258) [rhq-installer-util-4.8.0.jar:4.8.0]
              at org.rhq.enterprise.server.installer.Installer.doInstall(Installer.java:115) [rhq-installer-util-4.8.0.jar:4.8.0]
              at org.rhq.enterprise.server.installer.Installer.main(Installer.java:56) [rhq-installer-util-4.8.0.jar:4.8.0]
              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.7.0_21]
              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) [rt.jar:1.7.0_21]
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.7.0_21]
              at java.lang.reflect.Method.invoke(Method.java:601) [rt.jar:1.7.0_21]
              at org.jboss.modules.Module.run(Module.java:262) [jboss-modules.jar:1.2.0.CR1]
              at org.jboss.modules.Main.main(Main.java:329) [jboss-modules.jar:1.2.0.CR1]
      Caused by: com.datastax.driver.core.exceptions.NoHostAvailableException: All host(s) tried for query failed (tried: [/10.10.253.197])
              at com.datastax.driver.core.ControlConnection.reconnectInternal(ControlConnection.java:188) [cassandra-driver-core-1.0.0-rhq-1.2.4.jar:]
              at com.datastax.driver.core.ControlConnection.connect(ControlConnection.java:87) [cassandra-driver-core-1.0.0-rhq-1.2.4.jar:]
              at com.datastax.driver.core.Cluster$Manager.init(Cluster.java:576) [cassandra-driver-core-1.0.0-rhq-1.2.4.jar:]
              at com.datastax.driver.core.Cluster$Manager.access$100(Cluster.java:520) [cassandra-driver-core-1.0.0-rhq-1.2.4.jar:]
              at com.datastax.driver.core.Cluster.<init>(Cluster.java:67) [cassandra-driver-core-1.0.0-rhq-1.2.4.jar:]
              at com.datastax.driver.core.Cluster.buildFrom(Cluster.java:94) [cassandra-driver-core-1.0.0-rhq-1.2.4.jar:]
              at com.datastax.driver.core.Cluster$Builder.build(Cluster.java:501) [cassandra-driver-core-1.0.0-rhq-1.2.4.jar:]
              at org.rhq.cassandra.util.ClusterBuilder.build(ClusterBuilder.java:100) [rhq-cassandra-util-4.8.0.jar:4.8.0]
              at org.rhq.cassandra.schema.AbstractManager.initCluster(AbstractManager.java:240) [rhq-cassandra-schema-4.8.0.jar:4.8.0]
              at org.rhq.cassandra.schema.AbstractManager.initCluster(AbstractManager.java:229) [rhq-cassandra-schema-4.8.0.jar:4.8.0]
              at org.rhq.cassandra.schema.VersionManager.install(VersionManager.java:75) [rhq-cassandra-schema-4.8.0.jar:4.8.0]
              at org.rhq.cassandra.schema.SchemaManager.install(SchemaManager.java:88) [rhq-cassandra-schema-4.8.0.jar:4.8.0]
              at org.rhq.enterprise.server.installer.InstallerServiceImpl.prepareDatabase(InstallerServiceImpl.java:489) [rhq-installer-util-4.8.0.jar:4.8.0]
              ... 9 more
      
      

       

      Is there anything I failed to consider while configurating my RHQ-Server? I want it to listen to this static IP 10.10.253.197.

      Google won't help me with this one since I can only find a GitHub-Gist with the same error without any helpful information...unfortunately.

       

      Thx for your help in advance!

       

      Greetings,

      muesli

        • 1. Re: RHQ and Cassandra
          pilhuhn

          Hey,

          did you follow the install instructions on the wiki - especially wrt using rhqctl install to initially install the server?

           

          If so, can you check that a cassandra instance is indeed running

           

          $ jps | grep Cass

           

          And if this is running tell us a bit more about your ip addresses?

           

          Is 10.10.253.197 listed in your /etc/hosts?

           

          Hth

            Heiko

          • 2. Re: RHQ and Cassandra
            muesli

            Hi Heiko,

             

            yes I tried to follow the instructions on the wiki and tried to install via ./rhqctl install after editing rhq-server.properties.

             

            When I change the setting cassandra.seeds=10.10.243.197 to cassandra.seeds=127.0.0.1 I get the exact same error just replaced with the localhost-address.

            According to this https://docs.jboss.org/author/display/RHQ/Seeds+List Link I want to install Screnario 1: New RHQ install on single machine.

             

            My configuration in rhq-server.properties for cassandra is the following:

             

            rhq.cassandra.username=rhqadmin

            rhq.cassandra.password=rhqadmin

             

            rhq.cassandra.seeds=127.0.0.1|7299|9142

            #rhq.cassandra.seeds=10.10.253.197|7299|9142

             

            I tried to change the usernamen and pw to cassandra,cassandra or leave both attributes empty but nothing seems to work.

            I guess I'm missing a configuration step here...

             

            Thx again for your help.

             

            muesli

            • 3. Re: RHQ and Cassandra
              pathduck

              Hi,

              I ran into the same problem installing 4.8 - apparently there's a bug that will be fixed in 4.9.

               

              https://community.jboss.org/thread/230021?tstart=0

               

              You will probably need to run the rhq-data-migration script manually. Run it with --help to see a list of options. The easiest is to create a properties file with the relevant values to connect to your DB.

               

              You can leave the cassandra.seeds value as it were.

              • 4. Re: RHQ and Cassandra
                john.sanda

                I think the issue here is different. Stian ran into problems with the data migration. From the stack trace, I can see that the error occurs in the server installer when try to connect to Cassandra to apply schema changes.

                 

                muesli, I am not 100% as to whether or not Cassandra is running. It needs to be running when the server installer runs. Can you run rhqctl status and share the output?

                • 5. Re: RHQ and Cassandra
                  muesli

                  Hey John,

                   

                  You're right, I don't want to migrate any data, I just want a fresh and new installation of RHQ (I've never done that before).

                   

                  When I check via ./rhqctl status I get the following output:

                   

                  $ ./bin/rhqctl status

                  13:43:15,291 INFO  [org.jboss.modules] JBoss Modules version 1.2.0.CR1

                  RHQ Storage Node               (pid 15001  ) IS running

                   

                  After this I start ./rhqctl install and run into this stack trace (see previous posts).

                  Do I need to start Cassandra separately? I thought this would be included when I run ./rhqctl start

                   

                  Thx again,

                  muesli

                  • 6. Re: RHQ and Cassandra
                    john.sanda

                    muesli,

                     

                    Can you open <rhq-server-dir>/logs/rhq-storage.log and search for the string, Starting listening for CQL clients on. What IP address does it report? On my local test instance, the log output looks like,

                     

                     

                         INFO [main] 2013-07-08 07:57:15,053 Server.java (line 135) Starting listening for CQL clients on /127.0.0.1:9142...

                     

                     

                    I want to verify that Cassandra is in fact listening on 10.10.243.197 for client requests.

                     

                    Thanks

                    • 7. Re: RHQ and Cassandra
                      mithomps

                      muesli,

                       

                      I'm on OS/X and ran into exactly the same issue. I editted my /etc/hosts file and added my machine name mapped to 127.0.0.1

                       

                      So the /etc/hosts entry looks something like this:

                      127.0.0.1     localhost myHostName.local

                       

                      OS/X likes to take the host name and add .local for the interface.

                       

                      -- Mike