Closed sebplorenz closed 1 year ago
@sebplorenz can you please provide us with a reproducible setup? In the best-case use this Postman collection
I cannot use a Postman Collection since the Broker, that this collection is talking to, is not starting up!
This is my setup. It was working without problems as long as there was content in the database. Now, after cleaning the database, it is not starting up anymore:
version: '2'
services:
broker-core:
image: registry.gitlab.cc-asp.fraunhofer.de/eis-ids/broker/core:5.0.1-MDS
restart: always
volumes:
- /app/broker/cert:/etc/cert
environment:
- SPARQL_ENDPOINT=http://mobids-fuseki:3030/connectorData
- SPARQL_URL=http://mobids-fuseki:3030/connectorData
- ELASTICSEARCH_HOSTNAME=mobids-elasticsearch
- SHACL_VALIDATION=true
- DAPS_VALIDATE_INCOMING=true
- COMPONENT_URI=https://broker.mobilitydataspace.io
- COMPONENT_CATALOGURI=https://broker.mobilitydataspace.io/connectors/
- SSL_JAVAKEYSTORE=/etc/cert/ids.broker.mobilitydataspace.io.p12
expose:
- "8080"
ports:
- "8080:8080"
links:
- back-end:backend
mobids-fuseki:
image: registry.gitlab.cc-asp.fraunhofer.de/eis-ids/broker/fuseki:5.0.2
restart: always
volumes:
- broker_mobids-fuseki:/fuseki
expose:
- "3030"
ports:
- "3030:3030"
mobids-elasticsearch:
image: elasticsearch:7.16.2
restart: always
environment:
- http.port=9200
- http.cors.enabled=true
- http.cors.allow-origin=https://catalog.mobilitydataspace.io #Change the Value
- http.cors.allow-headers=X-Requested-With,X-Auth-Token,Content-Type,Content-Length,Authorization
- http.cors.allow-credentials=true
- discovery.type=single-node
volumes:
- broker_mobids-esdata:/usr/share/elasticsearch/data
expose:
- "9200"
ports:
- "9200:9200"
mobids-searchfrontend:
image: registry.gitlab.cc-asp.fraunhofer.de/eis-ids/broker/frontend:5.0.1
restart: always
expose:
- "80"
ports:
- "80:80"
environment:
- "REACT_APP_BROKER_URL=https://catalog.mobilitydataspace.io"
mongodb:
image: mongo:latest
restart: always
volumes:
- broker_db:/data/db
back-end:
image: registry.gitlab.cc-asp.fraunhofer.de/eis-ids/broker/mongodb-handler:4.2.7
restart: always
expose:
- "4000"
ports:
- "4000:4000"
environment:
- MONGODB_ENDPOINT=mongodb://mongodb:27017/users
- JWT_SECRET=anewstring
- ADMIN_PASSWORD=xyz
- BROKER_URL=http://broker-core:8080
- LOG4J_FORMAT_MSG_NO_LOOKUPS=true
links:
- mongodb:mongo
volumes:
broker_mobids-fuseki:
driver: local
driver_opts:
type: none
o: bind
device: /app/broker/db/fuseki
broker_mobids-esdata:
driver: local
driver_opts:
type: none
o: bind
device: /app/broker/db/esdata
broker_db:
driver: local
driver_opts:
type: none
o: bind
device: /app/broker/db/broker
Hab Dir geantwortet.
Von: Tim Wirtz @.> Gesendet: Mittwoch, 23. November 2022 09:35 An: International-Data-Spaces-Association/metadata-broker-open-core @.> Cc: Lorenz, Sebastian @.>; Mention @.> Betreff: Re: [International-Data-Spaces-Association/metadata-broker-open-core] Broker does not start when database is empty (Issue #126)
@sebplorenzhttps://github.com/sebplorenz can you please provide us with a reproducible setup? In the best-case use this Postman collectionhttps://github.com/Mobility-Data-Space/MDS-Broker-Core/blob/main/doc/IDS%20Broker%20ES%20Tests%20with%20MDS.postman_collection.json
— Reply to this email directly, view it on GitHubhttps://github.com/International-Data-Spaces-Association/metadata-broker-open-core/issues/126#issuecomment-1324706149, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AA7YBCJO2W4MYD3O4YT6Q73WJXJLLANCNFSM6AAAAAASIV57UA. You are receiving this because you were mentioned.Message ID: @.***>
In summary:
How did you exactly clean the Fuseki?
I shut down the setup, removed everything from the docker volume directories and started it all up again. As if it would be started on a new server.
to be sure you mean that you (manuelly) remove the content of the folder
Why not using:
https://docs.docker.com/engine/reference/commandline/compose_down/
is says that Stops containers and removes containers, networks, volumes, and images created by up.
would that be what you want you want to achieve?
Yes, I removed these folders. That is not the problem. The problem is, that the Broker does not startup now since the databases are empty. What can be the reason that a request to http://mobids-fuseki:3030/connectorData/sparql is responded with a 404?
@sebplorenz, no idea 🙈. I never had that. Í cleaned my setup either with Docker-compose down or using the fuseki UI by removing and insert again the data set. The elastic was cleaned by curl -X DELETE 'http://localhost:9200/_all'
. We discussed it internally and believe that "simply" removing the volumnes might cause problems due acitons docker is supposed to take when it initializes the containers.
Could you please try with a fresh setup: either Docker-compose down or my manual approach?
@sebplorenz does the proposed solution work for you ?
After cleaning all databases and doing a fresh start of the Broker version
registry.gitlab.cc-asp.fraunhofer.de/eis-ids/broker/core:5.0.2
andregistry.gitlab.cc-asp.fraunhofer.de/eis-ids/broker/fuseki:5.0.2
I'm getting the following broker log:Obviously the Broker cannot connect to the fuseki with resource or schema connectorData