A direct request for the statistics page does not load

61 views
Skip to first unread message

Joyner Library

unread,
Aug 5, 2025, 2:11:13 PM8/5/25
to DSpace Technical Support
Dear DSpace Team,

My library has upgraded to DSpace 9.1. Users can login and deposit items and statistics load if a link is clicked on the page. Going directly to the statistics page creates a 500 error.

my front end settings are 
   ui:
     ssl: false
     host: localhost
     port: 4000

   rest:
     ssl: true
     host: thescholarship.ecu.edu
     port: 443

local.cfg settings are
   dspace.server.url = https://thescholarship.ecu.edu/server
   dspace.ui.url = https://thescholarship.ecu.edu
   rest.cors.allowed-origins = ${dspace.ui.url}, http://localhost:4000, https://thescholarship.ecu.edu, http://locahost:8080

Please help me troubleshoot this error. I have attached a few items from the various log files but it may not be helpful.

Nick Crimi
ECU Libraries
metadata error.txt
databaser error.txt
apache errors.txt
tomcat error.txt

Joyner Library

unread,
Aug 7, 2025, 9:56:27 AM8/7/25
to DSpace Technical Support
Thank you for helping me troubleshoot this error. I think some of the problems were related to old node packages.

Running the following commands helped:
    cd D:\apps\dspace-angular-dspace-9.1
    npm run clean
    npm install
    npm run build:prod

This allows pages like the /statistics to successfully load from typing the address in a browser.

Handle links are not loading successfully the first time but a browser reload works. I have attached the full log. 

Redirecting from /handle/10342/4284 to /items/67ac1577-0993-4a96-b6cf-18a0fcc5ada0 with 301
GET /handle/10342/4284 301 396.718 ms - 84
Warning [ERR_HTTP_HEADERS_SENT]: Tried to set headers after they were sent to the client
Error: Cannot set headers after they are sent to the client
    at ServerResponse.setHeader (node:_http_outgoing:700:11)
    at ServerResponse.res.set.res.header (C:\apps\dspace-angular-dspace-9.1\dist\server\main.js:1:2999582)
    at ServerResponse.res.send (C:\apps\dspace-angular-dspace-9.1\dist\server\main.js:1:2993950)
    at C:\apps\dspace-angular-dspace-9.1\dist\server\main.js:1:8089795
    at _ZoneDelegate.invoke (C:\apps\dspace-angular-dspace-9.1\dist\server\main.js:1:3941414)
    at ZoneImpl2.run (C:\apps\dspace-angular-dspace-9.1\dist\server\main.js:1:3933987)
    at C:\apps\dspace-angular-dspace-9.1\dist\server\main.js:1:3952322
    at _ZoneDelegate.invokeTask (C:\apps\dspace-angular-dspace-9.1\dist\server\main.js:1:3942256)
    at ZoneImpl2.runTask (C:\apps\dspace-angular-dspace-9.1\dist\server\main.js:1:3935056)
    at drainMicroTaskQueue (C:\apps\dspace-angular-dspace-9.1\dist\server\main.js:1:3945490)
GET /items/67ac1577-0993-4a96-b6cf-18a0fcc5ada0 - - ms - -

Thanks,
Nick
handle redirect.txt

Joyner Library

unread,
Aug 7, 2025, 11:19:30 AM8/7/25
to DSpace Technical Support
Using the suggestion mentioned on ticket https://github.com/DSpace/dspace-angular/issues/2315 helped. I updated pm2 too.

Thank you,
Nick
Reply all
Reply to author
Forward
0 new messages