Hi Mathias,

At this time, I'm not sure that it's possible to run a single REST API with 
multiple DSpace 7 UIs.  So, the setting "dspace.ui.url" can only be one value​ 
(and cannot be multi-valued).  This is likely the root issue you are 
experiencing.

The backend currently makes assumptions that there is only one, primary DSpace 
7 UI that it is communicating with.  I'm not sure that it'd be possible to 
change that easily, as in some cases the backend needs to send links to the UI 
or redirect you to the UI, and in those cases it must know the URL of the 
DSpace 7 UI.

If you wanted to try this route, my best advice would be to choose one UI to be 
the primary one.  Set that in "dspace.ui.url".  Then add the secondary UI only​ 
to "rest.cors.allowed-origins".  I'm not sure how well this would work though, 
as it has never been tested.  And, you'd have to keep in mind that the backend 
would only send emails and links which go back to the primary UI, and never to 
to the secondary UI.

Tim
________________________________
From: 'Mathias Gutenbrunner' via DSpace Technical Support 
<[email protected]>
Sent: Wednesday, April 6, 2022 3:15 AM
To: DSpace Technical Support <[email protected]>
Subject: [dspace-tech] DSpace 7.2: CORS errors and HTTP 500 code when setting 
up REST-API and UI on seperate machines


Hello everyone,

I am trying to set up the following scenario with DSpace 7.2:

1.) I want do set up an all-in-one virtual-machine-server which hosts
the REST-API and a UI, which I will call ds7aio.example.edu in this mail
(that worked)

2.)I want to set up a second virtual-machine-server which only hosts a
second UI, which I will call ds7ui.example.edu in this mail (that
doesn't work for yet, and I get an HTTP 500 error code)

Part (1) worked with the following parameters in the local.cfg:

dspace.server.url = https://ds7aio.example.edu/server
dspace.ui.url = https://ds7aio.example.edu

and a config.prod.yml with the following content for the UI:

ui:
   ssl: false
   host: localhost
   port: 4000
   nameSpace: /
rest:
   ssl: true
   host: ds7aio.example.edu
   port: 443
   nameSpace: /server

For part (2) I used the same config.prod.yml file on ds7ui.example.edu

and changed the parameter dspace.ui.url in te local.cfg on
ds7aio.example.edu to:

dspace.ui.url = https://ds7aio.example.edu, https://ds7ui.example.edu

I also added the following parameter:

rest.cors.allowed-origins = https://ds7aio.example.edu,
http://localhost, http://localhost:4000, http://localhost:8080/server,
https://ds7aio.example.edu/server, https://ds7ui.example.edu

when I try to retrieve ds7ui.example.edu I the DSpace UI redirects to a
HTTP 500 Page.
Also there are lots of CORS-errors shown in the browser-console.

Does anyone have experience with that kind of errors?
Did anyone solve it and successfully set up REST-API and UI on seperate
machines with DSpace 7.2 or another version of DSpace 7?

Thank you very much for your help in advance!

Greetings,
Mathias

--
Mathias Gutenbrunner
Philipps-Universität Marburg
Universitätsbibliothek
Abteilung Digitale Dienste
Sachgebiet Forschungsnahe E-Dienstleistungen

--
All messages to this mailing list should adhere to the Code of Conduct: 
https://www.lyrasis.org/about/Pages/Code-of-Conduct.aspx
---
You received this message because you are subscribed to the Google Groups 
"DSpace Technical Support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/dspace-tech/46eb59d4-f1e9-58b4-0687-7e8c2360eec7%40ub.uni-marburg.de.

-- 
All messages to this mailing list should adhere to the Code of Conduct: 
https://www.lyrasis.org/about/Pages/Code-of-Conduct.aspx
--- 
You received this message because you are subscribed to the Google Groups 
"DSpace Technical Support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/dspace-tech/PH0PR22MB3274C1564FAFDCFEE4FC1156EDE79%40PH0PR22MB3274.namprd22.prod.outlook.com.
  • [dspace-tech] DSpace 7... 'Mathias Gutenbrunner' via DSpace Technical Support
    • Re: [dspace-tech]... 'Tim Donohue' via DSpace Technical Support

Reply via email to