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!

Developer Spotlight with Paul Stout

Welcome to our very first developer spotlight release series where we'll feature some awesome Splunk ...

Preparing your Splunk Environment for OpenSSL3

The Splunk platform will transition to OpenSSL version 3 in a future release. Actions are required to prepare ...

Deprecation of Splunk Observability Kubernetes “Classic Navigator” UI starting ...

Access to Splunk Observability Kubernetes “Classic Navigator” UI will no longer be available starting January ...