部署Splunk Docker映像无法登录

部署Splunk Docker映像无法登录,docker,splunk,Docker,Splunk,我正在使用splunk/splunkdocker image和以下命令来构建和运行,正如我从中了解到的: 当我在localhost:8000上打开浏览器时,我得到了预期的Splunk登录页面,但是当键入admin和1234时,我得到了错误401: 没有用户存在。请设置一个用户 从容器中查看/opt/splunk/etc/system/local/user seed.conf,内容看起来不错: [user_info] USERNAME = admin PASSWORD = 1234 完整的doc

我正在使用
splunk/splunk
docker image和以下命令来构建和运行,正如我从中了解到的:

当我在
localhost:8000
上打开浏览器时,我得到了预期的Splunk登录页面,但是当键入
admin
1234
时,我得到了错误401:

没有用户存在。请设置一个用户

从容器中查看
/opt/splunk/etc/system/local/user seed.conf
,内容看起来不错:

[user_info]
USERNAME = admin
PASSWORD = 1234
完整的docker日志:

PLAY [localhost] ***************************************************************

TASK [Gathering Facts] *********************************************************
Sunday 07 October 2018  17:39:17 +0300 (0:00:00.091)       0:00:00.091 ********
ok: [localhost]

TASK [include_role : splunk_upgrade] *******************************************
Sunday 07 October 2018  17:39:18 +0300 (0:00:01.821)       0:00:01.913 ********

TASK [include_role : {{ splunk.role }}] ****************************************
Sunday 07 October 2018  17:39:19 +0300 (0:00:00.031)       0:00:01.945 ********

TASK [splunk_common : Install Splunk] ******************************************
Sunday 07 October 2018  17:39:19 +0300 (0:00:00.075)       0:00:02.021 ********
changed: [localhost]

TASK [splunk_common : Install Splunk (Windows)] ********************************
Sunday 07 October 2018  17:39:47 +0300 (0:00:28.257)       0:00:30.278 ********

TASK [splunk_common : Generate user-seed.conf] *********************************
Sunday 07 October 2018  17:39:47 +0300 (0:00:00.041)       0:00:30.320 ********
changed: [localhost] => (item=USERNAME)
changed: [localhost] => (item=PASSWORD)

TASK [splunk_common : include_tasks] *******************************************
Sunday 07 October 2018  17:39:47 +0300 (0:00:00.377)       0:00:30.697 ********
included: /opt/ansible/roles/splunk_common/tasks/enable_s2s_port.yml for localhost

TASK [splunk_common : Enable the Splunk-to-Splunk port] ************************
Sunday 07 October 2018  17:39:47 +0300 (0:00:00.062)       0:00:30.759 ********
changed: [localhost]

TASK [splunk_common : include_tasks] *******************************************
Sunday 07 October 2018  17:39:50 +0300 (0:00:02.733)       0:00:33.492 ********
included: /opt/ansible/roles/splunk_common/tasks/start_splunk.yml for localhost

TASK [splunk_common : Start Splunk] ********************************************
Sunday 07 October 2018  17:39:50 +0300 (0:00:00.054)       0:00:33.547 ********
changed: [localhost]

TASK [splunk_common : include_tasks] *******************************************
Sunday 07 October 2018  17:39:57 +0300 (0:00:07.214)       0:00:40.761 ********
included: /opt/ansible/roles/splunk_common/tasks/add_splunk_license.yml for localhost

TASK [splunk_common : Download Splunk license] *********************************
Sunday 07 October 2018  17:39:57 +0300 (0:00:00.056)       0:00:40.818 ********

TASK [splunk_common : Set downloaded license location] *************************
Sunday 07 October 2018  17:39:57 +0300 (0:00:00.037)       0:00:40.855 ********

TASK [splunk_common : Set local license location] ******************************
Sunday 07 October 2018  17:39:57 +0300 (0:00:00.034)       0:00:40.889 ********
ok: [localhost]

