<?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 running splunk with docker - ERROR: Couldn't determine $SPLUNK_HOME or $SPLUNK_ETC; perhaps one should be set in environment in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/running-splunk-with-docker-ERROR-Couldn-t-determine-SPLUNK-HOME/m-p/394263#M70367</link>
    <description>&lt;P&gt;hello&lt;BR /&gt;
I was testing Docker as an easy solution to roam Splunk. I have encounter an issue and need your help.&lt;/P&gt;

&lt;P&gt;Here are the steps I took:&lt;/P&gt;

&lt;OL&gt;
&lt;LI&gt; Created a fresh Splunk container using an official article: &lt;A href="https://docs.splunk.com/Documentation/Splunk/7.2.4/Installation/DeployandrunSplunkEnterpriseinsideDockercontainers" target="_blank"&gt;https://docs.splunk.com/Documentation/Splunk/7.2.4/Installation/DeployandrunSplunkEnterpriseinsideDockercontainers&lt;/A&gt;&lt;/LI&gt;
&lt;LI&gt; I have connect to the Splunk app through the web and uploaded a csv to have some data&lt;/LI&gt;
&lt;LI&gt; I have stopped the container and created an image&lt;/LI&gt;
&lt;LI&gt; I have moved the image and run it on another host&lt;/LI&gt;
&lt;/OL&gt;

&lt;P&gt;On the other host I receive the below error messages. &lt;/P&gt;

