Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Offline execution in docker mode not working #387

Open
ablack3 opened this issue Jun 13, 2024 · 2 comments
Open

Offline execution in docker mode not working #387

ablack3 opened this issue Jun 13, 2024 · 2 comments
Assignees

Comments

@ablack3
Copy link

ablack3 commented Jun 13, 2024

I have installed Arachne using Docker mode. I'm using fixed versions of the datanode and execution engine images.

I have downloaded the runtime docker image I want to use to run the R code so it does not need to be pulled from a registry.

Here is my docker compose file:

version: '3'
services:

  # Application Postgres Database
  arachne-datanode-postgres:
    image: postgres:15.5-alpine
    container_name: arachne-datanode-postgres
    restart: always
    logging:
      options:
        max-size: 100m
    shm_size: "4g"
    networks:
      - arachne-network
    ports:
      - "127.0.0.1:5434:5432" # Port mapping (host:container)
    volumes:
      - arachne-pg-data:/var/lib/postgresql/data # Volume mount for Arachne PG data
    environment:
      POSTGRES_USER: ohdsi-user
      POSTGRES_PASSWORD: ********
      POSTGRES_DB: arachne_datanode

  # Execution Engine
  arachne-execution-engine:
    image: odysseusinc/execution_engine:2.1.0
    container_name: arachne-execution-engine
    restart: always
    networks:
      - arachne-network
    ports:
      - "127.0.0.1:8888:8888"  # Port mapping (host:container)
    volumes:
      - /tmp:/tmp
      - /var/run/docker.sock:/var/run/docker.sock
      - /tmp/executions:/etc/executions
      - /home/ablack/Desktop/Arachne:/runtimes
    environment:
      - RUNTIMESERVICE_DIST_VERBOSE_LOG=true
      - applyRuntimeDependenciesComparisonLogic=true
      - libraries.location.strategus=strategus
      - DOCKER_IMAGE_DEFAULT=executionengine.azurecr.io/darwin-base:v0.3
      - ANALYSIS_MOUNT=/tmp/executions
      - DOCKER_ENABLE=true
      - RUNTIMESERVICE_DIST_ARCHIVEFOLDER=/runtimes/
      - RUNTIMESERVICE_DIST_VERBOSE_LOG=true
      - RUNTIMESERVICE_DIST_DEFAULTDESCRIPTORFILE=descriptor_base.json
      - DOCKER_REGISTRY_USERNAME=
      - DOCKER_REGISTRY_PASSWORD=
      - DOCKER_REGISTRY_URL=

  # Arachne Datanode Service
  arachne-datanode:
    image: odysseusinc/arachne-datanode-ce:2.0.1
    container_name: arachne-datanode
    restart: always
    networks:
      - arachne-network
    ports:
      - "127.0.0.1:81:8080" # Port mapping (host:container)
    volumes:
      - arachne-datanode-files:/var/arachne/files  # Volume mount for Arachne data
    env_file:
      - /home/ablack/Desktop/Arachne/datanode.env  # Environment variables file
    depends_on:
      - arachne-datanode-postgres
      - arachne-execution-engine

# Volumes for the services
volumes:
  arachne-pg-data:
  arachne-datanode-files:

# Network definition
networks:
  arachne-network:

Arachne starts up and I can log in. I created a simple R script with a print statement to try running in my docker image.

print("it works")

image

I point Arachne to my docker image which already exists on my machine that is not connected to the internet.

When I run the study I get the follow error in the log.

Pulling image [executionengine.azurecr.io/darwin-base:v0.3]

java.util.concurrent.CompletionException: com.github.dockerjava.api.exception.InternalServerErrorException: Status 500: {"message":"Get \"https://executionengine.azurecr.io/v2/\": dial tcp: lookup executionengine.azurecr.io on 127.0.0.53:53: server misbehaving"}

	at java.util.concurrent.CompletableFuture.encodeThrowable(CompletableFuture.java:273)
	at java.util.concurrent.CompletableFuture.completeThrowable(CompletableFuture.java:280)
	at java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1606)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:750)
Caused by: com.github.dockerjava.api.exception.InternalServerErrorException: Status 500: {"message":"Get \"https://executionengine.azurecr.io/v2/\": dial tcp: lookup executionengine.azurecr.io on 127.0.0.53:53: server misbehaving"}

	at com.github.dockerjava.core.DefaultInvocationBuilder.execute(DefaultInvocationBuilder.java:247)
	at com.github.dockerjava.core.DefaultInvocationBuilder.lambda$executeAndStream$1(DefaultInvocationBuilder.java:269)
	... 1 more

image

The registry url is empty but execution engine still tries to pull the image.

@konstjar can we fix this in the next release?

@konstjar konstjar self-assigned this Jun 14, 2024
@dmitrys-odysseus
Copy link
Contributor

@ablack3
With the provided configuration, the property is configured to empty string. It is not the same as having value not configured at all.
Could you please try without specifying DOCKER_REGISTRY_URL key?

@ablack3
Copy link
Author

ablack3 commented Jun 19, 2024

yes I tried removing the DOCKER_REGISTRY_URL environment variable from the dockerfile and got the same error. Looks like you found the bug and fixed it in https://github.com/OHDSI/ArachneExecutionEngine/tree/issue-387-docker-host-check

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants