10 Replies Latest reply on Mar 8, 2016 12:10 PM by Bill Robinson

    Failed to save compliance work item results

    Rob Slattery

      After running a compliance job, we receive an error within the job log that says, "Failed to save compliance work item results."

       

      What exactly does that mean?  It seems the compliance job runs through it's entirety, but the error message is confusing.

       

      Where are the compliance work item results written to when the compliance job runs successfully?

        • 1. Re: Failed to save compliance work item results
          Joe Piotrowski

          Is this our OOTB Compliance CTs or a custom one you created? What operating system is this running against? My guess is that the user you're mapping to doesn't have the correct permissions to write data to the server where it wants.

          • 2. Re: Failed to save compliance work item results
            Rob Slattery

            I'm not sure what a custom CT really is.  Someone, a year or so ago, created a component template, added parts, etc., and we now use the same one.  This is for RHEL5.

             

            Would you explain to me how I can check the user mapping and permissions so that I can fix this?

             

            Also where is the data being written to?  Is it the target server or the BLapp server the job is running from?

             

            Lastely, what file should I look for where the data is written to?

            • 3. Re: Failed to save compliance work item results
              Joe Piotrowski

              CT = Component Template. A custom one is just one you make yourself. We have out of the box CTs avaliable for customers.

               

              Start with the appserver and agent logs. If they haven't been renamed you can find them:

              Application Server = .../bmc/bladelogic/NSH/br/appserver.log

              Target Server = .../bmc/bladelogic/RSCD/rscd.log

               

              Tail the logs and rerun your Compliance Job.

               

              As far as permissions, we use security files for that. In /etc/rsc check the following files:

              exports

              users.local

               

              You should see a user= or map= telling you which local user you're using to perform admin tasks.

               

              As for the CT itself, it could contain lots of things. If it's not proprietary you could export it and post it here for someone to review.

              • 4. Re: Failed to save compliance work item results
                Bill Robinson

                The 'failed to save' message means that the work item running the job part against the target is not able to save the results to the database.  this is likely that you have a rule condition or extended object that's returning something that we cannot insert into the database.

                 

                if you run the compliance job in debug mode you should be able to fine the work item thread number that throws the message, and trace bacwards up the log and find the particular rule or EO that's causing the problem. 

                 

                if you have more logs of this happening, you should be updating the support case you have open on this with these logs

                1 of 1 people found this helpful
                • 5. Re: Failed to save compliance work item results
                  Rob Slattery

                  I searched the debug logs with different variations of the error message (failed to save, compliance work, and item results) but cannot find the errors in the debug logs at all.

                   

                  The jobs that were run yesterday, the debug logs have a lot of different error messages and I'm not sure what to focus on.

                   

                  I uploaded logs the day before yesterday and I'm uploading logs today. I just wanted to get some feedback from the rest of the community.

                  • 6. Re: Failed to save compliance work item results

                    We are having this issue on one server. Did you get a solution?

                    • 7. Re: Failed to save compliance work item results
                      Bill Robinson

                      if you run the job w/ the 'DEBUG_MODE_ENABLED' = true property set, then gather the job debug logs (from the appservers that ran the job) you can find that error message and then go up in the log from there and find the rule or EO that is causing the problem.  there is a rule or EO result that is causing the rule to have a null return and that can't be inserted into the database.

                      1 of 1 people found this helpful
                      • 8. Re: Failed to save compliance work item results

                        I am encountering this problem as well.  Debug mode enabled on the job, but I just get nothing to go by in the appserver logs.  New problem after no apparent changes to the EO's or CT's we are using for compliance.

                        It only happens on one large CT.

                        Any further suggestions on what we can look at as part of RCA?

                        • 9. Re: Failed to save compliance work item results
                          Todd Schaal

                          I'm getting a similar error.  Here is the rule I'm using:

                           

                          count "Hardware Information.Physical Storage Device:/Hardware/StorageDevices/PhysicalStorageDevices/*" = 0 where

                             @Model@ = "Hitachi"

                          end  AND

                           

                          And here is what I have for parts:

                           

                          /Hardware/StorageDevices/PhysicalStorageDevices/* Hardware Information.Physical Storage Device false true true true true

                           

                          Seems like it should work?  I'm just trying to identify servers that have hitach storage.

                          • 10. Re: Failed to save compliance work item results
                            Bill Robinson

                            is that the only rule in the template ?

                             

                            on the server you get the failed to same message, how many hitachi storage devices are there ?

                             

                            if you run the job w/ the debug mode property enabled does that show anything useful in the generated debug log ?