DSpace 500 error

153 views
Skip to first unread message

Israel Irizarry

unread,
Oct 4, 2024, 4:11:10 PM10/4/24
to DSpace Technical Support
Hello!

I have recently added https support for my dspace installation, but for some reason, we are getting an error 500 when loading up https://cuvault.cumberland.edu (our dspace url). We briefly see the DSpace homepage, but then quickly changes to the err 500 page. It loads just fine through localhost:8080 for Tomcat and 4000 for DSpace, but not for the DSpace https version. HAL works fine too when I do https://cuvault.cumberland.edu/server, and I have done yarn test:rest and it states this:

yarn run v1.22.22
$ ts-node --project ./tsconfig.ts-node.json scripts/test-rest.ts
Building production app config
Overriding app config with c:\dspace-angular-dspace-7.6.2\config\config.yml
Overriding app config with c:\dspace-angular-dspace-7.6.2\config\config.prod.yml
...Testing connection to REST API at https://cuvault.cumberland.edu/server/api...

RESPONSE: 200 200

Checking JSON returned for validity...
        "dspaceVersion" = DSpace 7.6.2
        "dspaceUI" = http://localhost:4000
        "dspaceServer" = http://localhost:8080/server
        "dspaceServer" property matches UI's "rest" config? false
        Does "/api" endpoint have HAL links ("_links" section)? true
Done in 2.39s.


I am not sure how to make the rest config true. Here is my local.cfg settings:


...
dspace.server.url = https://cuvault.cumberland.edu
...
dspace.ui.url = https://cuvault.cumberland.edu
# Name of the site
dspace.name = DSpace at Cumberland University .

Here is my config.prod.yml settings:

ui:
  ssl: false
  host: localhost
  port: 4000
  # NOTE: Space is capitalized because 'namespace' is a reserved string in TypeScript
  nameSpace: /
  # The rateLimiter settings limit each IP to a 'max' of 500 requests per 'windowMs' (1 minute).
  rateLimiter:
    windowMs: 60000 # 1 minute
    max: 500 # limit each IP to 500 requests per windowMs
  # Trust X-FORWARDED-* headers from proxies (default = true)
  useProxies: true

rest:
  ssl: true
  host: cuvault.cumberland.edu
  port: 443
  nameSpace: /server.


Here is my virtualhost settings through httpd.conf:



<VirtualHost *:443>
    # Add your domain here. We've added "my.dspace.edu" as an example
    ServerName cuvault.cumberland.edu
 
    # Most installs will need these options enabled to ensure DSpace knows its hostname and scheme (http or https)
    # Also required to ensure correct sitemap URLs appear in /robots.txt for User Interface.
    ProxyPreserveHost On
    RequestHeader set X-Forwarded-Proto https
 
    SSLEngine on
    SSLCertificateFile " **************** "
    SSLCertificateKeyFile  **************** "
    # LetsEncrypt certificates (and possibly others) may require a chain file be specified
    # in order for the UI / Node.js to validate the HTTPS connection.
    SSLCertificateChainFile "****************"
 
    # Proxy all HTTPS requests to "/server" from Apache to Tomcat via AJP connector
    ProxyPass /server ajp://localhost:8009/server
    ProxyPassReverse /server ajp://localhost:8009/server
 
    # [NEW FOR UI:] Proxy all HTTPS requests from Apache to PM2 on localhost, port 4000
    # NOTE that this proxy URL must match the "ui" settings in your config.prod.yml
    # (In this example: https://my.dspace.edu/ will display the User Interface)

    ProxyPass / http://localhost:4000/
    ProxyPassReverse / http://localhost:4000/

</VirtualHost>

I have tried so many combinations of changing the config.prod.yml file and the local.cfg file, and nothing has worked so far. Any help would be greatly appreciated!

Thanks!

Israel Irizarry

unread,
Oct 7, 2024, 12:00:55 PM10/7/24
to DSpace Technical Support
Hi again!

Update: I was able to get it working locally on the server through https, but it is still going to error 500 when I access the site from another computer in the domain. When I do https://cuvault.cumberland.edu on the server it is hosted on it is fine, but the error 500 is showing when on another computer on the domain. We eventually want to make the site publicly available as well, and I am not really sure if there are any settings we need to do for configuring deployment when that time comes.

Thanks!

Israel Irizarry | Junior Software Developer
1 Cumberland Square
Lebanon, TN 37087
Help Desk Phone Number: (615) 257-4400
Help Desk Hours:
Monday - Thursday 7 am - 8:30 pm
Friday: 7 am - 9:30 pm
Help Desk Email: Sup...@cumberland.edu
Self-Service Portal: cumberlanduniversity.zohodesk.com

Israel Irizarry

unread,
Oct 11, 2024, 10:53:47 AM10/11/24
to DSpace Technical Support
Update again!

I was able to fix the issue by just starting the frontend again. I did pm2 start dspace-angular.json and it worked. I thought that an instance was already running because I can load the frontend on the local server, but it seems like it was not running. I still need help getting dspace deployed to the public however. Thanks!

Israel Irizarry | Junior Software Developer
1 Cumberland Square
Lebanon, TN 37087
Help Desk Phone Number: (615) 257-4400
Help Desk Hours:
Monday - Thursday 7 am - 8:30 pm
Friday: 7 am - 9:30 pm
Help Desk Email: Sup...@cumberland.edu
Self-Service Portal: cumberlanduniversity.zohodesk.com

Andrew K

unread,
Oct 12, 2024, 10:47:06 AM10/12/24
to DSpace Technical Support
Hey Israel
пʼятниця, 11 жовтня 2024 р. о 17:53:47 UTC+3 Israel Irizarry пише:

Israel Irizarry

unread,
Oct 15, 2024, 12:28:30 PM10/15/24
to Andrew K, DSpace Technical Support
Hey Andrew!

That article is really helpful! I have already enabled it now, so my current issue is how to make the site available to the public once we get it all set up and ready.

Thanks!

Israel Irizarry | Junior Software Developer
1 Cumberland Square
Lebanon, TN 37087
Help Desk Phone Number: (615) 257-4400
Help Desk Hours:
Monday - Thursday 7 am - 8:30 pm
Friday: 7 am - 9:30 pm
Help Desk Email: Sup...@cumberland.edu
Self-Service Portal: cumberlanduniversity.zohodesk.com

--
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 dspace-tech...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/dspace-tech/d9cd067b-98a7-4e12-8cc7-a7a316295530n%40googlegroups.com.

Andrew K

unread,
Oct 15, 2024, 12:40:00 PM10/15/24
to DSpace Technical Support
If you follow the manual exactly, the website will be available to public. This is why I recommended it to you. 

Particularly note how these files: local.cfg, config.prod.yml and dspace-ui.json are configured. The 500 error is caused by mistakes in these config files
вівторок, 15 жовтня 2024 р. о 19:28:30 UTC+3 Israel Irizarry пише:
Reply all
Reply to author
Forward
0 new messages