Splunk Dev

Authenticating to Splunk cloud causing "Unexpected DTD declaration. Line 1, position 3."

praveenp
Observer

I've created a trial account in Splunk cloud and I am trying to create index using the Splunk client C# SDK and when I try to login it throws "Unexpected DTD declaration. Line 1, position 3."

 

var service = new Service(new Uri("https://prd-p-8298m.splunkcloud.com"));
service.LogOnAsync("sc_admin", "password").Wait();

 

 I tried to change the port to 8089 as well but this caused "A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond." error

Any help on this would be appreciated. 

Thanks in advance

Labels (1)
0 Karma

ryanoconnor
Builder

Have you verified that port 8089 is open already? I would check this outside of the SDK first. 

This can be done with telnet if this is windows:

telnet prd-p-8298m.splunkcloud.com 8089

 

0 Karma

praveenp
Observer

The port is not open.

Got the following message from telent

"Connecting To prd-p-8298m.splunkcloud.com...Could not open connection to the host, on port 8089: Connect failed"

Can we enable that port in splunk cloud?

 

0 Karma

ryanoconnor
Builder

Yes port 8089 can be opened. You just need to file a support case.

 

https://docs.splunk.com/Documentation/SplunkCloud/latest/RESTTUT/RESTandCloud

0 Karma
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.

Can’t make it to .conf25? Join us online!

Get Updates on the Splunk Community!

Community Content Calendar, September edition

Welcome to another insightful post from our Community Content Calendar! We're thrilled to continue bringing ...

Splunkbase Unveils New App Listing Management Public Preview

Splunkbase Unveils New App Listing Management Public PreviewWe're thrilled to announce the public preview of ...

Leveraging Automated Threat Analysis Across the Splunk Ecosystem

Are you leveraging automation to its fullest potential in your threat detection strategy?Our upcoming Security ...