Getting error "Request is invalid or incorrect"

37 views
Skip to first unread message

Roberto Greiner

unread,
Oct 17, 2024, 11:19:48 AM10/17/24
to DSpace Technical Support
Hi, I need some help with one error.

In the logs I'm getting the following error:

2024-10-17 11:05:57,793 WARN  f758da60-7715-43ae-95b7-022d40744655 2646f157-3ac5-452d-bb5f-e233a029150e org.dspace.app.rest.exception.DSpaceApiExceptionControllerAdvice @ Request is invalid or incorrect (status:400 exception: the supplied uri is not ours: http://<my_domain>/server/api/core/sites/66f8d03a-2690-4e10-ab1e-35e6b6167f00 at: org.dspace.app.rest.utils.Utils.getBaseObjectRestFromUri(Utils.java:1005))

The problem here is that the access is going to http, instead of https. Could someone point me where I correct this entry so it goes to the same url, but with https?

It's a new dspace 8 install on Ubuntu 24.04, And I followed the following tutorial for basic setup:

For SSL I used the following:

Thank you,

Roberto

DSpace Technical Support

unread,
Oct 24, 2024, 2:15:48 PM10/24/24
to DSpace Technical Support
Hi Roberto,

If you are still getting this error, it might be related to this "common installation issue" where REST API "links" sometimes revert to HTTP instead of HTTPS.  The fix is to set "X-Forwarded-Proto: https" header in your proxy.  See  https://wiki.lyrasis.org/display/DSDOC8x/Installing+DSpace#InstallingDSpace-MyRESTAPIisrunningunderHTTPS,butsomeofits%22link%22URLsareswitchingtoHTTP

If that doesn't fix things, then we may need more information about **when** these errors appear in your logs (e.g. what actions did you take in the User interface which resulted in these errors in the logs)

Tim

Roberto Greiner

unread,
Oct 24, 2024, 2:22:32 PM10/24/24
to dspac...@googlegroups.com

I already found the problem (I think my answer was somehow refused by the moderator....).

The problem was that I oversaw copying these two lines into my apache setup:

    ProxyPreserveHost On
    RequestHeader set X-Forwarded-Proto https

After I added them, the error message no longer appeared and the page worked properly.

Tks.

--
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 a topic in the Google Groups "DSpace Technical Support" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/dspace-tech/ADEr5OY0BTY/unsubscribe.
To unsubscribe from this group and all its topics, send an email to dspace-tech...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/dspace-tech/d03bc720-070a-4660-909e-6b0bff601a5en%40googlegroups.com.
-- 
  -----------------------------------------------------
                Marcos Roberto Greiner

   Os otimistas acham que estamos no melhor dos mundos
    Os pessimistas tem medo de que isto seja verdade
                             James Branch Cabell
  -----------------------------------------------------
Reply all
Reply to author
Forward
0 new messages