Hi, Check the response of your DSpace 7 REST API... on the root path, there should be a property named "dspaceServer". That URL is the value of "dspace.server.url" which is being "seen" by the REST API. For example, on the demo REST API, "dspaceServer=https://api7.dspace.org/server" https://api7.dspace.org/server/
If that "dspaceServer" is set to "http://127.0.0.1:8080/server", then that means that your "dspace.server.url" is set to that value somewhere. Check your dspace.cfg. Check your local.cfg. If they look correct, reboot Tomcat (maybe an old value was cached). If that "dspaceServer" is set correctly, then maybe you are running some sort of Proxy that is getting things mixed up? Maybe requests to your REST API are proxied to http://127.0.0.1:8080? If so, it's possible that your Proxy is replacing the URL and needs to set one of the X-Forwarded-* headers? You also could check to see if the default value of "server.forward-headers-strategy" (from Spring Boot) is set correctly based on your Proxy setup. More on that config at: https://wiki.lyrasis.org/display/DSDOC7x/Configuration+Reference#ConfigurationReference-ProxySettings Essentially, this sounds like either a basic configuration issue or possibly a proxy issue. Tim On Friday, March 18, 2022 at 8:05:50 AM UTC-5 [email protected] wrote: > Hi Tim, > > Thank you so much for replying. > > dspace.cfg is set correctly almost all services are pointing to the > correct ip adress but two, both statistics and discovery that are going for > http://127.0.0.1:8080/server > > And I couldnt find where to set those two, but if they all import from the > same path "dspace.server.url" i, something is really wrong with our > institute installation. Any ideas what I could change/check? > > Thank you so much, > > > On Thursday, March 17, 2022 at 11:29:14 AM UTC-3 Tim Donohue wrote: > >> Hi, >> >> Those URLs are from the "dspace.server.url" configuration in your >> local.cfg (or dspace.cfg). It's likely you've set that to be " >> http://127.0.0.1:8080/server", which obviously is not the URL you want: >> https://github.com/DSpace/DSpace/blob/main/dspace/config/dspace.cfg#L26 >> >> If the UI is accessible to the world, you MUST ensure that this >> "dspace.server.url" is also accessible to the world...so, it cannot be a >> 127.0.0.1 or localhost URL unless you only plan to access the UI and REST >> API from localhost (i.e. this can be useful for development but is never >> used in production). >> >> Tim >> >> On Wednesday, March 16, 2022 at 2:35:06 PM UTC-5 [email protected] wrote: >> >>> Hello everyone! >>> >>> We've been trying to setup a 7.2 version but I've looked on every config >>> file on the back-end but couldnt locate where to change the base href of >>> the base statistics server. >>> >>> Our call "http://<ip>/server/api/statistics" is always returning: >>> >>> { "id": null, "type": "statistics", "_links": { "searchevents": { >>> "href": "http://127.0.0.1:8080/server/api/statistics/searchevents" }, >>> "self": { "href": "http://127.0.0.1:8080/server/api/statistics" }, >>> "viewevents": { "href": " >>> http://127.0.0.1:8080/server/api/statistics/viewevents" } } } >>> >>> But on the client side it just throws: "Failed to load resource: >>> net::ERR_CONNECTION_REFUSED" -> >>> http://127.0.0.1:8080/server/api/statistics/viewevents >>> >>> Is there any way to change this "127.0.0.1" to my actual server ip? >>> >>> The documentation only mentions solr but the solr is fine. The file >>> "/modules/usage-statistics.cfg" gave me some hope but it's not there. >>> >>> I also noticed that the discovery service calls ( >>> http://127.0.0.1:8080/server/api/discover/browses/author/entries) are >>> also fixed on the wrong ip. >>> >>> Thanks in advance! >>> >> -- 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/1675175f-4f6a-4766-a447-30c5828bb078n%40googlegroups.com.
