<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: SPLUNK4JMX Not polling data from specified servers in Splunk Dev</title>
    <link>https://community.splunk.com/t5/Splunk-Dev/SPLUNK4JMX-Not-polling-data-from-specified-servers/m-p/433267#M7781</link>
    <description>&lt;P&gt;Thanks for keep us updated @stcrispan . Hope you get to the bottom of this soon.&lt;/P&gt;</description>
    <pubDate>Wed, 29 Aug 2018 19:38:00 GMT</pubDate>
    <dc:creator>mstjohn_splunk</dc:creator>
    <dc:date>2018-08-29T19:38:00Z</dc:date>
    <item>
      <title>SPLUNK4JMX Not polling data from specified servers</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/SPLUNK4JMX-Not-polling-data-from-specified-servers/m-p/433265#M7779</link>
      <description>&lt;P&gt;I have installed the SPLUNK4JMX app on my Prod box.   I had already gotten this app to work on my Splunk Dev box, and I anticipated simply copying the configs, changing the Index names, and off I would go.  It did not happen this way. &lt;/P&gt;

&lt;P&gt;Instead, under the Data Inputs, the JMX (Java Management Extensions) input method is missing.  I've spent the past 4 hours digging around in Splunk Answers trying to troubleshoot.  &lt;/P&gt;

&lt;P&gt;One particularly useful method suggested ensuring that your $SPLUNK_HOME and $JAVA_HOME environment variables were set correctly.  Check.&lt;/P&gt;

&lt;P&gt;Another suggested checking to make sure your Java could be called successfully.  Check.  Running an updated version, too.  JRE1.8.0_161.  Check.&lt;/P&gt;

&lt;P&gt;Someone suggested checking to make sure you weren't running multiple versions (or too new a version) of python.  Version 2.7, check. &lt;/P&gt;

&lt;P&gt;Someone provided a check for the --scheme file: &lt;BR /&gt;
$SPLUNK_HOME/bin/splunk cmd  $SPLUNK_HOME/bin/python $SPLUNK_HOME/etc/apps/SPLUNK4JMX/bin/jmx.py --scheme&lt;/P&gt;

&lt;P&gt;Ok, now we're getting somewhere.  On the dev box which works, I get this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;scheme&amp;gt;
    &amp;lt;title&amp;gt;JMX (Java Management Extensions)&amp;lt;/title&amp;gt;
    &amp;lt;description&amp;gt;Monitor Java Virtual Machines via their exposed JMX MBean attributes, operations and notifications&amp;lt;/description&amp;gt;
    &amp;lt;use_external_validation&amp;gt;true&amp;lt;/use_external_validation&amp;gt;
    &amp;lt;streaming_mode&amp;gt;xml&amp;lt;/streaming_mode&amp;gt;
    &amp;lt;use_single_instance&amp;gt;true&amp;lt;/use_single_instance&amp;gt;
    &amp;lt;endpoint&amp;gt;
        &amp;lt;args&amp;gt;
            &amp;lt;arg name="name"&amp;gt;
                &amp;lt;title&amp;gt;JMX Input Name&amp;lt;/title&amp;gt;
                &amp;lt;description&amp;gt;Name of the JMX input&amp;lt;/description&amp;gt;
                &amp;lt;data_type&amp;gt;string&amp;lt;/data_type&amp;gt;
                &amp;lt;required_on_edit&amp;gt;false&amp;lt;/required_on_edit&amp;gt;
                &amp;lt;required_on_create&amp;gt;true&amp;lt;/required_on_create&amp;gt;
            &amp;lt;/arg&amp;gt;

-=SNIP=-  (long, long arguments omitted)


            &amp;lt;/arg&amp;gt;
        &amp;lt;/args&amp;gt;
    &amp;lt;/endpoint&amp;gt;
&amp;lt;/scheme&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;But on my Prod box...which is missing the Data Input method...I get this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Traceback (most recent call last):
  File "/data/splunk/etc/apps/SPLUNK4JMX/bin/jmx.py", line 146, in &amp;lt;module&amp;gt;
    do_scheme()
  File "/data/splunk/etc/apps/SPLUNK4JMX/bin/jmx.py", line 61, in do_scheme
    run_java()
  File "/data/splunk/etc/apps/SPLUNK4JMX/bin/jmx.py", line 124, in run_java
    process = Popen(java_args)
  File "/data/splunk/lib/python2.7/subprocess.py", line 390, in __init__
    errread, errwrite)
  File "/data/splunk/lib/python2.7/subprocess.py", line 1024, in _execute_child
    raise child_exception
