Splunk Cloud Platform

Getting error Failed to connect to instancename.cloud.splunk.com port 8088: Timed out

swadeepmohanty
New Member

Every time I am getting error when I am trying to run following command:
curl -k https://instancename.cloud.splunk.com:8088/services/collector/event -H "Authorization: Splunk TOKEN" -d '{"event": "hello world"}'
This is my Self-service Splunk Cloud.
Even I tried with Postman with POST method and setting Authorization Key with token as Header, still getting There was an error connecting to https://instancename.cloud.splunk.com//services/collector/event.

Labels (1)
Tags (1)
0 Karma
1 Solution

PavelP
Motivator

Hello @swadeepmohanty ,
what is the exact error you are getting? Try this command:

time curl -k -vvvvv https://instancename.cloud.splunk.com:8088/services/collector/event -H "Authorization: Splunk TOKEN" -d '{"event": "hello world"}'

The prepended time command will show how long does the curl request take. The -vvvvv switch will show verbose info.

Let me know how it went.

View solution in original post

0 Karma

PavelP
Motivator

Hello @swadeepmohanty ,
what is the exact error you are getting? Try this command:

time curl -k -vvvvv https://instancename.cloud.splunk.com:8088/services/collector/event -H "Authorization: Splunk TOKEN" -d '{"event": "hello world"}'

The prepended time command will show how long does the curl request take. The -vvvvv switch will show verbose info.

Let me know how it went.

0 Karma

swadeepmohanty
New Member

By running the command with -vvvvv I am getting the following error:
* upload completely sent off: 8 out of 8 bytes
* Mark bundle as not supporting multiuse
< HTTP/1.1 400 Bad Request
< Date: Sat, 18 Apr 2020 15:31:51 GMT
< Content-Type: application/json; charset=UTF-8
< X-Content-Type-Options: nosniff
< Content-Length: 64
< Vary: Authorization
< Connection: Keep-Alive
< X-Frame-Options: SAMEORIGIN
< Server: Splunkd
<
{"text":"Invalid data format","code":6,"invalid-event-number":0}* Connection #0 to host input-prd-p-5x72v3pzvdnj.cloud.splunk.com left intact
curl: (3) unmatched close brace/bracket in URL position 12:
hello world}'

0 Karma

PavelP
Motivator

ohh, you're on windows! 🙂
use double quote and escape them in json:

curl -k -vvvvv https://instancename.cloud.splunk.com:8088/services/collector/event -H "Authorization: Splunk TOKEN" -d "{\"event\": \"hello world\"}"
0 Karma

swadeepmohanty
New Member

Awesome! It worked. 🙂

0 Karma
Get Updates on the Splunk Community!

.conf25 Registration is OPEN!

Ready. Set. Splunk! Your favorite Splunk user event is back and better than ever. Get ready for more technical ...

Detecting Cross-Channel Fraud with Splunk

This article is the final installment in our three-part series exploring fraud detection techniques using ...

Splunk at Cisco Live 2025: Learning, Innovation, and a Little Bit of Mr. Brightside

Pack your bags (and maybe your dancing shoes)—Cisco Live is heading to San Diego, June 8–12, 2025, and Splunk ...