&lt;BLOCKQUOTE&gt;
&lt;P&gt;fatal: [localhost]: FAILED! =&amp;gt;&lt;BR /&gt;
{"changed": false, "cmd":&lt;BR /&gt;
["/opt/splunk/bin/splunk",&lt;BR /&gt;
"hash-passwd", "Xpktbe!23"], "delta":&lt;BR /&gt;
"0:00:00.314896", "end": "2019-03-27&lt;BR /&gt;
09:56:43.305836", "msg": "non-zero&lt;BR /&gt;
return code", "rc": 8, "start":&lt;BR /&gt;
"2019-03-27 09:56:42.990940",&lt;BR /&gt;
"stderr": "", "stderr_lines": [],&lt;BR /&gt;
"stdout": "ERROR: Couldn't determine&lt;BR /&gt;
$SPLUNK_HOME or $SPLUNK_ETC; perhaps&lt;BR /&gt;
one should be set in environment",&lt;BR /&gt;
"stdout_lines": ["ERROR: Couldn't&lt;BR /&gt;
determine $SPLUNK_HOME or $SPLUNK_ETC;&lt;BR /&gt;
perhaps one should be set in&lt;BR /&gt;
environment"]}&lt;BR /&gt;
        to retry, use: --limit @/opt/container_artifact/ansible-retry/site.retry&lt;BR /&gt;
PLAY RECAP&lt;BR /&gt;
********************************************************************* localhost                  : ok=18&lt;BR /&gt;&lt;BR /&gt;
changed=1    unreachable=0    failed=1&lt;/P&gt;

&lt;P&gt;ERROR: Couldn't read&lt;BR /&gt;
"/opt/splunk/etc/splunk-launch.conf"&lt;BR /&gt;
-- maybe $SPLUNK_HOME or $SPLUNK_ETC is set wrong?&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;

&lt;P&gt;can someone help ?&lt;BR /&gt;
thanks&lt;/P&gt;</description>
    <pubDate>Tue, 29 Sep 2020 23:59:30 GMT</pubDate>
    <dc:creator>sarit_s</dc:creator>
    <dc:date>2020-09-29T23:59:30Z</dc:date>
    <item>
      <title>running splunk with docker - ERROR: Couldn't determine $SPLUNK_HOME or $SPLUNK_ETC; perhaps one should be set in environment</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/running-splunk-with-docker-ERROR-Couldn-t-determine-SPLUNK-HOME/m-p/394263#M70367</link>
      <description>&lt;P&gt;hello&lt;BR /&gt;
I was testing Docker as an easy solution to roam Splunk. I have encounter an issue and need your help.&lt;/P&gt;

&lt;P&gt;Here are the steps I took:&lt;/P&gt;

&lt;OL&gt;
&lt;LI&gt; Created a fresh Splunk container using an official article: &lt;A href="https://docs.splunk.com/Documentation/Splunk/7.2.4/Installation/DeployandrunSplunkEnterpriseinsideDockercontainers" target="_blank"&gt;https://docs.splunk.com/Documentation/Splunk/7.2.4/Installation/DeployandrunSplunkEnterpriseinsideDockercontainers&lt;/A&gt;&lt;/LI&gt;
&lt;LI&gt; I have connect to the Splunk app through the web and uploaded a csv to have some data&lt;/LI&gt;
&lt;LI&gt; I have stopped the container and created an image&lt;/LI&gt;
&lt;LI&gt; I have moved the image and run it on another host&lt;/LI&gt;
&lt;/OL&gt;

&lt;P&gt;On the other host I receive the below error messages. &lt;/P&gt;

&lt;BLOCKQUOTE&gt;
&lt;P&gt;fatal: [localhost]: FAILED! =&amp;gt;&lt;BR /&gt;
{"changed": false, "cmd":&lt;BR /&gt;
["/opt/splunk/bin/splunk",&lt;BR /&gt;
"hash-passwd", "Xpktbe!23"], "delta":&lt;BR /&gt;
"0:00:00.314896", "end": "2019-03-27&lt;BR /&gt;
09:56:43.305836", "msg": "non-zero&lt;BR /&gt;
return code", "rc": 8, "start":&lt;BR /&gt;
"2019-03-27 09:56:42.990940",&lt;BR /&gt;
"stderr": "", "stderr_lines": [],&lt;BR /&gt;
"stdout": "ERROR: Couldn't determine&lt;BR /&gt;
$SPLUNK_HOME or $SPLUNK_ETC; perhaps&lt;BR /&gt;
one should be set in environment",&lt;BR /&gt;
"stdout_lines": ["ERROR: Couldn't&lt;BR /&gt;
determine $SPLUNK_HOME or $SPLUNK_ETC;&lt;BR /&gt;
perhaps one should be set in&lt;BR /&gt;
environment"]}&lt;BR /&gt;
        to retry, use: --limit @/opt/container_artifact/ansible-retry/site.retry&lt;BR /&gt;
PLAY RECAP&lt;BR /&gt;
********************************************************************* localhost                  : ok=18&lt;BR /&gt;&lt;BR /&gt;
changed=1    unreachable=0    failed=1&lt;/P&gt;

&lt;P&gt;ERROR: Couldn't read&lt;BR /&gt;
"/opt/splunk/etc/splunk-launch.conf"&lt;BR /&gt;
-- maybe $SPLUNK_HOME or $SPLUNK_ETC is set wrong?&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;

&lt;P&gt;can someone help ?&lt;BR /&gt;
thanks&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 23:59:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/running-splunk-with-docker-ERROR-Couldn-t-determine-SPLUNK-HOME/m-p/394263#M70367</guid>
      <dc:creator>sarit_s</dc:creator>
      <dc:date>2020-09-29T23:59:30Z</dc:date>
    </item>
    <item>
      <title>Re: running splunk with docker - ERROR: Couldn't determine $SPLUNK_HOME or $SPLUNK_ETC; perhaps one should be set in environment</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/running-splunk-with-docker-ERROR-Couldn-t-determine-SPLUNK-HOME/m-p/394264#M70368</link>
      <description>&lt;P&gt;any idea ?&lt;/P&gt;</description>
      <pubDate>Thu, 11 Apr 2019 12:34:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/running-splunk-with-docker-ERROR-Couldn-t-determine-SPLUNK-HOME/m-p/394264#M70368</guid>
      <dc:creator>sarit_s</dc:creator>
      <dc:date>2019-04-11T12:34:00Z</dc:date>
    </item>
    <item>
      <title>Re: running splunk with docker - ERROR: Couldn't determine $SPLUNK_HOME or $SPLUNK_ETC; perhaps one should be set in environment</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/running-splunk-with-docker-ERROR-Couldn-t-determine-SPLUNK-HOME/m-p/394265#M70369</link>
      <description>&lt;P&gt;Hi! Usually this comes down to the volume mounts missing or needing to be updated. Can you share your swarm file?&lt;/P&gt;</description>
      <pubDate>Fri, 12 Apr 2019 17:43:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/running-splunk-with-docker-ERROR-Couldn-t-determine-SPLUNK-HOME/m-p/394265#M70369</guid>
      <dc:creator>mattymo</dc:creator>
      <dc:date>2019-04-12T17:43:14Z</dc:date>
    </item>
    <item>
      <title>Re: running splunk with docker - ERROR: Couldn't determine $SPLUNK_HOME or $SPLUNK_ETC; perhaps one should be set in environment</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/running-splunk-with-docker-ERROR-Couldn-t-determine-SPLUNK-HOME/m-p/394266#M70370</link>
      <description>&lt;P&gt;I had the same error due to SELinux enabled. Disabling it (/etc/selinux/config SELINUX=disabled)  solve my problem.&lt;/P&gt;</description>
      <pubDate>Mon, 14 Oct 2019 12:00:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/running-splunk-with-docker-ERROR-Couldn-t-determine-SPLUNK-HOME/m-p/394266#M70370</guid>
      <dc:creator>frmercier</dc:creator>
      <dc:date>2019-10-14T12:00:30Z</dc:date>
    </item>
    <item>
      <title>Re: running splunk with docker - ERROR: Couldn't determine $SPLUNK_HOME or $SPLUNK_ETC; perhaps one should be set in env</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/running-splunk-with-docker-ERROR-Couldn-t-determine-SPLUNK-HOME/m-p/564325#M100491</link>
      <description>&lt;P&gt;Check your SELinux log:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;grep "denied" /var/log/audit/audit.log&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Enable SELinux perms for your bind mount:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;docker run -d -p 8000:8000 -e SPLUNK_START_ARGS='--accept-license' -e SPLUNK_PASSWORD='&amp;lt;password&amp;gt;' -v /opt/splunk:/opt/splunk:Z splunk/splunk:latest&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://docs.docker.com/storage/bind-mounts/#configure-the-selinux-label" target="_blank" rel="noopener"&gt;https://docs.docker.com/storage/bind-mounts/#configure-the-selinux-label&lt;/A&gt;&lt;/P&gt;&lt;P&gt;"The Z option indicates that the bind mount content is private and unshared."&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 23 Aug 2021 13:03:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/running-splunk-with-docker-ERROR-Couldn-t-determine-SPLUNK-HOME/m-p/564325#M100491</guid>
      <dc:creator>ephemeric</dc:creator>
      <dc:date>2021-08-23T13:03:49Z</dc:date>
    </item>
  </channel>
</rss>