OSError: [Errno 2] No such file or directory
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;In an effort to troubleshoot further, I used another command, provided by what seemed to be the most knowledgeable yet:&lt;/P&gt;

&lt;P&gt;$SPLUNK_HOME/bin/splunk cmd splunkd print-modinput-config jmx | $SPLUNK_HOME/bin/splunk cmd $SPLUNK_HOME/bin/python $SPLUNK_HOME/etc/apps/SPLUNK4JMX/bin/jmx.py&lt;/P&gt;

&lt;P&gt;On my Dev box (the one which works) I got this output:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;License should have extension of '.lic' or '.license', ignoring file 5 GB license
[Fatal Error] :-1:-1: Premature end of file.
ERROR Error executing modular input : HTTP 401 -- &amp;lt;?xml version="1.0" encoding="UTF-8"?&amp;gt;
&amp;lt;response&amp;gt;
  &amp;lt;messages&amp;gt;
    &amp;lt;msg type="WARN"&amp;gt;call not properly authenticated&amp;lt;/msg&amp;gt;
  &amp;lt;/messages&amp;gt;
&amp;lt;/response&amp;gt;
 : com.splunk.HttpException: HTTP 401 -- &amp;lt;?xml version="1.0" encoding="UTF-8"?&amp;gt;
&amp;lt;response&amp;gt;
  &amp;lt;messages&amp;gt;
    &amp;lt;msg type="WARN"&amp;gt;call not properly authenticated&amp;lt;/msg&amp;gt;
  &amp;lt;/messages&amp;gt;
&amp;lt;/response&amp;gt;

        at com.splunk.HttpException.create(HttpException.java:84)
        at com.splunk.HttpService.send(HttpService.java:399)
        at com.splunk.Service.send(Service.java:1268)
        at com.splunk.HttpService.get(HttpService.java:151)
        at com.splunk.Entity.refresh(Entity.java:381)
        at com.splunk.Entity.refresh(Entity.java:1)
        at com.splunk.Resource.validate(Resource.java:174)
        at com.splunk.Entity.validate(Entity.java:462)
        at com.splunk.Entity.getContent(Entity.java:157)
        at com.splunk.Entity.getString(Entity.java:279)
        at com.splunk.ServiceInfo.getVersion(ServiceInfo.java:155)
        at com.splunk.modinput.ModularInput.runStateCheckerThread(Unknown Source)
        at com.splunk.modinput.ModularInput.init(Unknown Source)
        at com.splunk.modinput.jmx.JMXModularInput.main(Unknown Source)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;But on my Prod box--the non-working one-- I got the same thing as the --scheme errors above:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Introspecting scheme=jmx: script running failed (exited with code 1).
Unable to initialize modular input "jmx" defined inside the app "SPLUNK4JMX": Introspecting scheme=jmx: script running failed (exited with code 1).
Scheme "jmx" is not initialized.
Traceback (most recent call last):
  File "/data/splunk/etc/apps/SPLUNK4JMX/bin/jmx.py", line 154, in &amp;lt;module&amp;gt;
    do_run()
  File "/data/splunk/etc/apps/SPLUNK4JMX/bin/jmx.py", line 58, in do_run
    run_java()
  File "/data/splunk/etc/apps/SPLUNK4JMX/bin/jmx.py", line 124, in run_java
    process = Popen(java_args)
  File "/data/splunk/lib/python2.7/subprocess.py", line 390, in __init__
    errread, errwrite)
  File "/data/splunk/lib/python2.7/subprocess.py", line 1024, in _execute_child
    raise child_exception
OSError: [Errno 2] No such file or directory
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;So does anyone have any suggestions about how to fix the prod box?   I read on the APP page that you had to apply for a license, which I did, and I received same ...but durned if I can figure out where to put it. &lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 21:04:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/SPLUNK4JMX-Not-polling-data-from-specified-servers/m-p/433265#M7779</guid>
      <dc:creator>stcrispan</dc:creator>
      <dc:date>2020-09-29T21:04:45Z</dc:date>
    </item>
    <item>
      <title>Re: SPLUNK4JMX Not polling data from specified servers</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/SPLUNK4JMX-Not-polling-data-from-specified-servers/m-p/433266#M7780</link>
      <description>&lt;P&gt;So I wrote to Baboon Bones (the maker of SPLUNK4JMX), asking where the new license (started in version 2.5) should go.  His response:&lt;/P&gt;

