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!

Introducing Ingest Actions: Filter, Mask, Route, Repeat

WATCH NOW Ingest Actions (IA) is the best new way to easily filter, mask and route your data in Splunk® ...

Splunk Forwarders and Forced Time Based Load Balancing

Splunk customers use universal forwarders to collect and send data to Splunk. A universal forwarder can send ...

NEW! Log Views in Splunk Observability Dashboards Gives Context From a Single Page

Today, Splunk Observability releases log views, a new feature for users to add their logs data from Splunk Log ...