Hello everyone,
I've am near completion of my first dSpace 9 installation on two Ubuntu 22.04 servers and am stuck on two final, stubborn issues:
Backend (209.182.253.58): The Tomcat Manager says the /server application is Running: true. Solr and PostgreSQL are also running and verified. However, visiting http://209.182.253.58:8080/server gives a Tomcat 404 error, and the /dspace/log/dspace.log file is never created, indicating a silent startup failure.
Frontend (209.182.253.60): The Angular application has been built and is served by Nginx. However, the browser console shows a TypeError: can't access property "nameSpace", _.ui is undefined. This happens even after repeatedly rebuilding the application with a correct config.prod.yml and deploying it to /var/www/html/dspace.
I've already tried extensive troubleshooting for file permissions, Java versions, and config files - with the help of Gemini, but It seems like I'm stuck in a loop and would appreciate any help or suggestions if anyone has any suggestions on how to resolve either of these issues.
Hopefully, with a little help I can figure this out, but if not, I'll be in the market for a paid consultant to finish the installation. So if you have technical advice or recommendations for a consultant, I'm interested in both.
Many, many, many thanks in advance!
Sam
Tomcat started without any errors.
It used the correct Java 17 version.
It contained the line Deployment of web application directory [/var/lib/tomcat9/webapps/server] has finished, which is the confirmation that the DSpace backend application started successfully.
Command: sudo -u tomcat java -jar /dspace/webapps/server/WEB-INF/lib/dspace-server-boot.jar
Result: This failed with an "Unable to access jarfile" error.
To figure out why the file was inaccessible, we tried to list it directly.
Command: ls -l /dspace/webapps/server/WEB-INF/lib/dspace-server-boot.jar
Result: This produced a No such file or directory error.
That "No such file or directory" error indicated that the main DSpace application file was completely missing. This meant the original mvn package build had failed silently, without producing the necessary files.
4. Performed a Clean RebuildTo fix the missing file, I performed a complete, clean rebuild of the backend application.
Ran mvn clean to delete the old, incomplete build artifacts.
Switched to the dspace user (because the root user was using the wrong Maven version).
Ran mvn package again. Confirmed this build completed successfully.
After the successful build, I re-installed the new, complete set of application files.
Cleared the old installation with sudo rm -rf /dspace/*.
Copied the new files from the build directory with sudo cp -r ....
Set the correct ownership with sudo chown -R tomcat:tomcat /dspace.
Restarted the solr and tomcat9 services.
After all those steps, I confirmed that the backend services were running, but was still seeing the same 404 error and the blank frontend page. I don't know what more to do.
Michael, for step two, I did the following on the Front End server:
Updated the Configuration Replaced the config.prod.yml file with the official example file. This pointed the user interface to a public, working DSpace backend (demo.dspace.org).
Rebuilt the Application Ran the yarn build:prod command to compile the entire user interface with these new settings.
Deployed the New Files Moved the newly built files into the Nginx web directory (/var/www/html/dspace/) and restarted Nginx.
Fixed a Final Error Manually created the missing assets/config.json file to resolve a final JavaScript error.
The outcome seems to be that the frontend is correctly installed, but the build process on the server has a persistent environmental issue that prevents the configuration from loading correctly, even when using the default settings.
As you both can probably tell, I have been using Gemini to help navigate through all of this. The following is how Gemini suggests I describe the problem to you all:
"Hello, I have a DSpace 9 installation on two Ubuntu 22.04 servers that I need help with. I've been troubleshooting for a while and am stuck in a loop.
Backend (209.182.253.58): The catalina.out log shows a clean startup and reports that the /server application has deployed successfully. Tomcat Manager also says it's Running: true. However, visiting the URL gives a 404 error, and the /dspace/log/dspace.log file is never created, indicating a silent startup failure.
Frontend (209.182.253.60): The Angular application build completes, and the files are served by Nginx. However, the browser console always shows a TypeError: can't access property "nameSpace", _.ui is undefined. This happens even after multiple clean rebuilds with a verified config.prod.yml.
We have already verified all standard issues (Java versions, file permissions, ownership, local.cfg, Solr connection, etc.). I need hands-on help to diagnose this unusual environmental problem."
Hi Sam,
I know it’s simple, does accessing /server/api give any results on the backend?
/server returns 404 on my instance, but /server/ returns the HAL browser, and /server/api returns the API.
-Andrew
From: dspac...@googlegroups.com <dspac...@googlegroups.com> on behalf of Samuel Stoker <sam...@emergestudio.design>
Date: Thursday, 3 July 2025 at 7:55 am
To: DSpace Technical Support <dspac...@googlegroups.com>
Subject: Re: [Extern] [dspace-tech] dSpace Install, Tomcat 404 error, and TypeError
…
--
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 visit https://groups.google.com/d/msgid/dspace-tech/587a0cda-89a6-4788-921c-f99e63130533n%40googlegroups.com.