TASK [splunk_common : Apply Splunk license] ************************************
Sunday 07 October 2018  17:39:58 +0300 (0:00:00.043)       0:00:40.933 ********
fatal: [localhost]: FAILED! => {"changed": true, "cmd": ["/opt/splunk/bin/splunk", "add", "licenses", "-auth", "admin:1234"], "delta": "0:00:01.050830", "end": "2018-10-07 17:39:59.189296", "msg": "non-zero return code", "rc": 4, "start": "2018-10-07 17:39:58.138466", "stderr": "", "stderr_lines": [], "stdout": "missing PATH-TO-LICENSE-FILE argument: ./splunk add license [PATH-TO-FILE] ", "stdout_lines": ["missing PATH-TO-LICENSE-FILE argument: ./splunk add license [PATH-TO-FILE] "]}
...ignoring

TASK [splunk_common : Set as license slave] ************************************
Sunday 07 October 2018  17:39:59 +0300 (0:00:01.213)       0:00:42.146 ********

TASK [include_role : splunk_search_head] ***************************************
Sunday 07 October 2018  17:39:59 +0300 (0:00:00.031)       0:00:42.178 ********

PLAY RECAP *********************************************************************
localhost                  : ok=10   changed=5    unreachable=0    failed=0

Sunday 07 October 2018  17:39:59 +0300 (0:00:00.048)       0:00:42.226 ********
===============================================================================
splunk_common : Install Splunk ----------------------------------------- 28.26s
splunk_common : Start Splunk -------------------------------------------- 7.21s
splunk_common : Enable the Splunk-to-Splunk port ------------------------ 2.73s
Gathering Facts --------------------------------------------------------- 1.82s
splunk_common : Apply Splunk license ------------------------------------ 1.21s
splunk_common : Generate user-seed.conf --------------------------------- 0.38s
include_role : {{ splunk.role }} ---------------------------------------- 0.08s
splunk_common : include_tasks ------------------------------------------- 0.06s
splunk_common : include_tasks ------------------------------------------- 0.06s
splunk_common : include_tasks ------------------------------------------- 0.05s
include_role : splunk_search_head --------------------------------------- 0.05s
splunk_common : Set local license location ------------------------------ 0.04s
splunk_common : Install Splunk (Windows) -------------------------------- 0.04s
splunk_common : Download Splunk license --------------------------------- 0.04s
splunk_common : Set downloaded license location ------------------------- 0.03s
include_role : splunk_upgrade ------------------------------------------- 0.03s
splunk_common : Set as license slave ------------------------------------ 0.03s
===============================================================================

Ansible playbook complete, will begin streaming var/log/splunk/splunkd_stderr.log

很显然,密码必须符合以下默认要求:

对于基本的独立Splunk环境,请运行以下命令:

$docker run-d-p 8000:8000-e'SPLUNK\u START\u ARGS=--接受许可证' -e'SPLUNK_PASSWORD='SPLUNK/SPLUNK:最新注意:提供的密码必须符合默认的SPLUNK Enterprise 密码要求*

将密码从“1234”更改为“12345678910”后,登录工作正常(唯一重要的默认要求是密码长度至少应为8个字符)


由于创建用户的失败已被禁止,而且这只记录在dockerhub中,而不记录在github中,因此我将打开一个案例通知他们。

我建议在上打开一个问题,提供docker版本等的更多详细信息
PLAY [localhost] ***************************************************************

TASK [Gathering Facts] *********************************************************
Sunday 07 October 2018  17:39:17 +0300 (0:00:00.091)       0:00:00.091 ********
ok: [localhost]

TASK [include_role : splunk_upgrade] *******************************************
Sunday 07 October 2018  17:39:18 +0300 (0:00:01.821)       0:00:01.913 ********

TASK [include_role : {{ splunk.role }}] ****************************************
Sunday 07 October 2018  17:39:19 +0300 (0:00:00.031)       0:00:01.945 ********

TASK [splunk_common : Install Splunk] ******************************************
Sunday 07 October 2018  17:39:19 +0300 (0:00:00.075)       0:00:02.021 ********
changed: [localhost]

TASK [splunk_common : Install Splunk (Windows)] ********************************
Sunday 07 October 2018  17:39:47 +0300 (0:00:28.257)       0:00:30.278 ********

TASK [splunk_common : Generate user-seed.conf] *********************************
Sunday 07 October 2018  17:39:47 +0300 (0:00:00.041)       0:00:30.320 ********
changed: [localhost] => (item=USERNAME)
changed: [localhost] => (item=PASSWORD)

