Deployment Architecture

Splunk Forwarder Add-on for Websphere Application Server: Why CreateInputs.jar seg faults while scanning directories?

mbarrie_splunk
Splunk Employee
Splunk Employee

While attempting to run CreateInputs.jar per the instructions for the splunk_forwarder_addon_was app, it scans correctly at first then gets a NPE :
[bin]$ /usr/lib/jvm/java-1.6.0-ibm-1.6.0.7/jre/bin/java -Xdebug -jar CreateInputs.jar -startpath /usr/IBM/WebSphere/DM7/profiles/ -hostname host1 -enablenodemetadata -whitelist '.log$|
.txt$' -dmgrprofile
Add /usr/IBM/WebSphere/DM7/profiles/DmgrMaintDMDP/config/cells/profile/security.xml
Add /usr/IBM/WebSphere/DM7/profiles/DmgrMaintDMDP/config/cells/profile/fileRegistry.xml
Add /usr/IBM/WebSphere/DM7/profiles/DmgrMaintDMDP/config/cells/profile/nodegroups/DefaultNodeGroup/nodegroup.xml
Add /usr/IBM/WebSphere/DM7/profiles/DmgrMaintDMDP/config/cells/profile/clusters/QADMTestClusterDocProc/cluster.xml
Add /usr/IBM/WebSphere/DM7/profiles/DmgrMaintDMDP/config/cells/profile/clusters/maintDMdocproc/cluster.xml
Add /usr/IBM/WebSphere/DM7/profiles/DmgrMaintDMDP/config/cells/profile/nodes/nodename/serverindex.xml
Add /usr/IBM/WebSphere/DM7/profiles/DmgrMaintDMDP/config/cells/profile/nodes/nodename/serverindex.xml

Add /usr/IBM/WebSphere/DM7/profiles/DmgrMaintDMDP/logs/dmgr
Add /usr/IBM/WebSphere/DM7/profiles/DmgrMaintDMDP/logs/ffdc
Exception in thread "main" java.lang.NullPointerException
at java.io.File.(File.java:222)
at CreateInputs.addLogStanzasAction(CreateInputs.java:530)
at CreateInputs.addLogStanzas(CreateInputs.java:524)
at CreateInputs.main(CreateInputs.java:252)

It fails repeatedly at this point and trying various jre's didn't affect it

1 Solution

mbarrie_splunk
Splunk Employee
Splunk Employee

The problem was that for whatever reason the java versions I tried (including the WebSphere jre) seemed to interpret a .tar file as a directory.

My /usr/IBM/WebSphere/DM7/profiles/ directory had two directories (each valid profiles) and a .tar file that somebody created during diag work. CreateInputs tests each entry in the directory by the File.isDirectory() test but for whatever reason on AIX it seemed to think the .tar file was a directory as well. Moving the file out of the profiles directory fixes the problem.

View solution in original post

mbarrie_splunk
Splunk Employee
Splunk Employee

The problem was that for whatever reason the java versions I tried (including the WebSphere jre) seemed to interpret a .tar file as a directory.

My /usr/IBM/WebSphere/DM7/profiles/ directory had two directories (each valid profiles) and a .tar file that somebody created during diag work. CreateInputs tests each entry in the directory by the File.isDirectory() test but for whatever reason on AIX it seemed to think the .tar file was a directory as well. Moving the file out of the profiles directory fixes the problem.

Get Updates on the Splunk Community!

Announcing Scheduled Export GA for Dashboard Studio

We're excited to announce the general availability of Scheduled Export for Dashboard Studio. Starting in ...

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics GA in US-AWS!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...