Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when trying to register AAS service/registry #143

Open
AnVentura opened this issue Oct 10, 2024 · 9 comments
Open

Error when trying to register AAS service/registry #143

AnVentura opened this issue Oct 10, 2024 · 9 comments

Comments

@AnVentura
Copy link

Hi, can you help me?
I am using Bayx to create and manipulate my AAS, and i want to use EDC-EXTENSION-FOR-AAS to be able to send AAS.
But i am not being able to register AAS services by URL, and register AAS registry by URL, but i am not understanding how i can do a successful answer from both endpoints. My AAS services' endpoint is at host.docker.internal:8081, and my registry is at two endpoint one for shell (8082) and another one for submodels (8083) the whole project is in the docker.

When i try to register the AAS registry this shows up
imagem

And when i do the other one it shows this
imagem

Can you help me please?

@carlos-schmidt
Copy link
Collaborator

Hi,
currently, Basyx Registry/Service is not supported as it utilizes different APIs than the FA³ST implementations. But we are exploring the possibility of Basyx support in the future.

@AnVentura
Copy link
Author

AnVentura commented Oct 11, 2024

hi @carlos-schmidt
I noticed it exists a FA3ST Registry Repository, it is possible to register those AAS Registry to the edc extension?

@carlos-schmidt
Copy link
Collaborator

Yes, registering a FA³ST registry to the extension is possible using HTTP POST <edc>:<port>/api/registry?url=<registry-url>

@carlos-schmidt
Copy link
Collaborator

After some updates to the extension, Basyx AAS Environment is now supported by the extension. I don't know if invoking operations on Basyx AAS works as I have not tested that.

As for the registry, I also have not tested it, but it should be supported if it has the same output format and endpoints as the FA³ST registry.

@AnVentura
Copy link
Author

AnVentura commented Oct 29, 2024

Hi @carlos-schmidt ,
So if i put the endpoint of basyxs, i will have the AAS that i have inside of basyxs in edc?
I am having other problem, i am using the example in docker, and the example it is not working

I tried with the URL http://host.docker.internal:8081/shells, i also tried without the "/shells", i also tried with localhost, but it was not reachable
Because i have everything inside a docker container
imagem

@carlos-schmidt
Copy link
Collaborator

Can you provide your setup structure (maybe docker-compose) so I can reproduce the issue?

So if i put the endpoint of basyxs, i will have the AAS that i have inside of basyxs in edc?

Yes, that should work. If your Basyx endpoints are

{protocol}://{host}:{port}/shells
{protocol}://{host}:{port}/submodels
{protocol}://{host}:{port}/conceptDescriptions

then you have to register it with this url: {protocol}://{host}:{port} (in your example: http://host.docker.internal:8081)

@fvolz
Copy link
Collaborator

fvolz commented Oct 31, 2024

If I understood correctly, docker-compose up is used in the example folder and Basyx AAS Service is already running on port 8081.
With FA³ST Service, we are usually entering "https://host.docker.internal:443/api/v3.0" so that it works. In your case, it might be "http://host.docker.internal:8081/api/v3.0" for Basyx

@AnVentura
Copy link
Author

AnVentura commented Nov 5, 2024

Hi @carlos-schmidt and @fvolz
In order to get those requests in basyxs, the endpoints are:

http://host.docker.internal:8081/shells
http://host.docker.internal:8081/submodels
http://host.docker.internal:8081/concept-descriptions

