All Apps and Add-ons

How can I get rid of "Connection refused" for Deep Learning Toolkit setup?

davietch
Path Finder

Hi,

I am setting up the Deep Learning Toolkit (https://splunkbase.splunk.com/app/4607/) but the connexion to the docker instance does not work.

What I did:
- Install docker and add the containers needed
- Docker runs as root
- Install Splunk + Machine Learning Toolkit (+ python maths librairies) + Deep Learning toolkit
- The user running Splunk belongs to the docker group

When I fill in the form in the set up page of the app with the information about docker (single-instance type), I get this error:
UnixHTTPConnectionPool(host='localhost', port=None): Max retries exceeded with url: /v1.35/_ping (Caused by : [Errno 13] Permission denied)

In the internal logs, I also see logs like this:

ConnectionError: UnixHTTPConnectionPool(host='localhost', port=None): Max retries exceeded with url: /v1.35/containers/json?size=0&filters=%7B%22label%22%3A+%5B%22mltk_container%22%5D%7D&limit=-1&all=0&trunc_cmd=0 (Caused by : [Errno 13] Permission denied)

Can you help me to make this work?

0 Karma
1 Solution

rfujara_splunk
Splunk Employee
Splunk Employee

Could you please check this Docker docs page:
https://docs.docker.com/install/linux/linux-postinstall/#manage-docker-as-a-non-root-user

It may be because the user running Splunk is not allowed to talk to Docker.

View solution in original post

ephemeric
Contributor

As usual always check SELinux and perms on `/var/run/docker.sock`.

0 Karma

rfujara_splunk
Splunk Employee
Splunk Employee

Could you please check this Docker docs page:
https://docs.docker.com/install/linux/linux-postinstall/#manage-docker-as-a-non-root-user

It may be because the user running Splunk is not allowed to talk to Docker.

davietch
Path Finder

Turns out the permissions were OK but I needed a login/logout to apply the permissions.. Just that.

Thanks all !

0 Karma

pdrieger_splunk
Splunk Employee
Splunk Employee

Hi @davietch, can you please cross check this answer and see if connecting to tcp instead of the unix://var/run/docker.sock helps in your case, too: https://answers.splunk.com/answers/811981/deep-learning-toolkit-setup.html

0 Karma

davietch
Path Finder

Hi,

No, it didn't work:

  • With Localhost:

    HTTPConnectionPool(host='localhost', port=2375): Max retries exceeded with url: /v1.35/_ping (Caused by : [Errno 111] Connection refused)

  • With the name of the server:

    HTTPConnectionPool(host='myservername', port=2375): Max retries exceeded with url: /v1.35/_ping (Caused by : [Errno 111] Connection refused)

0 Karma

pdrieger_splunk
Splunk Employee
Splunk Employee

Hi @davietch , to me it looks like your docker host can not be reached from the DLTK which tries to establish a connection but fails.

Let us know if it can be resolved with that.

0 Karma

PavelP
Motivator

what is the host OS? CentOS/Ubuntu? Try to disable SELinux/Apparmor.

0 Karma

davietch
Path Finder

Hi,

My OS is RedHat 7.7

SELinux is already disabled:

[aaa@XXXX~]$ sestatus
SELinux status:                 disabled

I don't see any Apparmor software installed.

0 Karma
Get Updates on the Splunk Community!

A Season of Skills: New Splunk Courses to Light Up Your Learning Journey

There’s something special about this time of year—maybe it’s the glow of the holidays, maybe it’s the ...

Announcing the Migration of the Splunk Add-on for Microsoft Azure Inputs to ...

Announcing the Migration of the Splunk Add-on for Microsoft Azure Inputs to Officially Supported Splunk ...

Splunk Observability for AI

Don’t miss out on an exciting Tech Talk on Splunk Observability for AI! Discover how Splunk’s agentic AI ...