eclipse-basyx / basyx-java-server-sdk

MIT License
59 stars 47 forks source link

[BUG] Unable to access from local network #495

Closed roberto-lopardo-aimen closed 1 month ago

roberto-lopardo-aimen commented 1 month ago

Hello.

When I access the web-ui from the same PC the docker compose is running, everything works just fine. But when I access it from another PC on the same network only the web-ui loads, whenever I click on an asset it errors out. image

I've tried changing the environment variables to localhost, 0.0.0.0 and the server's IP but nothing works:

  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"

Could you please help me figure out what's going on? Have you tried using the web-ui from another PC?

Thanks in advance, great work!

aaronzi commented 1 month ago

Hello @roberto-lopardo-aimen,

to fix the problem, you have to set the basyx.externalurl in the properties file of the AAS environment. For example if the address of the AAS Env is http://localhost:8081 on the PC where you ran the docker-compose.yml, then you would have to set the external URL as follows:

http://ip-of-same-pc-:8081

This will fix the problem you encountered here with the registry integration. Here is a link to our wiki describing the registry integration feature.

aaronzi commented 1 month ago

Hello @roberto-lopardo-aimen,

to fix the problem, you have to set the basyx.externalurl in the properties file of the AAS environment. For example if the address of the AAS Env is http://localhost:8081 on the PC where you ran the docker-compose.yml, then you would have to set the external URL as follows:

http://ip-of-same-pc-:8081

This will fix the problem you encountered here with the registry integration. Here is a link to our wiki describing the registry integration feature.