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!

Stay Connected: Your Guide to May Tech Talks, Office Hours, and Webinars!

Take a look below to explore our upcoming Community Office Hours, Tech Talks, and Webinars this month. This ...

They're back! Join the SplunkTrust and MVP at .conf24

With our highly anticipated annual conference, .conf, comes the fez-wearers you can trust! The SplunkTrust, as ...

Enterprise Security Content Update (ESCU) | New Releases

Last month, the Splunk Threat Research Team had two releases of new security content via the Enterprise ...