IHTSDO / snowstorm

Scalable SNOMED CT Terminology Server using Elasticsearch
Other
203 stars 80 forks source link

SNOMED CT Browser makes API request without branch #601

Closed adem closed 1 month ago

adem commented 3 months ago

I've set up Snowstorm on a server without an internet connection and successfully imported the June 2024 package snapshot. However, when I open SNOMED CT Browser, no data is loaded. I noticed that, in contrast to my local test installation, the request URL is lacking the branch portion - see screenshot.

image

Notice the double slash, in between which the branch name MAIN should be. It's worth noting that because the server has no internet connection and I am SSH tunneling the port of the browser application.

Here's my docker-compose.yml:

version: '2.1'
services:
  elasticsearch:
    image: docker.elastic.co/elasticsearch/elasticsearch:8.11.1
    container_name: elasticsearch
    environment:
      - discovery.type=single-node
      - xpack.security.enabled=false
      - node.name=snowstorm
      - cluster.name=snowstorm-cluster
      - "ES_JAVA_OPTS=-Xms4g -Xmx4g"
    volumes:
      - elastic:/usr/share/elasticsearch/data
    networks:
      elastic:
        aliases:
         - es
    healthcheck:
      test: ["CMD", "curl", "-f", "http://es:9200"]
      interval: 1s
      timeout: 1s
      retries: 60
    ports:
      - 127.0.0.1:9200:9200
    mem_reservation: 4g

  snowstorm:
    image: snomedinternational/snowstorm:latest
    container_name: snowstorm
    restart: always
    depends_on:
      elasticsearch:
        condition: service_healthy
    entrypoint: java -Xms2g -Xmx4g --add-opens java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED -cp @/app/jib-classpath-file org.snomed.snowstorm.SnowstormApplication --elasticsearch.urls=http://es:9200
    networks:
      elastic:
        aliases:
         - snowstorm
    ports:
      - 8080:8080

  browser:
    image: snomedinternational/snomedct-browser:latest
    container_name: browser
    depends_on:
      - snowstorm
    links:
      - snowstorm:snowstorm
    networks:
      - elastic
    environment:
      - API_HOST=http://snowstorm:8080/
    ports:
      - 11080:80
    restart: always

networks:
  elastic:

volumes:
  elastic:

Any help is greatly appreciated!

adem commented 3 months ago

I noticed that this only happens when importing a SNAPSHOT as opposed to doing a FULL import.

kaicode commented 3 months ago

Please try making a GET request to the /codesystems endpoint to see what codesystems are available. This is the first call the browser makes to discover what Editions are available.

For example: https://browser.ihtsdotools.org/snowstorm/snomed-ct/codesystems (Note: our public Snowstorm uses server.servlet.context-path=/snowstorm/snomed-ct rather than just /)

kaicode commented 3 months ago

Also note that the import process is asynchronous it's necessary to wait for an Import Complete message in the logs.

kaicode commented 1 month ago

This issue seems to have gone quiet. Closing for now. Please reopen if you are still facing issues.