Symptoms
- The Nexus Repository UI hangs on "Initializing..." and never loads.
- In browser developer tools (Network tab), the request to
static/rapture/extdirect-prod.jsreturns a 500 Server Error. - The response body is empty or shows an error, and other static resources may load successfully.
- Example screenshot:
Cause
- This issue is typically caused when files or directories under the Nexus Repository's temporary work directory (commonly
sonatype-work/nexus3/tmp) are deleted or manipulated while the repository is running. - Specifically, deleting or altering the following directories can trigger this problem:
sonatype-work/nexus3/tmp/nexus-ehcachesonatype-work/nexus3/tmp/nexus-extdirect
- These directories contain temporary files (such as
.lockfiles and JavaScript files likeapi.js) that are required for the UI to function. If these files are missing or corrupted, requests forextdirect-prod.jswill fail with a 500 error, causing the UI to hang at initialization. - This has been confirmed in multiple support cases, where manual cleanup or disk space recovery efforts inadvertently removed these critical files while Nexus was running.
Solution
- Do not manually delete or modify files in the
tmpdirectory while Nexus Repository is running. - If you encounter this issue:
- Check the contents of the
nexus-ehcacheandnexus-extdirectdirectories under yourtmpdirectory. - If files are missing, restart the Nexus Repository service. On restart, Nexus will regenerate the necessary files in these directories - ensure the tmp directory file permissions allow this.
- After restart, verify that the UI loads correctly - ensure Browser caches are cleared.
- Check the contents of the
- Investigate and disable any automated processes or scripts that may be cleaning up the
tmpdirectory while Nexus is running.
Additional Notes
- If you have a backup or another instance of the same Nexus version, you may be able to copy the missing files (
api.js,api-debug.js, etc.) into the appropriate directory to restore functionality without a restart, but this has a risk of not working - a restart is the recommended and safest approach. - Always ensure that only one Nexus process is accessing the data directory to avoid file locking issues