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!

Index This | I am a number, but when you add ‘G’ to me, I go away. What number am I?

March 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...