TASK [splunk_common : include_tasks] *******************************************
Sunday 07 October 2018  17:39:47 +0300 (0:00:00.377)       0:00:30.697 ********
included: /opt/ansible/roles/splunk_common/tasks/enable_s2s_port.yml for localhost

TASK [splunk_common : Enable the Splunk-to-Splunk port] ************************
Sunday 07 October 2018  17:39:47 +0300 (0:00:00.062)       0:00:30.759 ********
changed: [localhost]

TASK [splunk_common : include_tasks] *******************************************
Sunday 07 October 2018  17:39:50 +0300 (0:00:02.733)       0:00:33.492 ********
included: /opt/ansible/roles/splunk_common/tasks/start_splunk.yml for localhost

TASK [splunk_common : Start Splunk] ********************************************
Sunday 07 October 2018  17:39:50 +0300 (0:00:00.054)       0:00:33.547 ********
changed: [localhost]

TASK [splunk_common : include_tasks] *******************************************
Sunday 07 October 2018  17:39:57 +0300 (0:00:07.214)       0:00:40.761 ********
included: /opt/ansible/roles/splunk_common/tasks/add_splunk_license.yml for localhost

TASK [splunk_common : Download Splunk license] *********************************
Sunday 07 October 2018  17:39:57 +0300 (0:00:00.056)       0:00:40.818 ********

TASK [splunk_common : Set downloaded license location] *************************
Sunday 07 October 2018  17:39:57 +0300 (0:00:00.037)       0:00:40.855 ********

TASK [splunk_common : Set local license location] ******************************
Sunday 07 October 2018  17:39:57 +0300 (0:00:00.034)       0:00:40.889 ********
ok: [localhost]

TASK [splunk_common : Apply Splunk license] ************************************
Sunday 07 October 2018  17:39:58 +0300 (0:00:00.043)       0:00:40.933 ********
fatal: [localhost]: FAILED! => {"changed": true, "cmd": ["/opt/splunk/bin/splunk", "add", "licenses", "-auth", "admin:1234"], "delta": "0:00:01.050830", "end": "2018-10-07 17:39:59.189296", "msg": "non-zero return code", "rc": 4, "start": "2018-10-07 17:39:58.138466", "stderr": "", "stderr_lines": [], "stdout": "missing PATH-TO-LICENSE-FILE argument: ./splunk add license [PATH-TO-FILE] ", "stdout_lines": ["missing PATH-TO-LICENSE-FILE argument: ./splunk add license [PATH-TO-FILE] "]}
...ignoring

TASK [splunk_common : Set as license slave] ************************************
Sunday 07 October 2018  17:39:59 +0300 (0:00:01.213)       0:00:42.146 ********

TASK [include_role : splunk_search_head] ***************************************
Sunday 07 October 2018  17:39:59 +0300 (0:00:00.031)       0:00:42.178 ********

PLAY RECAP *********************************************************************
localhost                  : ok=10   changed=5    unreachable=0    failed=0

Sunday 07 October 2018  17:39:59 +0300 (0:00:00.048)       0:00:42.226 ********
===============================================================================
splunk_common : Install Splunk ----------------------------------------- 28.26s
splunk_common : Start Splunk -------------------------------------------- 7.21s
splunk_common : Enable the Splunk-to-Splunk port ------------------------ 2.73s
Gathering Facts --------------------------------------------------------- 1.82s
splunk_common : Apply Splunk license ------------------------------------ 1.21s
splunk_common : Generate user-seed.conf --------------------------------- 0.38s
include_role : {{ splunk.role }} ---------------------------------------- 0.08s
splunk_common : include_tasks ------------------------------------------- 0.06s
splunk_common : include_tasks ------------------------------------------- 0.06s
splunk_common : include_tasks ------------------------------------------- 0.05s
include_role : splunk_search_head --------------------------------------- 0.05s
splunk_common : Set local license location ------------------------------ 0.04s
splunk_common : Install Splunk (Windows) -------------------------------- 0.04s
splunk_common : Download Splunk license --------------------------------- 0.04s
splunk_common : Set downloaded license location ------------------------- 0.03s
include_role : splunk_upgrade ------------------------------------------- 0.03s
splunk_common : Set as license slave ------------------------------------ 0.03s
===============================================================================

Ansible playbook complete, will begin streaming var/log/splunk/splunkd_stderr.log