New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Angular dspace doesn't start with pm2 after reboot #2495
Comments
This doesn't seem like a DSpace Angular bug to me. Can you try running the application manually on the command line without the JSON manifest? For example: $ pm2 start ./dist/server/main.js --name dspace-ui -i 4 |
The same error occurs with the command you're suggesting. Could it be the version of PM2? I'm using version 5.3.0, which is the latest. I'll send the error again: /home/dspace/.pm2/logs/dspace-ui-error-2.log last 15 lines: |
This is working for me on DSpace 7.6: $ pm2 start ./dist/server/main.js --name dspace-ui -i 4 PM2 version 5.3.0 is correct. I think the SyntaxError in your error is suspicious. Is your manifest correct? Also, try removing the |
It keeps giving me the same error with: Also when I generate the crontab that executes a .sh I start it as soon as I restart, I have to add a waiting time of about 2 minutes so that the error does not occur, I add it as follows: dspace.sh: #!/bin/bash #PM2 exit If I remove 'sleep', the same error appears. I don't do any |
@RichardCBravo : I agree with @alanorth that this doesn't seem like a DSpace issue. It sounds like something is wrong with your PM2 installation, or maybe you didn't install it globally? I see there's a variety of issues reported to PM2's own ticketing system that say things like "SyntaxError: Unexpected token" (which is the error you see). They seem to all be related to either PM2 is using an invalid version of Node.js, or PM2 itself wasn't installed properly. Here's one such example: Unitech/pm2#4588 I'd recommend trying to reinstall PM2 if possible. It sounds, to me, like your PM2 isn't working at all... but correct me if I'm wrong. It doesn't sound like the issue is specific to rebooting your machine. Overall, I'd recommend moving this discussion to one of our Support options at https://wiki.lyrasis.org/display/DSPACE/Support We only recommend creating tickets like this for bugs in DSpace. This sounds like it's either a bug in PM2, or a misconfiguration or bad installation of PM2. Using those Support options (especially mailing lists) can also get advice from many other DSpace users...and it's always possible one of them has seen this error before. Closing this as it doesn't seem to be a bug in DSpace itself. Not able to reproduce this myself & others have not either. |
Describe the bug
The error arises when the entire process is done to leave pm2 as a service, when restarting this error starts to appear:
/home/dspace/.pm2/logs/dspace-angular-1.log last 15 lines:
dspace-angular.json:
To Reproduce
Steps to reproduce the behavior:
All commands with dspace user
Expected behavior
It should start Angular automatically.
The text was updated successfully, but these errors were encountered: