Problem connecting FDP server to FDP Index server #730
-
Hi everyone, I'm trying to connect my FDP server to the FDP Index server for testing purposes by having the Index and the FDP server run on the same machine. In the Index server's application.yml, I have set:instance:
intex: true
...
server:
forward-headers-strategy: NATIVE In the FDP (normal) server's application-development.yml, I have:ping:
enabled: true
endpoint: http://localhost:8080 However, despite this setup, the FDP server and the Index server do not connect as expected. I’m not seeing any registration or successful pings between them. Is there something else I need to configure or be aware of when connecting an FDP server to its own Index server for local testing? Thanks in advance for any help or advice! |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 2 replies
-
Hi @welharrak , could you tell me which version of the FDP and FDP-client you are using? |
Beta Was this translation helpful? Give feedback.
-
Hi @welharrak, to help us find the cause, could you post the contents of your docker compose file, or at least a minimal reproducible example? I do see a few issues in you yaml snippets above:
In addition, could you post the relevant part of the fdp logs? You can get them using e.g. |
Beta Was this translation helpful? Give feedback.
-
Here's an example compose file for local testing that should work: name: fdp117
services:
mongo:
image: "mongo:8.0"
healthcheck:
test: |
[ $(mongosh --quiet --host localhost:27017 --eval "db.runCommand('ping').ok") = 1 ] || exit 1
start_interval: 3s
start_period: 30s
fdp:
image: "fairdata/fairdatapoint:1.17"
environment:
SERVER_PORT: 8082
INSTANCE_CLIENTURL: http://localhost:8083
INSTANCE_PERSISTENTURL: http://localhost:8083
# https://github.com/FAIRDataTeam/FAIRDataPoint/blob/6587b09dcefb0e4fc13fd1f045c0c6dd47bd61fa/src/main/java/nl/dtls/fairdatapoint/api/dto/settings/SettingsPingDTO.java#L41
PING_ENABLED: true
PING_ENDPOINTS: http://fdp-index:8084
PING_INTERVAL: 5000 # ms
depends_on:
mongo:
condition: service_healthy
healthcheck:
test: wget -q --spider http://localhost:8082 || exit 1
start_interval: 3s
start_period: 30s
fdp-client:
image: "fairdata/fairdatapoint-client:1.17"
ports:
- "127.0.0.1:8083:80"
environment:
FDP_HOST: fdp:8082
depends_on:
fdp:
condition: service_healthy
fdp-index:
image: "fairdata/fairdatapoint:1.17"
environment:
SERVER_PORT: 8084
INSTANCE_INDEX: true
INSTANCE_CLIENTURL: http://localhost:8085
INSTANCE_PERSISTENTURL: http://localhost:8085
FDP_MONGO_DB: 'fdp-index'
PING_ENABLED: false
depends_on:
mongo:
condition: service_healthy
healthcheck:
test: wget -q --spider http://localhost:8084 || exit 1
start_interval: 3s
start_period: 30s
fdp-index-client:
image: "fairdata/fairdatapoint-client:1.17"
ports:
- "127.0.0.1:8085:80"
environment:
APP: fairdatapoint-index
FDP_HOST: fdp-index:8084
depends_on:
fdp-index:
condition: service_healthy The
|
Beta Was this translation helpful? Give feedback.
Here's an example compose file for local testing that should work: