1

I used the below command to start the splunk server using Docker.

docker run -d -e "SPLUNK_START_ARGS=--accept-license" -e "SPLUNK_USER=root" -p "8000:8000" splunk/splunk

But when I opened the URL localhost:8000, I am getting Server can't be reached message

What am I missing here?
I followed a tutorial from the source :-
https://medium.com/@caysever/docker-splunk-logging-driver-c70dd78ad56a

Manjunath PV
  • 326
  • 1
  • 2
  • 13

2 Answers2

0

Depending on your docker version and host OS, you could be missing the need to map 8080 from the VirtualBox.

This should not be needed if you are using HyperV (Windows host) or XHyve (Mac host), but can still be needed with VirtualBox.

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
0

The link to the Docker Image is https://hub.docker.com/r/splunk/splunk/. Referring to this we can see some details related to pulling and running the image. According to the link the right command is:

docker run -d -p 8000:8000 -e "SPLUNK_START_ARGS=--accept-license" -e "SPLUNK_PASSWORD=<password>" --name splunk splunk/splunk:latest

This works correctly for me. The image uses Ansible to do the configurations once the container has been created. If you do not specify password, the respective Ansible task will fail and your container will not be configured.

To follow the progress of the container configuration, you may run this command after running the above command:

docker logs -f splunk

Given that the name of your container is splunk. Here you will be able to see the progress of Ansible in configuring Splunk.

In case you are looking to create a clustered Splunk deployment then, you might want to have a look at this: https://github.com/splunk/docker-splunk

Hope this helps!

himan17
  • 11
  • 4