12 Replies Latest reply on Mar 16, 2018 1:10 PM by LJ LongWing

    Not able to start custom plugin using armonitor in BMC Remedy 9.1

    KiranKumar Gunjalli
      Share This:

      Hi Team,

       

      We were able to configure and start custom plugin using armonitor in 8.1. But the same is not working on 9.1

       

      Thanks,

      Kiran Kumar G

        • 1. Re: Not able to start custom plugin using armonitor in BMC Remedy 9.1
          Mark Walters

          If you're expecting someone to try and help you're going to have to provide some clues...

           

          C or Java plugin?

          Does it work if you run the the plugin server from the command line?

          What errors, if any, are you seeing?

          What steps have you taken to try and resolve the problem and what were the results?

          1 of 1 people found this helpful
          • 2. Re: Not able to start custom plugin using armonitor in BMC Remedy 9.1
            KiranKumar Gunjalli

            Hi Mark,

             

            Thanks for your reply.

            It's a Java Plugin.

            Yes, it is working if I run from command line.

            Through ARMonitor, it will start but it is getting stuck @ 45 MB in Task Manager.

            As a work around, we have created a batch file and scheduled that from Task Scheduler.

            • 3. Re: Not able to start custom plugin using armonitor in BMC Remedy 9.1
              Mark Walters

              If you have the Java JDK installed then you could use the jstack command to get a thread dump of the plugin Java process when it's stuck after starting under armonitor.  That may help pinpoint the source but it's a bit odd that it runs OK from the command line.  That suggests a permissions/access issue when being run by the account that starts the armonitor process.  Other than that, try enabling debug logging for the plugin server and see where it gets to - that depends on what your plugin has been coded to log of course.

               

              Remedy - Server - v.9.x How to enable DEBUG Java Plugin Server Logging in AR System in the arjavaplugin.log file

              • 4. Re: Not able to start custom plugin using armonitor in BMC Remedy 9.1
                LJ LongWing

                Kiran,

                When you say 'plugin' I assume you actually mean a Java process, not actually a plugin....so, with some recent experience with Java programs running other programs, let me ask you this question.

                 

                Does your Java program do any stdout or stderr output?  If so, that's likely your issue.  If it does, I can explain in a bit more detail why you are having issues.

                1 of 1 people found this helpful
                • 5. Re: Not able to start custom plugin using armonitor in BMC Remedy 9.1
                  KiranKumar Gunjalli

                  Hi,

                   

                  Yes its a Java Program. I am using Log4j I.e. logger.info() & logger.error() methods to print.

                   

                  Thanks,

                  Kiran Kumar G

                  • 6. Re: Not able to start custom plugin using armonitor in BMC Remedy 9.1
                    LJ LongWing

                    So when you start it manually you don't have any sort of output that could possibly be going to out or err?

                     

                    I ask because I recently was writing a Java app that was starting an external process and I found that the external process stopped running after a few seconds, getting to a certain size and then just sitting there and never moving on....then I discovered that if I killed my java program, the external process continued running, but actually finished the work that it was supposed to be doing....what I discovered is that when a Java program (armonitor) starts an process, if the process generates out or err output, and the java program isn't 'processing' those outputs, then the buffer fills up and the process halts till the buffers are cleared, or in my case of termination, till the surrounding code is no longer preventing the buffers from being flushed....

                     

                    So, if it's in ANY way possible for your program to be publishing anything to either stdout or stderr, that could be the reason for monitor not allowing it to open/run as expected.

                    • 7. Re: Not able to start custom plugin using armonitor in BMC Remedy 9.1
                      KiranKumar Gunjalli

                      Hi,

                       

                      Have commented out all Stdout and logger methods. But still the plugin is not getting started properly.

                      • 9. Re: Not able to start custom plugin using armonitor in BMC Remedy 9.1
                        KiranKumar Gunjalli

                        LJ LongWing, have run the JStack and I see that the plugin is getting locked at several places which is as shown below. Is this due to some buffer issue which you mentioned earlier? If so, how to overcome this?

                         

                        "main" #1 prio=5 os_prio=0 tid=0x0000000000c8e000 nid=0x17bc runnable [0x0000000000bdc000]

                           java.lang.Thread.State: RUNNABLE

                            at java.io.FileOutputStream.writeBytes(Native Method)

                            at java.io.FileOutputStream.write(Unknown Source)

                            at java.io.BufferedOutputStream.write(Unknown Source)

                            - locked <0x00000000eab13048> (a java.io.BufferedOutputStream)

                            at java.io.PrintStream.write(Unknown Source)

                            - locked <0x00000000eab12f98> (a java.io.PrintStream)

                            at sun.nio.cs.StreamEncoder.writeBytes(Unknown Source)

                            at sun.nio.cs.StreamEncoder.implFlushBuffer(Unknown Source)

                            at sun.nio.cs.StreamEncoder.implFlush(Unknown Source)

                            at sun.nio.cs.StreamEncoder.flush(Unknown Source)

                            - locked <0x00000000eb0dcf20> (a java.io.OutputStreamWriter)

                            at java.io.OutputStreamWriter.flush(Unknown Source)

                            at org.apache.log4j.helpers.QuietWriter.flush(QuietWriter.java:59)

                            at org.apache.log4j.WriterAppender.subAppend(WriterAppender.java:324)

                            at org.apache.log4j.WriterAppender.append(WriterAppender.java:162)

                            at org.apache.log4j.AppenderSkeleton.doAppend(AppenderSkeleton.java:251)

                            - locked <0x00000000ead8fa70> (a org.apache.log4j.ConsoleAppender)

                            at org.apache.log4j.helpers.AppenderAttachableImpl.appendLoopOnAppenders(AppenderAttachableImpl.java:66)

                            at org.apache.log4j.Category.callAppenders(Category.java:206)

                            - locked <0x00000000eacf2d58> (a org.apache.log4j.spi.RootLogger)

                            at org.apache.log4j.Category.forcedLog(Category.java:391)

                            at org.apache.log4j.Category.log(Category.java:856)

                            at com.bmc.thirdparty.org.apache.commons.logging.impl.Log4JLogger.debug(Log4JLogger.java:155)

                            at com.bmc.thirdparty.org.apache.commons.beanutils.converters.AbstractConverter.setDefaultValue(AbstractConverter.java:353)

                            at com.bmc.thirdparty.org.apache.commons.beanutils.converters.NumberConverter.<init>(NumberConverter.java:118)

                            at com.bmc.thirdparty.org.apache.commons.beanutils.converters.ShortConverter.<init>(ShortConverter.java:53)

                            at com.bmc.thirdparty.org.apache.commons.beanutils.ConvertUtilsBean.registerPrimitives(ConvertUtilsBean.java:656)

                            at com.bmc.thirdparty.org.apache.commons.beanutils.ConvertUtilsBean.deregister(ConvertUtilsBean.java:600)

                            at com.bmc.thirdparty.org.apache.commons.beanutils.ConvertUtilsBean.<init>(ConvertUtilsBean.java:161)

                            at com.bmc.thirdparty.org.apache.commons.beanutils.BeanUtilsBean.<init>(BeanUtilsBean.java:112)

                            at com.bmc.thirdparty.org.apache.commons.beanutils.BeanUtilsBean$1.initialValue(BeanUtilsBean.java:63)

                            at com.bmc.thirdparty.org.apache.commons.beanutils.BeanUtilsBean$1.initialValue(BeanUtilsBean.java:59)

                            at com.bmc.thirdparty.org.apache.commons.beanutils.ContextClassLoaderLocal.get(ContextClassLoaderLocal.java:154)

                            - locked <0x00000000ec386270> (a com.bmc.thirdparty.org.apache.commons.beanutils.BeanUtilsBean$1)

                            at com.bmc.thirdparty.org.apache.commons.beanutils.BeanUtilsBean.getInstance(BeanUtilsBean.java:75)

                            at com.bmc.thirdparty.org.apache.commons.beanutils.PropertyUtilsBean.getInstance(PropertyUtilsBean.java:107)

                            at com.bmc.thirdparty.org.apache.commons.beanutils.PropertyUtils.isWriteable(PropertyUtils.java:713)

                            at com.bmc.thirdparty.org.apache.commons.configuration.beanutils.BeanHelper.initProperty(BeanHelper.java:290)

                            at com.bmc.thirdparty.org.apache.commons.configuration.beanutils.BeanHelper.initBeanProperties(BeanHelper.java:250)

                            at com.bmc.thirdparty.org.apache.commons.configuration.beanutils.BeanHelper.initBean(BeanHelper.java:168)

                            at com.bmc.thirdparty.org.apache.commons.configuration.beanutils.DefaultBeanFactory.initBeanInstance(DefaultBeanFactory.java:108)

                            at com.bmc.thirdparty.org.apache.commons.configuration.DefaultConfigurationBuilder$FileConfigurationProvider.initBeanInstance(DefaultConfigurationBuilder.java:1512)

                            at com.bmc.thirdparty.org.apache.commons.configuration.beanutils.DefaultBeanFactory.createBean(DefaultBeanFactory.java:64)

                            at com.bmc.thirdparty.org.apache.commons.configuration.DefaultConfigurationBuilder$ConfigurationProvider.getConfiguration(DefaultConfigurationBuilder.java:1066)

                            at com.bmc.thirdparty.org.apache.commons.configuration.DefaultConfigurationBuilder$FileConfigurationProvider.getEmptyConfiguration(DefaultConfigurationBuilder.java:1480)

                            at com.bmc.thirdparty.org.apache.commons.configuration.DefaultConfigurationBuilder$XMLConfigurationProvider.getEmptyConfiguration(DefaultConfigurationBuilder.java:1547)

                            at com.bmc.thirdparty.org.apache.commons.configuration.DefaultConfigurationBuilder$FileConfigurationProvider.getConfiguration(DefaultConfigurationBuilder.java:1446)

                            at com.bmc.thirdparty.org.apache.commons.configuration.DefaultConfigurationBuilder$ConfigurationBeanFactory.createBean(DefaultConfigurationBuilder.java:1321)

                            at com.bmc.thirdparty.org.apache.commons.configuration.beanutils.BeanHelper.createBean(BeanHelper.java:390)

                            at com.bmc.thirdparty.org.apache.commons.configuration.beanutils.BeanHelper.createBean(BeanHelper.java:412)

                            at com.bmc.thirdparty.org.apache.commons.configuration.beanutils.BeanHelper.createBean(BeanHelper.java:426)

                            at com.bmc.thirdparty.org.apache.commons.configuration.DefaultConfigurationBuilder.createConfigurationAt(DefaultConfigurationBuilder.java:855)

                            at com.bmc.thirdparty.org.apache.commons.configuration.DefaultConfigurationBuilder.initCombinedConfiguration(DefaultConfigurationBuilder.java:719)

                            at com.bmc.thirdparty.org.apache.commons.configuration.DefaultConfigurationBuilder.getConfiguration(DefaultConfigurationBuilder.java:622)

                            at com.bmc.thirdparty.org.apache.commons.configuration.DefaultConfigurationBuilder.getConfiguration(DefaultConfigurationBuilder.java:587)

                            at com.bmc.arsys.apitransport.ApiConfig.setConfiguration(ApiConfig.java:122)

                            at com.bmc.arsys.apitransport.ApiConfig.<init>(ApiConfig.java:87)

                            at com.bmc.arsys.api.Config.<init>(Config.java:51)

                            at com.bmc.arsys.api.Config.<clinit>(Config.java:24)

                            at com.bmc.arsys.api.session.ARPropertyManager.initialize(ARPropertyManager.java:24)

                            at com.bmc.arsys.api.session.ARPropertyManager.<init>(ARPropertyManager.java:17)

                            at com.bmc.arsys.api.ARServerUser.<clinit>(ARServerUser.java:233)

                            at inboundpush.InboundPush.openConnections1(InboundPush.java:82)

                            at inboundpush.InboundPush.main(InboundPush.java:259)

                        • 10. Re: Not able to start custom plugin using armonitor in BMC Remedy 9.1
                          LJ LongWing

                          Yea, specifically the 'a java.io.BufferedOutputStream', that's exactly how I experienced issues in my own personal program...the way I overcame it personally, I didn't have control over the external program I was calling, but I had control over the Java program that was calling it (the opposite of what you have) and I simply handled the output in a way I deemed appropriate (dumped it...I didn't care about the output)....but I certainly had to be concerned about the output because if I wasn't, the program stopped functioning because the output buffer was full....so, if you haven't already, please open a ticket with your official support stream and discuss with them this bufferedoutputstream issue.

                          1 of 1 people found this helpful
                          • 11. Re: Not able to start custom plugin using armonitor in BMC Remedy 9.1
                            Chad Jensen

                            I'm having a similar issue as . I wrote a custom java application that needs to get started on ARMonitor initialization (but it won't start on armonitor, but will start when starting by itself). LJ LongWing , How do i get a jstack heap dump of a process that is being started on armonitor? Do I just need to do a jstack heap dump of when the process is running normally when not on ARMontior?

                            • 12. Re: Not able to start custom plugin using armonitor in BMC Remedy 9.1
                              LJ LongWing

                              Chad,

                              When the process is started, you need to find the process that the armonitor started and can get the jstack dump....