I am registering the URL, i tried both endpoints [{protocol}://{host}:{port}](http://localhost:8281/api/service?url=http://host.docker.internal:8081) and http://localhost:8281/api/registry?url=http://host.docker.internal:8081 and the error continues

Docker Compose

This is the docker compose that i am using. And I'm running EDC-Extension-for-AAS, being running java -Dedc.fs.config=./example/configurations/provider.properties -jar ./example/build/libs/dataspace-connector.jar and java -Dedc.fs.config=./example/configurations/consumer.properties -jar ./example/build/libs/dataspace-connector.jar

version: "3.9"
services:
  mongo:
    image: mongo:5.0.10
    # Provide mongo config
    restart: always
    environment:
      MONGO_INITDB_ROOT_USERNAME: mongoAdmin
      MONGO_INITDB_ROOT_PASSWORD: mongoPassword
    # Set health checks to wait until mongo has started
    #volumes:
    # -  ./data-vol:/data/db 
    healthcheck:
      test: mongo
      interval: 10s
      start_period: 5s
      retries: 5
    # Maps tcp port to host
    #ports:
    #  - 27017:27017
    
  mqtt:
    image: eclipse-mosquitto:2.0.15
    ports:
      - 1884:1884
    volumes:
      - ./mosquitto:/mosquitto/config
    healthcheck:
      test: ["CMD-SHELL", mosquitto_sub -p 1884 -t 'topic' -C 1 -E -i probe -W 3]
      interval: 5s
      retries: 3
      start_period: 1s
      timeout: 10s   
      
  aas-env:
    image: eclipsebasyx/aas-environment:2.0.0-SNAPSHOT
    volumes:
      - ./aas-env.properties:/application/application.properties
      - ./aas:/application/aas
    ports:
        - 8081:8081
    depends_on:
        mongo:
            condition: service_healthy
        mqtt:
            condition: service_healthy
        aas-registry:
            condition: service_healthy
        sm-registry:
            condition: service_healthy
            
  aas-registry:
    image: eclipsebasyx/aas-registry-log-mongodb:2.0.0-SNAPSHOT
    ports:
      - 8082:8080
    volumes:
      - ./aas-registry.yml:/workspace/config/application.yml
    depends_on:
      mongo:
        condition: service_healthy
    
  sm-registry:
    image: eclipsebasyx/submodel-registry-log-mongodb:2.0.0-SNAPSHOT
    ports:
      - 8083:8080
    volumes:
      - ./sm-registry.yml:/workspace/config/application.yml
    depends_on:
      mongo:
        condition: service_healthy

  aas-discovery:
    image: eclipsebasyx/aas-discovery:2.0.0-SNAPSHOT
    ports:
      - 8084:8081
    volumes:
      - ./aas-discovery.properties:/application/application.properties
    depends_on:
      mongo:
        condition: service_healthy
      
  aas-web-ui_v2:
    image: eclipsebasyx/aas-gui:v2-240801
    container_name: aas-web-ui_v2
    ports:
      - "3000:3000"
    environment:
      AAS_REGISTRY_PATH: "http://localhost:8082"
      SUBMODEL_REGISTRY_PATH: "http://localhost:8083"
      AAS_DISCOVERY_PATH: "http://localhost:8084"
      AAS_REPO_PATH: "http://localhost:8081/shells"
      SUBMODEL_REPO_PATH: "http://localhost:8081/submodels"
      CD_REPO_PATH: "http://localhost:8081/concept-descriptions"
    restart: always
    depends_on:
      aas-env:
        condition: service_healthy

  databridge:
    image: eclipsebasyx/databridge:1.0.0-milestone-08
    container_name: databridge
    volumes:
      - ./databridge:/usr/share/config
    depends_on:
      aas-env:
        condition: service_healthy
      mqtt:
        condition: service_healthy
      aas-registry:
        condition: service_healthy



@fvolz
Copy link
Collaborator

fvolz commented Nov 13, 2024

I tried the following: Built EDC Extension 2.2.0 and started provider with java -Dedc.fs.config=./example/configurations/provider.properties -jar ./example/build/libs/dataspace-connector.jar

Docker-compose up with .yml

version: "3.9"
services:
  mongo:
    image: mongo:5.0.10
    # Provide mongo config
    restart: always
    environment:
      MONGO_INITDB_ROOT_USERNAME: mongoAdmin
      MONGO_INITDB_ROOT_PASSWORD: mongoPassword
    # Set health checks to wait until mongo has started
    #volumes:
    # -  ./data-vol:/data/db 
    healthcheck:
      test: mongo
      interval: 10s
      start_period: 5s
      retries: 5
    # Maps tcp port to host
    #ports:
    #  - 27017:27017
    
  mqtt:
    image: eclipse-mosquitto:2.0.15
    ports:
      - 1883:1883
    volumes:
      - ./mosquitto:/mosquitto/config
    healthcheck:
      test: ["CMD-SHELL", mosquitto_sub -p 1883 -t 'topic' -C 1 -E -i probe -W 3]
      interval: 5s
      retries: 3
      start_period: 1s
      timeout: 10s   
      
  aas-env:
    image: eclipsebasyx/aas-environment:2.0.0-SNAPSHOT
    ports:
        - 8081:8081
    depends_on:
        mongo:
            condition: service_healthy
        mqtt:
            condition: service_healthy

I created some submodels by POST to http://localhost:8081/submodels
And shared them with http://localhost:8281/api/service?url=http://localhost:8081

The LOG should say: INFO 2024-11-13T14:10:25.2466402 [EDC4AAS Extension] [Service Pipeline] Added 15, removed 0 assets

Explanation: The AAS Environment is running in docker but no network is specified in the docker-compose file defaulting to default bridge network. The EDC Extension is also running locally so both services should be available through localhost. host.docker.internal is usually only used to access the host from within a container.
Both http://localhost:8081/submodels and http://localhost:8281/api/selfDescription are accessible in the host browser.

Let me know if that solved it.

In short http://localhost:8081 should be used as URL.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants