Get exceptions during docker-base machine starts

I keep on getting this exception after starting my docker setup and opening a new notebook.
It keeps me out of python and SQL executions.

What can be done?

docker-compose-datalore-1    | 09:16:38.416 INFO  [Datalore EDT Manager] o.a.h.c.h.i.classic.HttpRequestRetryExec Recoverable I/O exception (java.io.IOException) caught when processing request to {}->unix://localhost:2375
docker-compose-datalore-1    | 09:16:38.417 ERROR [Datalore EDT Manager] j.d.n.s.c.a.i.SingleInstanceTypeAgentPool Failed to create instance when refilling pool
docker-compose-datalore-1    | java.lang.RuntimeException: java.io.IOException: com.sun.jna.LastErrorException: [13] Permission denied
docker-compose-datalore-1    | 	at com.github.dockerjava.httpclient5.ApacheDockerHttpClientImpl.execute(ApacheDockerHttpClientImpl.java:179)
docker-compose-datalore-1    | 	at com.github.dockerjava.httpclient5.ApacheDockerHttpClient.execute(ApacheDockerHttpClient.java:9)
docker-compose-datalore-1    | 	at com.github.dockerjava.core.DefaultInvocationBuilder.execute(DefaultInvocationBuilder.java:228)
docker-compose-datalore-1    | 	at com.github.dockerjava.core.DefaultInvocationBuilder.get(DefaultInvocationBuilder.java:202)
docker-compose-datalore-1    | 	at com.github.dockerjava.core.DefaultInvocationBuilder.get(DefaultInvocationBuilder.java:74)
docker-compose-datalore-1    | 	at com.github.dockerjava.core.exec.InspectImageCmdExec.execute(InspectImageCmdExec.java:28)
docker-compose-datalore-1    | 	at com.github.dockerjava.core.exec.InspectImageCmdExec.execute(InspectImageCmdExec.java:13)
docker-compose-datalore-1    | 	at com.github.dockerjava.core.exec.AbstrSyncDockerCmdExec.exec(AbstrSyncDockerCmdExec.java:21)
docker-compose-datalore-1    | 	at com.github.dockerjava.core.command.AbstrDockerCmd.exec(AbstrDockerCmd.java:35)
docker-compose-datalore-1    | 	at com.github.dockerjava.core.command.InspectImageCmdImpl.exec(InspectImageCmdImpl.java:40)
docker-compose-datalore-1    | 	at jetbrains.datalore.notebook.server.computation.agentsManager.impl.instanceManager.docker.DockerInstanceManager.doCreate(DockerInstanceManager.kt:40)
docker-compose-datalore-1    | 	at jetbrains.datalore.notebook.server.computation.agentsManager.impl.instanceManager.core.BaseInstanceManager.doCreate(BaseInstanceManager.kt:11)
docker-compose-datalore-1    | 	at jetbrains.datalore.notebook.server.computation.agentsManager.impl.instanceManager.core.BaseInstanceManager.create(BaseInstanceManager.kt:6)
docker-compose-datalore-1    | 	at jetbrains.datalore.notebook.server.computation.agentsManager.impl.l.createInstances(l.java:13)
docker-compose-datalore-1    | 	at jetbrains.datalore.notebook.server.computation.agentsManager.impl.SingleInstanceTypeAgentPool.d(SingleInstanceTypeAgentPool.java:64)
docker-compose-datalore-1    | 	at jetbrains.ocelot.base.edt.server.a.lambda$wrap$1(a.java:44)
docker-compose-datalore-1    | 	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
docker-compose-datalore-1    | 	at java.base/java.util.concurrent.FutureTask.run(Unknown Source)
docker-compose-datalore-1    | 	at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown Source)
docker-compose-datalore-1    | 	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
docker-compose-datalore-1    | 	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
docker-compose-datalore-1    | 	at java.base/java.lang.Thread.run(Unknown Source)
docker-compose-datalore-1    | Caused by: java.io.IOException: com.sun.jna.LastErrorException: [13] Permission denied
docker-compose-datalore-1    | 	at com.github.dockerjava.transport.DomainSocket.<init>(DomainSocket.java:63)
docker-compose-datalore-1    | 	at com.github.dockerjava.transport.LinuxDomainSocket.<init>(LinuxDomainSocket.java:41)
docker-compose-datalore-1    | 	at com.github.dockerjava.transport.DomainSocket.get(DomainSocket.java:138)
docker-compose-datalore-1    | 	at com.github.dockerjava.httpclient5.ApacheDockerHttpClientImpl$2.createSocket(ApacheDockerHttpClientImpl.java:137)
docker-compose-datalore-1    | 	at org.apache.hc.client5.http.impl.io.DefaultHttpClientConnectionOperator.connect(DefaultHttpClientConnectionOperator.java:125)
docker-compose-datalore-1    | 	at org.apache.hc.client5.http.impl.io.PoolingHttpClientConnectionManager.connect(PoolingHttpClientConnectionManager.java:409)
docker-compose-datalore-1    | 	at org.apache.hc.client5.http.impl.classic.InternalExecRuntime.connectEndpoint(InternalExecRuntime.java:164)
docker-compose-datalore-1    | 	at org.apache.hc.client5.http.impl.classic.InternalExecRuntime.connectEndpoint(InternalExecRuntime.java:174)
docker-compose-datalore-1    | 	at org.apache.hc.client5.http.impl.classic.ConnectExec.execute(ConnectExec.java:135)
docker-compose-datalore-1    | 	at org.apache.hc.client5.http.impl.classic.ExecChainElement.execute(ExecChainElement.java:51)
docker-compose-datalore-1    | 	at org.apache.hc.client5.http.impl.classic.ExecChainElement$1.proceed(ExecChainElement.java:57)
docker-compose-datalore-1    | 	at org.apache.hc.client5.http.impl.classic.ProtocolExec.execute(ProtocolExec.java:172)
docker-compose-datalore-1    | 	at org.apache.hc.client5.http.impl.classic.ExecChainElement.execute(ExecChainElement.java:51)
docker-compose-datalore-1    | 	at org.apache.hc.client5.http.impl.classic.ExecChainElement$1.proceed(ExecChainElement.java:57)
docker-compose-datalore-1    | 	at org.apache.hc.client5.http.impl.classic.HttpRequestRetryExec.execute(HttpRequestRetryExec.java:93)
docker-compose-datalore-1    | 	at org.apache.hc.client5.http.impl.classic.ExecChainElement.execute(ExecChainElement.java:51)
docker-compose-datalore-1    | 	at org.apache.hc.client5.http.impl.classic.ExecChainElement$1.proceed(ExecChainElement.java:57)
docker-compose-datalore-1    | 	at org.apache.hc.client5.http.impl.classic.ContentCompressionExec.execute(ContentCompressionExec.java:128)
docker-compose-datalore-1    | 	at org.apache.hc.client5.http.impl.classic.ExecChainElement.execute(ExecChainElement.java:51)
docker-compose-datalore-1    | 	at org.apache.hc.client5.http.impl.classic.ExecChainElement$1.proceed(ExecChainElement.java:57)
docker-compose-datalore-1    | 	at org.apache.hc.client5.http.impl.classic.RedirectExec.execute(RedirectExec.java:116)
docker-compose-datalore-1    | 	at org.apache.hc.client5.http.impl.classic.ExecChainElement.execute(ExecChainElement.java:51)
docker-compose-datalore-1    | 	at org.apache.hc.client5.http.impl.classic.InternalHttpClient.doExecute(InternalHttpClient.java:178)
docker-compose-datalore-1    | 	at org.apache.hc.client5.http.impl.classic.CloseableHttpClient.execute(CloseableHttpClient.java:67)
docker-compose-datalore-1    | 	at com.github.dockerjava.httpclient5.ApacheDockerHttpClientImpl.execute(ApacheDockerHttpClientImpl.java:175)
docker-compose-datalore-1    | 	... 21 common frames omitted
docker-compose-datalore-1    | Caused by: com.sun.jna.LastErrorException: [13] Permission denied
docker-compose-datalore-1    | 	at com.github.dockerjava.transport.LinuxDomainSocket.connect(Native Method)
docker-compose-datalore-1    | 	at com.github.dockerjava.transport.LinuxDomainSocket.connect(LinuxDomainSocket.java:49)
docker-compose-datalore-1    | 	at com.github.dockerjava.transport.DomainSocket.open(DomainSocket.java:69)
docker-compose-datalore-1    | 	at com.github.dockerjava.transport.DomainSocket.<init>(DomainSocket.java:59)
docker-compose-datalore-1    | 	... 45 common frames omitted

@Netanel_Golani , thanks for raising this question!

This error is specific to macOS hosts since docker implementation there (Docker Desktop) has its own limitations and specificities. I found a workaround that utilizes a third-party proxy server to correctly map docker.sock in the container and in the host.

Important note: we are not going to support macOS as a host system for docker-based installations nor can we guarantee that this solution will work properly (we will update the documentation correspondingly), so please use this workaround as a temporary solution for test purposes only.

Modified docker-compose.yaml template:

version: "3.9"
services:
  datalore:
    image: jetbrains/datalore-server:2022.2
    ports:
      - "8080:8080"
    expose: [ "8081", "5050", "4060" ]
    networks:
      - datalore-agents-network
      - datalore-backend-network
      - socat-network
    volumes:
      - "datalore-storage:/opt/data"
    environment:
      DB_PASSWORD: "changeme"
      DATABASES_DOCKER_NETWORK: "datalore-agents-network"
      ADMIN_API_AUTH_TOKEN: "changeme"
      DOCKER_HOST: "tcp://socat:2375"

  socat:
    image: alpine/socat
    expose:
      - "2375"
    networks:
      - socat-network
    command: TCP4-LISTEN:2375,fork,reuseaddr UNIX-CONNECT:/var/run/docker.sock
    volumes:
      - "/var/run/docker.sock:/var/run/docker.sock"

  postgresql:
    image: jetbrains/datalore-postgres:2022.2
    expose: [ "5432" ]
    networks:
      - datalore-backend-network
    volumes:
      - "postgresql-data:/var/lib/postgresql/data"
    environment:
      POSTGRES_PASSWORD: "changeme"
volumes:
  postgresql-data: { }
  datalore-storage: { }
networks:
  datalore-agents-network:
    name: datalore-agents-network
  datalore-backend-network:
    name: datalore-backend-network
  socat-network:
    name: socat-network
1 Like