<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: What is wrong with this curl command and what does this output mean? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/What-is-wrong-with-this-curl-command-and-what-does-this-output/m-p/99806#M25753</link>
    <description>&lt;P&gt;It's a successful connection, yes, but you're talking to the webserver, not splunkd. Based upon your comment about connecting to port 8089, it sounds like there's a firewall in the way.&lt;/P&gt;</description>
    <pubDate>Tue, 23 Oct 2012 19:43:24 GMT</pubDate>
    <dc:creator>sowings</dc:creator>
    <dc:date>2012-10-23T19:43:24Z</dc:date>
    <item>
      <title>What is wrong with this curl command and what does this output mean?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/What-is-wrong-with-this-curl-command-and-what-does-this-output/m-p/99798#M25745</link>
      <description>&lt;P&gt;&lt;EM&gt;All URLs and such have been modified for privacy.&lt;/EM&gt;&lt;/P&gt;

&lt;P&gt;Can anyone tell me what is happening here? I'm trying to search for "My Search" on a remote splunk server in which it's URL is splunk.website.cc. There is no https:// in front of it. If you try to load &lt;A href="https://splunk.website.cc"&gt;https://splunk.website.cc&lt;/A&gt; in your normal web browser it will fail.&lt;/P&gt;

&lt;P&gt;Here is the command I am sending through CLI using Rest API&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;curl -k -3 -vvv -u admin:pass -d "search=savedsearch %22My%20Search%22" -d "output_mode=csv" splunk.website.cc:80/servicesNS/admin/search/search/jobs/export
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I am using port 80 because that is the port that the server connects to. If I use port 8089, it times out trying to connect to the server.&lt;/P&gt;

&lt;P&gt;When I run the above command, I get this output in my CLI...&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;* About to connect() to splunk.website.cc port 80 (#0)
*   Trying 1.1.1.1... connected
* Server auth using Basic with user 'admin'
&amp;gt; POST /servicesNS/admin/search/search/jobs/export HTTP/1.0
&amp;gt; Authorization: Basic cmFzY2FsOnphY2twYXNzd29yZA==
&amp;gt; User-Agent: curl/7.22.0 (x86_64-pc-linux-gnu) libcurl/7.22.0 OpenSSL/1.0.1 zlib/1.2.3.4 libidn/1.23 librtmp/2.3
&amp;gt; Host: splunk.website.cc
&amp;gt; Accept: */*
&amp;gt; Content-Length: 51
&amp;gt; Content-Type: application/x-www-form-urlencoded
&amp;gt; 
* upload completely sent off: 51out of 51 bytes
&amp;lt; HTTP/1.1 303 See Other
&amp;lt; Date: Tue, 23 Oct 2012 18:45:20 GMT
&amp;lt; Server: CherryPy/3.1.2
&amp;lt; Content-Length: 194
&amp;lt; Content-Type: text/html;charset=utf-8
&amp;lt; Location: &lt;A href="http://splunk.website.cc/en-US/servicesNS/admin/search/search/jobs/export" target="test_blank"&gt;http://splunk.website.cc/en-US/servicesNS/admin/search/search/jobs/export&lt;/A&gt;
&amp;lt; Set-Cookie: session_id_8000=f2d959814502146df5c678e29f8043ccc4bdf1a4; expires=Wed, 24 Oct 2012 18:45:20 GMT; httponly; Path=/
&amp;lt; Connection: close
&amp;lt; 
* Closing connection #0
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Can anyone please explain what this output means and or what I can do to correct it? It's obviously not an output of data from "My Search" Any response would be appreciated!&lt;/P&gt;</description>
      <pubDate>Tue, 23 Oct 2012 18:53:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/What-is-wrong-with-this-curl-command-and-what-does-this-output/m-p/99798#M25745</guid>
      <dc:creator>zackh123</dc:creator>
      <dc:date>2012-10-23T18:53:56Z</dc:date>
    </item>
    <item>
      <title>Re: What is wrong with this curl command and what does this output mean?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/What-is-wrong-with-this-curl-command-and-what-does-this-output/m-p/99799#M25746</link>
      <description>&lt;P&gt;From what I can see, you're talking to Splunk WEB (CherryPy) on port 80 over HTTP, &lt;EM&gt;not&lt;/EM&gt; the splunk daemon itself, which would be servicing your REST call. Try using the server's hostname, port 8089 (default management port) as the host part of your curl statement. You'll need to preface it with https.&lt;/P&gt;</description>
      <pubDate>Tue, 23 Oct 2012 19:18:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/What-is-wrong-with-this-curl-command-and-what-does-this-output/m-p/99799#M25746</guid>
      <dc:creator>sowings</dc:creator>
      <dc:date>2012-10-23T19:18:45Z</dc:date>
    </item>
    <item>
      <title>Re: What is wrong with this curl command and what does this output mean?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/What-is-wrong-with-this-curl-command-and-what-does-this-output/m-p/99800#M25747</link>
      <description>&lt;P&gt;Where would I find my server's hostname? I though it was splunk.website.cc&lt;/P&gt;</description>
      <pubDate>Tue, 23 Oct 2012 19:19:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/What-is-wrong-with-this-curl-command-and-what-does-this-output/m-p/99800#M25747</guid>
      <dc:creator>zackh123</dc:creator>
      <dc:date>2012-10-23T19:19:55Z</dc:date>
    </item>
    <item>
      <title>Re: What is wrong with this curl command and what does this output mean?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/What-is-wrong-with-this-curl-command-and-what-does-this-output/m-p/99801#M25748</link>
      <description>&lt;P&gt;I was assuming you had obfuscated it. An example might be &lt;CODE&gt;curl ... &lt;A href="https://splunk.website.cc:8089/servicesNS/admin/search/search/jobs/export"&gt;https://splunk.website.cc:8089/servicesNS/admin/search/search/jobs/export&lt;/A&gt; ... &lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 23 Oct 2012 19:24:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/What-is-wrong-with-this-curl-command-and-what-does-this-output/m-p/99801#M25748</guid>
      <dc:creator>sowings</dc:creator>
      <dc:date>2012-10-23T19:24:07Z</dc:date>
    </item>
    <item>
      <title>Re: What is wrong with this curl command and what does this output mean?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/What-is-wrong-with-this-curl-command-and-what-does-this-output/m-p/99802#M25749</link>
      <description>&lt;P&gt;If I use that url, it times out trying to connect.&lt;/P&gt;

&lt;UL&gt;
&lt;LI&gt;About to connect() to splunk.website.cc port 8089 (#0)&lt;/LI&gt;
&lt;LI&gt;  Trying 1.1.1.1... Connection timed out&lt;/LI&gt;
&lt;LI&gt;couldn't connect to host&lt;/LI&gt;
&lt;LI&gt;Closing connection #0
curl: (7) couldn't connect to host&lt;/LI&gt;
&lt;/UL&gt;</description>
      <pubDate>Tue, 23 Oct 2012 19:31:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/What-is-wrong-with-this-curl-command-and-what-does-this-output/m-p/99802#M25749</guid>
      <dc:creator>zackh123</dc:creator>
      <dc:date>2012-10-23T19:31:00Z</dc:date>
    </item>
    <item>
      <title>Re: What is wrong with this curl command and what does this output mean?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/What-is-wrong-with-this-curl-command-and-what-does-this-output/m-p/99803#M25750</link>
      <description>&lt;P&gt;if it times out, then it's most likely because you have a firewall or something else blocking it.&lt;/P&gt;</description>
      <pubDate>Tue, 23 Oct 2012 19:36:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/What-is-wrong-with-this-curl-command-and-what-does-this-output/m-p/99803#M25750</guid>
      <dc:creator>gkanapathy</dc:creator>
      <dc:date>2012-10-23T19:36:12Z</dc:date>
    </item>
    <item>
      <title>Re: What is wrong with this curl command and what does this output mean?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/What-is-wrong-with-this-curl-command-and-what-does-this-output/m-p/99804#M25751</link>
      <description>&lt;P&gt;I don't see how this question is just another big déjà vu of &lt;A href="http://splunk-base.splunk.com/answers/62852/curl-35-error-rest-api"&gt;http://splunk-base.splunk.com/answers/62852/curl-35-error-rest-api&lt;/A&gt; - why are you asking the same question twice? And why did you accept the original answer if you haven't resolved your issue?&lt;/P&gt;</description>
      <pubDate>Tue, 23 Oct 2012 19:36:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/What-is-wrong-with-this-curl-command-and-what-does-this-output/m-p/99804#M25751</guid>
      <dc:creator>Ayn</dc:creator>
      <dc:date>2012-10-23T19:36:36Z</dc:date>
    </item>
    <item>
      <title>Re: What is wrong with this curl command and what does this output mean?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/What-is-wrong-with-this-curl-command-and-what-does-this-output/m-p/99805#M25752</link>
      <description>&lt;P&gt;Thanks for the help @Ayn but this is different output as I am actually POSTing back to the server with some sort of data I collected. The last question was asking for information about an error. This question is asking for information on output to what seems to be a successful connection to the server.&lt;/P&gt;</description>
      <pubDate>Tue, 23 Oct 2012 19:40:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/What-is-wrong-with-this-curl-command-and-what-does-this-output/m-p/99805#M25752</guid>
      <dc:creator>zackh123</dc:creator>
      <dc:date>2012-10-23T19:40:41Z</dc:date>
    </item>
    <item>
      <title>Re: What is wrong with this curl command and what does this output mean?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/What-is-wrong-with-this-curl-command-and-what-does-this-output/m-p/99806#M25753</link>
      <description>&lt;P&gt;It's a successful connection, yes, but you're talking to the webserver, not splunkd. Based upon your comment about connecting to port 8089, it sounds like there's a firewall in the way.&lt;/P&gt;</description>
      <pubDate>Tue, 23 Oct 2012 19:43:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/What-is-wrong-with-this-curl-command-and-what-does-this-output/m-p/99806#M25753</guid>
      <dc:creator>sowings</dc:creator>
      <dc:date>2012-10-23T19:43:24Z</dc:date>
    </item>
    <item>
      <title>Re: What is wrong with this curl command and what does this output mean?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/What-is-wrong-with-this-curl-command-and-what-does-this-output/m-p/99807#M25754</link>
      <description>&lt;P&gt;OK - the issue is the same though. You need to access port 8089.&lt;/P&gt;</description>
      <pubDate>Tue, 23 Oct 2012 19:44:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/What-is-wrong-with-this-curl-command-and-what-does-this-output/m-p/99807#M25754</guid>
      <dc:creator>Ayn</dc:creator>
      <dc:date>2012-10-23T19:44:31Z</dc:date>
    </item>
    <item>
      <title>Re: What is wrong with this curl command and what does this output mean?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/What-is-wrong-with-this-curl-command-and-what-does-this-output/m-p/99808#M25755</link>
      <description>&lt;P&gt;This looks to me like the same problem. You're still connecting to the wrong port (and getting an error both times, so stop doing that) and when you use the right port, you're getting blocked, most probably by a firewall.&lt;/P&gt;</description>
      <pubDate>Tue, 23 Oct 2012 19:47:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/What-is-wrong-with-this-curl-command-and-what-does-this-output/m-p/99808#M25755</guid>
      <dc:creator>gkanapathy</dc:creator>
      <dc:date>2012-10-23T19:47:12Z</dc:date>
    </item>
    <item>
      <title>Re: What is wrong with this curl command and what does this output mean?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/What-is-wrong-with-this-curl-command-and-what-does-this-output/m-p/99809#M25756</link>
      <description>&lt;P&gt;Specifically to answer your question about the output from curl, it says "303, the thing you want is over there". It's referring you to a localized version of the URL you asked for, to show it to you in English, with a US (en-US) locale. An ordinary browser would follow that up and go ask for that URL as a GET (and probably then get a 404).&lt;/P&gt;</description>
      <pubDate>Tue, 23 Oct 2012 21:10:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/What-is-wrong-with-this-curl-command-and-what-does-this-output/m-p/99809#M25756</guid>
      <dc:creator>sowings</dc:creator>
      <dc:date>2012-10-23T21:10:19Z</dc:date>
    </item>
    <item>
      <title>Re: What is wrong with this curl command and what does this output mean?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/What-is-wrong-with-this-curl-command-and-what-does-this-output/m-p/99810#M25757</link>
      <description>&lt;P&gt;Thanks for the answer. And I apologize for the bombardment of questions that I am asking and there will probably be more to come. I'm very new to Splunk, Splunk CLI, and Rest API. But when assigned something at my place of work, you have to do it! I appreciate the patience of all of you guys. This seems like a nifty tool! @sowings @Ayn @gkanapathy&lt;/P&gt;</description>
      <pubDate>Wed, 24 Oct 2012 11:45:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/What-is-wrong-with-this-curl-command-and-what-does-this-output/m-p/99810#M25757</guid>
      <dc:creator>zackh123</dc:creator>
      <dc:date>2012-10-24T11:45:47Z</dc:date>
    </item>
  </channel>
</rss>

