<?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: Trying to access the rest api using the Splunk Docker image in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Trying-to-access-the-rest-api-using-the-Splunk-Docker-image/m-p/301579#M56991</link>
    <description>&lt;P&gt;Hi @kwitczak,&lt;/P&gt;

&lt;P&gt;In your docker command, you have just mapped 8000 port.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;docker run -d -e "SPLUNK_START_ARGS=--accept-license" -e "SPLUNK_USER=root" -p "8000:8000" splunk/splunk
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;For accessing management port you have to map 8089 port also.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;docker run -d -e "SPLUNK_START_ARGS=--accept-license" -e "SPLUNK_USER=root" -p "8000:8000" -p "8089:8089"  splunk/splunk
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;As per my suggestion, map below splunk port also.&lt;/P&gt;

&lt;P&gt;8191 &lt;BR /&gt;
 8065 &lt;BR /&gt;
 9997 &lt;BR /&gt;
 515&lt;/P&gt;

&lt;P&gt;Thanks&lt;/P&gt;</description>
    <pubDate>Wed, 06 Dec 2017 13:37:55 GMT</pubDate>
    <dc:creator>kamlesh_vaghela</dc:creator>
    <dc:date>2017-12-06T13:37:55Z</dc:date>
    <item>
      <title>Trying to access the rest api using the Splunk Docker image</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Trying-to-access-the-rest-api-using-the-Splunk-Docker-image/m-p/301577#M56989</link>
      <description>&lt;P&gt;I followed the steps on this site &lt;A href="https://hub.docker.com/r/splunk/splunk/"&gt;https://hub.docker.com/r/splunk/splunk/&lt;/A&gt; and successfully started my docker container with Splunk running.  I can get to Splunk via &lt;A href="http://localhost:8000/"&gt;http://localhost:8000/&lt;/A&gt; and login but I am unable to access the rest api using &lt;A href="http://localhost:8089/"&gt;http://localhost:8089/&lt;/A&gt;.  I just get this in the browser:&lt;/P&gt;

&lt;P&gt;This site can’t be reached&lt;BR /&gt;
localhost refused to connect.  &lt;/P&gt;

&lt;P&gt;Any ideas?&lt;/P&gt;</description>
      <pubDate>Fri, 19 May 2017 18:18:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Trying-to-access-the-rest-api-using-the-Splunk-Docker-image/m-p/301577#M56989</guid>
      <dc:creator>kwitczak</dc:creator>
      <dc:date>2017-05-19T18:18:48Z</dc:date>
    </item>
    <item>
      <title>Re: Trying to access the rest api using the Splunk Docker image</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Trying-to-access-the-rest-api-using-the-Splunk-Docker-image/m-p/301578#M56990</link>
      <description>&lt;P&gt;In your setup, Docker is mapping port 8000 on your Docker instance onto port 8000 on your machine, which is what enables you to access the Splunk UI of the Docker instance.  The -p "8000:8000" part of your initial Docker run command is what did this.   You need to add another port mapping flag for 8089 to allow access to the REST API, eg -p "8089:8089" to allow access to the REST API via your local machine.  So the whole Docker run command would be something like:&lt;/P&gt;

&lt;P&gt;docker run -d -e "SPLUNK_START_ARGS=--accept-license" -e "SPLUNK_USER=root" -p "8000:8000" -p "8089:8089" splunk/splunk&lt;/P&gt;

&lt;P&gt;Now you should be able to access the REST API via &lt;A href="https://localhost:8089" target="_blank"&gt;https://localhost:8089&lt;/A&gt; (nb, you need to use https, not http for REST API, unlike you did in your original post)&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 17:05:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Trying-to-access-the-rest-api-using-the-Splunk-Docker-image/m-p/301578#M56990</guid>
      <dc:creator>philipmattocks</dc:creator>
      <dc:date>2020-09-29T17:05:29Z</dc:date>
    </item>
    <item>
      <title>Re: Trying to access the rest api using the Splunk Docker image</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Trying-to-access-the-rest-api-using-the-Splunk-Docker-image/m-p/301579#M56991</link>
      <description>&lt;P&gt;Hi @kwitczak,&lt;/P&gt;

&lt;P&gt;In your docker command, you have just mapped 8000 port.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;docker run -d -e "SPLUNK_START_ARGS=--accept-license" -e "SPLUNK_USER=root" -p "8000:8000" splunk/splunk
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;For accessing management port you have to map 8089 port also.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;docker run -d -e "SPLUNK_START_ARGS=--accept-license" -e "SPLUNK_USER=root" -p "8000:8000" -p "8089:8089"  splunk/splunk
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;As per my suggestion, map below splunk port also.&lt;/P&gt;

&lt;P&gt;8191 &lt;BR /&gt;
 8065 &lt;BR /&gt;
 9997 &lt;BR /&gt;
 515&lt;/P&gt;

&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Wed, 06 Dec 2017 13:37:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Trying-to-access-the-rest-api-using-the-Splunk-Docker-image/m-p/301579#M56991</guid>
      <dc:creator>kamlesh_vaghela</dc:creator>
      <dc:date>2017-12-06T13:37:55Z</dc:date>
    </item>
  </channel>
</rss>

