4 Replies Latest reply on Jul 19, 2012 1:53 AM by setianusa

    Bundle Deployment Issues

    setianusa

      Hi,

       

      I have a couple of questions releated to bundle deployment :

       

      1. you can add customs messages within the deploy.xml via <echo> and <rhq:audit>, but I could not see
      any of my customs messages in the GUI, nor the rhq-server-log4j.log despite I set the level to TRACE on org.rhq

       

      2. typical scenario during the preinstall stage are stop the appserver (JBoss7), ssh the SQL scripts to a database server,
      execute them with the option to log the output generated, and bring back appserver. How can we display that SQL log generated into
      the GUI ?

       

      3. attached is a screen shot of Deployment Details. Funny thing is that I can only look as the details up to
      'Build Event' row. After that row, I can not see details, the row is not even highlighted. Any idea on this ?

       

      4. on the Resource:Measurements portlet, some says 'This resource has no recent metrics', and others aren't.
      Why has no recent metrics even the server was up for more than three days ?

       

      5. on my RHQ agent, I got the following exceptions :


      a). 2012-07-17 01:11:41,640 ERROR (LogFileEventPoller)- Failed to read log file being tailed: /var/log/messages
      java.io.FileNotFoundException: /var/log/messages (Permission denied)
      at java.io.FileInputStream.open(Native Method)
      at java.io.FileInputStream.<init>(FileInputStream.java:138)
      at java.io.FileReader.<init>(FileReader.java:72)
      at org.rhq.core.pluginapi.event.log.LogFileEventPoller.processNewLines(LogFileEventPoller.java:131)
      at org.rhq.core.pluginapi.event.log.LogFileEventPoller.poll(LogFileEventPoller.java:103)
      at org.rhq.core.pc.event.EventPollerRunner.run(EventPollerRunner.java:49)
      at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
      at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:351)
      at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:178)
      at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:178)
      at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)

       

      b). 2012-07-17 01:45:55,604 WARN (ConfigurationCheckExecutor)- An error occurred while checking for an updated Resource configuration for Resource[id=10178, uuid=13d114e5-16f6-4aaa-8295-389104c05648, type={Sudoers}Sudoers, key=/etc/sudoers, name=Sudoers, parent=rhq.agent.ppl].
      java.lang.Exception: java.lang.NoClassDefFoundError: Could not initialize class net.augeas.jna.Aug
      at org.rhq.core.pc.inventory.ResourceContainer$ComponentInvocationThread.call(ResourceContainer.java:639)
      at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
      at java.util.concurrent.FutureTask.run(FutureTask.java:166)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
      at java.lang.Thread.run(Thread.java:722)
      Caused by: java.lang.NoClassDefFoundError: Could not initialize class net.augeas.jna.Aug
      at net.augeas.Augeas.<init>(Unknown Source)
      at org.rhq.plugins.augeas.AugeasConfigurationComponent.createAugeas(AugeasConfigurationComponent.java:378)
      at org.rhq.plugins.augeas.AugeasConfigurationComponent.initAugeas(AugeasConfigurationComponent.java:721)
      at org.rhq.plugins.augeas.AugeasConfigurationComponent.getAugeas(AugeasConfigurationComponent.java:354)
      at org.rhq.plugins.augeas.AugeasConfigurationComponent.abortIfAugeasNotAvailable(AugeasConfigurationComponent.java:737)
      at org.rhq.plugins.augeas.AugeasConfigurationComponent.loadResourceConfiguration(AugeasConfigurationComponent.java:141)
      at sun.reflect.GeneratedMethodAccessor73.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:601)


      Thanks for the help.

        • 1. Re: Bundle Deployment Issues
          mazz

          > 1. you can add customs messages within the deploy.xml via <echo> and <rhq:audit>, but I could not see

          > any of my customs messages in the GUI, nor the rhq-server-log4j.log despite I set the level to TRACE on org.rhq

           

          It looks like we don't log it anywhere in BundleManagerBean.addBundleResourceDeploymentHistory() but the purpose of that isn't to find it in the logs, but in the audit history in the GUI. In the screen snapshot you posted, just use the scrollbar to scroll down. And if your <rhq:audit> was invoked successfully, you should see an audit row in there with your audit message (this is only true for <rhq:audit> not for <echo>).

           

          > 2. How can we display that SQL log generated into the GUI ?

           

          Using <rhq:audit> so you can see it in the audit trail as explained above.

           

          > 3. attached is a screen shot of Deployment Details. Funny thing is that I can only look as the details up to

          > 'Build Event' row. After that row, I can not see details, the row is not even highlighted. Any idea on this ?

           

          Some of these audit trail rows (like some of these "Build Events" will look empty - this is because ANT isn't giving us much information about what the build event was (these are coming from ANT build listeners). However, to see if there are any details, just click the triangular arrow on the left of each row - this will uncollapse the row to show some details. Alternatively, to see the full details, click the little paper icon in the right-most Details column (I think double-clicking the row will do the same).

           

          > 4. on the Resource:Measurements portlet, some says 'This resource has no recent metrics', and others aren't.

          > Why has no recent metrics even the server was up for more than three days ?

           

          We would need more details. What is the resource? Does it have any metrics defined? Is at least one metric enabled? Was is the Date Range that is configured (if you are viewing with a Date Range configured for, say, the "last 4 minutes", you might see that alot since many metrics aren't collected but every 10 minutes or more).

           

          > 5. on my RHQ agent, I got the following exceptions :

          > a). 2012-07-17 01:11:41,640 ERROR (LogFileEventPoller)- Failed to read log file being tailed: /var/log/messages
          > java.io.FileNotFoundException: /var/log/messages (Permission denied)

           

          Whatever resource is trying to monitor the /var/log/messages doesn't have permissions. Which makes sense if the agent isn't running as root (because /var/log/messages is probably only readable by root).

           

          > b). 2012-07-17 01:45:55,604 WARN (ConfigurationCheckExecutor)- An error occurred while checking for an updated Resource configuration for

          > Resource[id=10178, uuid=13d114e5-16f6-4aaa-8295-389104c05648, type={Sudoers}Sudoers, key=/etc/sudoers, name=Sudoers, parent=rhq.agent.ppl].

          > java.lang.Exception: java.lang.NoClassDefFoundError: Could not initialize class net.augeas.jna.Aug

           

          IIRC, the Sudoer plugin needs Augeas to manage the sudoers file. For some reason, Augeas could not initialize itself to read that file. I suspect again its because the agent isn't running as root which reading the sudoers file requires. These last two exceptions can be ignored if you don't want to run the agent as root and/or don't want to manage the sudoers and messages log file with RHQ. You could even opt to delete those plugins (like the sudoers plugin) to not even have the agent deploy and run them if you don't plan on using them.

          • 2. Re: Bundle Deployment Issues
            setianusa

            Hi John,

             

            Thanks for your reply, but I am still facing with some questions :

             

            1. > And if your <rhq:audit> was invoked successfully, you should see an audit row in there with your audit message (this is only true for <rhq:audit> not for <echo>).

            That's true, but only some of info / messages are displayed on the GUI. Here is a snapshot of the recipe :

             

                    <rhq:audit status="SUCCESS" action="Preinstall Notice" info="Preinstalling to ${rhq.deploy.dir}" message="Another optional message">
                        Some additional, optional details regarding
                        the deployment of ${rhq.deploy.dir}
                    </rhq:audit>

            Only action and info attributes are displayed on the GUI, but not the message attribute, nor the content.

             

            2. maybe I missed few explainations in here. The SQL generated output log is on another physical server. Question is how rhq-audit can read that log ? Maybe do a scp first from that

            database server to RHQ server, then rhq-audit 'read' the log file ?

             

            3. the issue here is that, as per the screenshot, the last row that I can highlight or click, click the small triangle, click the little paper icon, is the one that is hightlighed ( 'Build Event' with that double square bracket [] ) as shown in the screenshot. After that row, nothing get highlighted. Hence I can not double-click that 'Pre-Install Started' row. That's the issue.

             

            4. am I correct by saying that by default no metrics will be displayed until you specify the criteria (date range, interval, etc ) ?

             

            5. running agent as root make sense for both scenario.

             

            • 3. Re: Bundle Deployment Issues
              mazz

              > That's true, but only some of info / messages are displayed on the

              > GUI. Here is a snapshot of the recipe :

              ...

              > Only action and info attributes are displayed on the GUI, but not the

              > message attribute, nor the content.

              ...

              > 3. the issue here is that, as per the screenshot, the last row that I

              > can highlight or click, click the small triangle, click the little

              > paper icon, is the one that is hightlighed ( 'Build Event' with that

              > double square bracket [] ) as shown in the screenshot. After that

              > row, nothing get highlighted. Hence I can not double-click that

              > 'Pre-Install Started' row. That's the issue.

               

               

              All of this sounds like a browser issue - what browser version are you using? Have you tried another browser to see if the same issue occurs? Perhaps the GWT/smartGWT build that you are using doesn't support your browser?

               

              > 2. maybe I missed few explainations in here. The SQL generated output log is on another physical server.

              > Question is how rhq-audit can read that log ? Maybe do a scp first from that

              > database server to RHQ server, then rhq-audit 'read' the log file ?

               

              Oh, yeah, that's a little different. Yes, obviously, your ANT receipe will have to obtain the SQL string in some way in order to send it up via rhq:audit.

               

              > 4. am I correct by saying that by default no metrics will be

              > displayed until you specify the criteria (date range, interval, etc

               

               

              No. The date range, by default, is 8 hours. I  just mentioned that in case you changed it.

              • 4. Re: Bundle Deployment Issues
                setianusa

                Hi John,

                 

                > All of this sounds like a browser issue

                That's correct. IE 9.0.x sucks, FF 14.x and Chrome 20.x work perfectly

                 

                > your ANT receipe will have to obtain the SQL string in some way in order to send it up via rhq:audit.

                I'll start a new thread related to rhq:audit

                 

                > The date range, by default, is 8 hours

                I'll start a new thread as well.

                 

                Thanks again.

                 

                1 of 1 people found this helpful