eclipse-basyx / basyx-java-server-sdk

MIT License
59 stars 46 forks source link

[BUG] Registration of newly uploaded AASes within registry not working for nginx setup #409

Closed barthchristian closed 1 month ago

barthchristian commented 2 months ago

Describe the bug I setup an basyx system, very similar to the BaSyxNGINX example https://github.com/eclipse-basyx/basyx-java-server-sdk/tree/main/examples/BaSyxNGINX, just without discovery service. When trying to upload a new AAS, the server respons with the error message 400. However, the AAS is uploaded into the AAS repository, visible only when browsing directly to it. Within the registry, there is no entry, and thus also nothing is visible in the UI. The same shell worked for an older setup of basyx just without the nginx component. Same behaviour occurs for standard shells like maximal.json.

To Reproduce Steps to reproduce the behavior:

  1. Go to UI
  2. Try to upload an AAS

Expected behavior The AAS should be registered within the registry and sb-registry components.

BaSyx (please complete the following information):

Screenshots image

image

image

Used Asset Administration files (.aasx/.json/.xml) Please drop your AAS files here that were used when the bug was encountered.

BaSyx configuration Provide details about the configuration you used. If possible, attach the configuration as a .zip file.

System (please complete the following information):

Additional context Add any other context about the problem here.

aaronzi commented 2 months ago

Hi @barthchristian,

I would assume that the problem lies in how the registry integration is configured. Can you please share your .properties file for the AAS environment so that I can point you in the right direction?

barthchristian commented 2 months ago

Hi Aaron,

thanks for looking into this! Here is the aas-env.properties: aas-env_properties.txt

barthchristian commented 1 month ago

Hi Aaron, anything suspicious with the aas-env file? I tried several modifications, without success so far. The error still holds. Cheers, Christian

barthchristian commented 1 month ago

I tried with server.servlet.context-path = /aas-env/ and now it seems to work.

aaronzi commented 1 month ago

Hi Christian, sorry for the late response. Great to hear that you were able to solve the problem. Depending on the nginx config the trailing "/" is needed.