&lt;BLOCKQUOTE&gt;
&lt;P&gt;Have you installed the App and browsed to it’s setup page yet ? &lt;/P&gt;

&lt;P&gt;As per the docs :&lt;/P&gt;

&lt;P&gt;“....You can configure your JMX inputs via Manager-&amp;gt;DataInputs-&amp;gt;JMX....”&lt;/P&gt;

&lt;P&gt;There is a field to paste the key into.&lt;/P&gt;

&lt;P&gt;Damien Dallimore&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;

&lt;P&gt;My response to him indicated that I don't have the JMX as an option in my Data Inputs. &lt;/P&gt;

&lt;P&gt;I'll keep this post updated as I get updates...&lt;/P&gt;</description>
      <pubDate>Wed, 29 Aug 2018 18:46:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/SPLUNK4JMX-Not-polling-data-from-specified-servers/m-p/433266#M7780</guid>
      <dc:creator>stcrispan</dc:creator>
      <dc:date>2018-08-29T18:46:59Z</dc:date>
    </item>
    <item>
      <title>Re: SPLUNK4JMX Not polling data from specified servers</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/SPLUNK4JMX-Not-polling-data-from-specified-servers/m-p/433267#M7781</link>
      <description>&lt;P&gt;Thanks for keep us updated @stcrispan . Hope you get to the bottom of this soon.&lt;/P&gt;</description>
      <pubDate>Wed, 29 Aug 2018 19:38:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/SPLUNK4JMX-Not-polling-data-from-specified-servers/m-p/433267#M7781</guid>
      <dc:creator>mstjohn_splunk</dc:creator>
      <dc:date>2018-08-29T19:38:00Z</dc:date>
    </item>
    <item>
      <title>Re: SPLUNK4JMX Not polling data from specified servers</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/SPLUNK4JMX-Not-polling-data-from-specified-servers/m-p/433268#M7782</link>
      <description>&lt;P&gt;So the problem, as per almost any one of these SPLUNK4JMX issues seems to point at, was Java.&lt;/P&gt;

&lt;P&gt;Not a wrong version, because like I said, we were running a recent version of Java 8.  Plus, we had our JAVA_HOME environment variable set.  The problem was...we had our JAVA_HOME set to the wrong directory.   When it had been set, it had been set to&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;/usr/java/jrel1.8.0_161/bin 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;...which is all well and fine, because that's where the Java executables live, right? Except in the jmx.py file, it was calling for &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;$JAVA_HOME/bin
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;...which would tell it to look for the Java executables in &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;/usr/java/jrel1.8.0_161/bin/bin
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;...and that's a non-starter.  (Literally.)&lt;/P&gt;

&lt;P&gt;So how did I figure this out?  Using the results of the above tests, I vi'd the jmx.py file and followed the script to where it called for Java.  We copied the failing command, and gave the same command from a prompt...and it failed there, too.  That's when we checked the path and found that it was adding an additional /bin. &lt;/P&gt;

&lt;P&gt;Now, we are going to fix the environment variable.  Wish us luck...to me this seems like pulling at a loose thread on a sweater.  Either you're going to get rid of a loose thread...or you're going to pull it and the sleeve comes off....&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 21:08:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/SPLUNK4JMX-Not-polling-data-from-specified-servers/m-p/433268#M7782</guid>
      <dc:creator>stcrispan</dc:creator>
      <dc:date>2020-09-29T21:08:33Z</dc:date>
    </item>
    <item>
      <title>Re: SPLUNK4JMX Not polling data from specified servers</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/SPLUNK4JMX-Not-polling-data-from-specified-servers/m-p/433269#M7783</link>
      <description>&lt;P&gt;Update:  Fixing the Java environment variable didn't break anything else. &lt;/P&gt;

&lt;P&gt;Eventually, what did break it were the developers changing the password on the instance.  So now I'm back in the same boat.  &lt;EM&gt;sigh&lt;/EM&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 01 Apr 2019 18:37:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/SPLUNK4JMX-Not-polling-data-from-specified-servers/m-p/433269#M7783</guid>
      <dc:creator>stcrispan</dc:creator>
      <dc:date>2019-04-01T18:37:52Z</dc:date>
    </item>
  </channel>
</rss>

