FAIRDataTeam / FAIRDataPoint

https://www.fairdatapoint.org
MIT License
60 stars 39 forks source link

Q: error on startup #430

Closed markwilkinson closed 1 year ago

markwilkinson commented 1 year ago

The Question

Any suggestions how to troubleshoot this startup error:

fdp_1 | 2023-06-29 08:36:52,188 6934 [main] ERROR org.springframework.boot.SpringApplication - Application run failed fdp_1 | org.yaml.snakeyaml.constructor.DuplicateKeyException: while constructing a mapping fdp_1 | in 'reader', line 1, column 1: fdp_1 | instance: fdp_1 | ^ fdp_1 | found duplicate key instance fdp_1 | in 'reader', line 16, column 1: fdp_1 | instance: fdp_1 | ^

I have another FDP running on the same machine, but they should be completely isolated - different networks, different ports, different volumes. I have 5 FDPs running on my other server and they're all quite happy together!

Additional context

version: "3"
services:

  fdp_client:
    image: fairdata/fairdatapoint-client:1.16
    hostname: fdpclient
    restart: always
    environment:
      FDP_HOST: fdp
    volumes:
      - ./fdp/variables.scss:/src/scss/custom/_variables.scss:ro
      - ./fdp/assets:/usr/share/nginx/html/assets:ro
      - ./fdp/favicon.ico:/usr/share/nginx/html/favicon.ico:ro
    depends_on:
      - fdp
    ports:
      - 9090:80  # You should/must close this port, if you are using hitch
    networks:
      - index-default

  graphdb:
    image: ontotext/graphdb:10.1.2
    restart: always
    hostname: graphdb
    ports:
      - 9091:7200
    volumes:
      - index-graphdb:/opt/graphdb/home
    networks:
      - index-default

  fdp:
    image: fairdata/fairdatapoint:1.15.0
    restart: always
    hostname: fdp
    volumes:
      - ./fdp/application-index.yml:/fdp/application.yml:ro
    depends_on:
      - mongo
      - graphdb
    networks:
      - index-default
  # Mongo for FDP server    
  mongo:
    image: mongo:4.2.3
    hostname: mongo
    restart: always
    volumes:
      - index-mongo-data:/data/db
      - index-mongo-init:/docker-entrypoint-initdb.d/
    networks:
      - index-default

volumes:
  index-graphdb:
    external: true
  index-mongo-data:
    external: true
  index-mongo-init:
    external: true
  index-fdp-server:
    external: true

networks:
  index-default:
markwilkinson commented 1 year ago

any thoughts on this? It's blocking a project I'm responsible for.

Thanks!

janslifka commented 1 year ago

Hello Mark,

According to the posted error, it seems like there is a duplicate key instance. My guess is that the problem is in ./fdp/application-index.yml. Can you check that file on line 1 and line 16 to see if there is a duplicate key? Maybe it is some copy-paste error?

markwilkinson commented 1 year ago

That was it... sorry to bother you!