Reference to the example http://dev.splunk.com/view/SP-CAAAEC9
I am running client side java script example.
first i hvae started the server:
node sdkdo runserver
Running server on port: 6969 -- Hit CTRL+C to exit
Then Saved this code to connect.html
Placed the file in splunk-sdk-javascript/example/browser folder
set the path location as
changed the login credentials as
var service = new splunkjs.Service(http, {
username: "admin",
password: "password",
scheme: "http",
host: "localhost",
port:"6969",
version:"5.0"
});
When running this in browser as http://localhost:6969/example/browser/connect.html
it says alert "Error listing apps".
In console I can see
http://localhost:6969/proxy/services/auth/login?output_mode=json 500 (Internal Server Error)
If i just click to open connect.html the URL becomes file:///C:/splunk-sdk-javascript/examples/browser/connect.html gives same alert but in console it says:
Failed to load resource: Resource failed to load file:///C:/proxy/services/auth/login?output_mode=json
Please help what I am missing.
Thanks,
In my case - using NodeJS v0.8.9 did it 🙂
Greetz Robert
Assuming it is default Splunk installation, the port that you will need to connect to is 8089. 6969 is where the http server, node is listening.
Please help. Every time I am getting error message as "Error Listing Apps".
As long as you are using the "admin" user, the license shouldn't matter. Did you copy the xml2json folder as mentioned in my previous comment?
My license is expired..I am working on free splunk this week. That can be the reason?
What version of Splunk are you running?
If you are running Splunk 4.x, you will also need the xml2json app which is shipped with the SDK. You will need to copy the folder to your Splunk apps directory (etc/apps/). Detailed instructions for this can be found at http://dev.splunk.com/view/SP-CAAAEFN.
with port:"8089" again it is not running.. showing error on console as:
POST http://localhost:6969/proxy/services/auth/login?output_mode=json 500 (Internal Server Error) jquery.min.js:4
Any Suggesstion?