Closed sey323 closed 2 years ago
The simple answer is that you are sending your requests to the wrong API. Even worse, you are using outdated sample requests.
The sample requests you found were for version v0.5 of the CH and will not longer work. I wasn't aware that those were still in the repository, so I deleted them. Please check the IDS-G-Pre for a more up-to-date version.
Regarding the APIs, have a look at this picture:
It is important to understand that the Clearing House API (IDS)
(multipart/IDSCP2) is the endpoint for communication with the connectors. And it is provided by the Clearing House Processors in conjunction with the Trusted Connector. So, if you did not build the processors nor run the Trusted Connector, the API of the CH will not be available.
The Clearing House App you build provides the APIs Logging Service API
, Document API
and Keyring API
, which are all internal APIs.
Thanks!
First, IDS-G-Pre could not be confirmed.. its appear 404. I would like you to confirm that the URL is correct.
Second. This mean..
And it is provided by the Clearing House Processors in conjunction with the Trusted Connector. So, if you did not build the processors nor run the Trusted Connector, the API of the CH will not be available.
Does it mean that Fiware True Connector cannot connect to this CH? I lookat this page and put the following setting in Fiware True Connector.
CLEARING_HOUSE=http://{my-clearing-house-ip}/message/log/test-message
Maybe this CH to Fiware True Connector connection is not supported? Is it possible to connect only to the Trusted Connector?
The IDS-G-Pre is an internal repository of the IDSA. All members of the IDSA may get access, but you have to contact them if you do not have access already (and 404 indicates that you don't).
Does it mean that Fiware True Connector cannot connect to this CH? I lookat this page and put the following setting in Fiware True Connector.
No, all connectors may communicate with the CH. But, the CH as a component runs on the Trusted Connector.
I see. I`m not member so I can't browse. Please update the README instead of delete it. Is it possible?
the CH as a component runs on the Trusted Connector.
Does HC need to run together Trusted Connector? docker-compose that i created is here. Now, i only build CH.
version: '3.0'
services:
logging-service:
container_name: "logging-service"
build:
context: .
dockerfile: ./docker/logging-service-multistage.Dockerfile
depends_on:
- document-api
- keyring-api
- logging-service-mongo
environment:
# Allowed levels: Off, Error, Warn, Info, Debug, Trace
- API_LOG_LEVEL=Debug
ports:
- "8000:8000"
volumes:
- ./clearing-house-app/logging-service/Rocket.toml:/server/Rocket.toml
- ./clearing-house-app/logging-service/keys:/server/keys
- ./clearing-house-app/logging-service/certs:/server/certs
document-api:
container_name: "document-api"
build:
context: .
dockerfile: ./docker/document-api-multistage.Dockerfile
depends_on:
- keyring-api
- document-mongo
environment:
# Allowed levels: Off, Error, Warn, Info, Debug, Trace
- API_LOG_LEVEL=Info
ports:
- "8001:8001"
volumes:
- ./clearing-house-app/document-api/Rocket.toml:/server/Rocket.toml
- ./clearing-house-app/certs:/server/certs
keyring-api:
container_name: "keyring-api"
build:
context: .
dockerfile: ./docker/keyring-api-multistage.Dockerfile
depends_on:
- keyring-mongo
environment:
# Allowed levels: Off, Error, Warn, Info, Debug, Trace
- API_LOG_LEVEL=Info
ports:
- "8002:8002"
volumes:
- ./clearing-house-app/keyring-api/init_db:/server/init_db
- ./clearing-house-app/keyring-api/Rocket.toml:/server/Rocket.toml
- ./clearing-house-app/certs:/server/certs
logging-service-mongo:
container_name: "logging-service-mongodb"
image: mongo:latest
environment:
MONGO_INITDB_DATABASE: process
volumes:
- ./data/mongo/logging-service:/data/db
document-mongo:
container_name: "document-mongo"
image: mongo:latest
environment:
MONGO_INITDB_DATABASE: document
volumes:
- ./data/mongo/document-service:/data/db
keyring-mongo:
container_name: "keyring-mongo"
image: mongo:latest
environment:
MONGO_INITDB_DATABASE: keyring
volumes:
- ./data/mongo/keyring-service:/data/db
Is it the reason why you can't connect to Fiware True Connector because you didn't build Trusted Connector together?
Does HC need to run together Trusted Connector
Yes, this implementation uses the Trusted Connector as a basis, which means a TC must be run together with the other docker containers.
Is it the reason why you can't connect to Fiware True Connector because you didn't build Trusted Connector together?
I don't really understand the question. What do you mean with "connect"? Communication of Connectors is done via protocols like IDS multipart or IDSCP2. This implementation of the Clearing House Service is based on the Trusted Connector not the True Container. As of now, there are no standardized interfaces inside the connectors (DSC, EDC, True Connector, Trusted Connector, etc.) to integrate apps. So, the connector used to integrate the app is not interchangeable without modifying the app.
Oh.. Sorry. I misunderstood that this CH can be used in common with all IDS Connectors, including Trusted and True connectors.I found that CH needs to be built for each IDS Connector. I try using Trusted Connecctor. Thanks!
Finally, could you give me a sample request to check the API operation without Trusted Connector? Or Could you list it in READEME?
Sorry, but I don't have sample requests for the internal api. It recently changed and is scheduled to change again soon.
The best advice I can give you is to start from the other direction and first setup TC with the Clearing House processors. There are integration tests you can run (ignore the idscp2 tests for the beginning, only use the multipart tests) and you won't have to worry about how the requests need to look like.
If you run netcat -p -l 8000
instead of the logging-service
, and run one of the tests, you can see the requests the TC tries to forward to the internal api.
Sorry for the late reply.
I will try to see if I can connect using TC.Thanks for the answer.
Hi, I`m trying to create Clearing House App on docker and to connect fiware-true-connector.
First, I create only Clearing House App(exclued Clearing House Processor) and i requested sample request by Postman.(Daps use default one.) But The following message was returned.
At that time, bellow log is following on Crearing House App.
I thought jwt token is return complete, but its key may not set on
ApiKey
(this point above).sample curl requests is here i requesed. from this docs.
Not this case, I also got the same warn when connect by the Fiware True Connector. Why
Why happen this warning? Please help me with this issue... Thanks.