5 Replies Latest reply on Feb 25, 2010 7:52 AM by W. de Heiden

    HTTPService is not working

    Thomas S Newbie

      Hi there,

      in my case the httpservice check is not working.
      The only option i must change is the address. When i use firefox on the agent or server-host, i can easily access the address. But jopr didn't find it at any time.
      So my question:

      How to correctly configure a httpService-check.
      I've tested it with several configurations, but nothing worked.
      Must i configure something more, than the data in the httpservice at the jopr server?

      Server- and Agent-Version: 2.3.1
      Both on Solaris-Zones.
      Don't no what to do now.
      Please help me.
      I've changed only url and 'follow redirects'(Yes) - the rest is default.

      Thanks for your help...

        • 1. Re: HTTPService is not working
          W. de Heiden Newbie

          Looks the same for me running Linux....

          • 2. Re: HTTPService is not working
            Heiko Rupp Master

            Hello,

             

            what options did you set?

            Did you have a look at the agent.log for errors?

             

              Heiko

            • 3. Re: HTTPService is not working
              W. de Heiden Newbie

              The connection properties:

               

              http_service.jpg

              The Agent log nows shows:

               

              2010-02-25 09:46:49,844 DEBUG [InventoryManager.availability-1] (rhq.core.pc.inventory.AvailabilityExecutor)- Failed to collect availability on resource Resource[id=11703, type=HTTPService, key=http://localhost, name=http://localhost, parent=xxxxxx]
              java.lang.reflect.UndeclaredThrowableException
                      at $Proxy49.getAvailability(Unknown Source)
                      at org.rhq.core.pc.inventory.AvailabilityExecutor.checkInventory(AvailabilityExecutor.java:167)
                      at org.rhq.core.pc.inventory.AvailabilityExecutor.checkInventory(AvailabilityExecutor.java:209)
                      at org.rhq.core.pc.inventory.AvailabilityExecutor.call(AvailabilityExecutor.java:106)
                      at org.rhq.core.pc.inventory.AvailabilityExecutor.run(AvailabilityExecutor.java:70)
                      at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:417)
                      at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:280)
                      at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:135)
                      at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:65)
                      at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:146)
                      at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:170)
                      at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:651)
                      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:676)
                      at java.lang.Thread.run(Thread.java:595)
              Caused by: java.lang.Exception: java.lang.NoClassDefFoundError: org/apache/commons/codec/DecoderException
                      at org.rhq.core.pc.inventory.ResourceContainer$ComponentInvocationThread.call(ResourceContainer.java:530)
                      at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:269)
                      at java.util.concurrent.FutureTask.run(FutureTask.java:123)
                      ... 3 more
              Caused by: java.lang.NoClassDefFoundError: org/apache/commons/codec/DecoderException
                      at org.apache.commons.httpclient.HttpMethodBase.<init>(HttpMethodBase.java:217)
                      at org.apache.commons.httpclient.methods.GetMethod.<init>(GetMethod.java:88)
                      at org.rhq.plugins.netservices.HTTPNetServiceComponent.getValuesOrAvailability(HTTPNetServiceComponent.java:99)
                      at org.rhq.plugins.netservices.HTTPNetServiceComponent.getAvailability(HTTPNetServiceComponent.java:80)
                      at sun.reflect.GeneratedMethodAccessor35.invoke(Unknown Source)
                      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                      at java.lang.reflect.Method.invoke(Method.java:592)
                      at org.rhq.core.pc.inventory.ResourceContainer$ComponentInvocationThread.call(ResourceContainer.java:525)
                      ... 5 more

               

              note: I change the parrent= to xxxx in this log for privacy reason.

               

              I'm using Red Hat Linux 4 with Java jdk1.5.0_21 (32 bit)

              • 4. Re: HTTPService is not working
                Heiko Rupp Master

                Thanks for reporting.

                It looks like when upgrading from commons-httpclient 2 to c-h 3, apache split out commons-codec, which was missed in our upgrade.

                See bug 568275

                 

                As a workaround you can unzip netservices-plugin, put

                commons-codec-1.2.jar into its lib directory, zip the plugin up again and
                deploy via RHQ server.
                • 5. Re: HTTPService is not working
                  W. de Heiden Newbie

                  Confirmed! It works as described.

                   

                  Attached the modified plugin. I renamed it to rhq-netservices-plugin-1.3.2.jar