My lms server keeps on restarting itself

My lms server was up and running with no problems until when I decided to restart it using the command /edx/bin/supervisorctl restart lms now when I check the status of all my services using the command sudo /edx/bin/supervisorctl status I can see that it restarts itself usually after every 5 seconds while other services are running just fine. Note this started happening after I restarted my lms server before it was running just fine. Any help will be much appreciated thank you.

This is usually happening because of a wrong change in settings. So I can imagine that you have made a change to the files in the past which you don’t remember now. Today restarting the services has brought the change(s) into the scene and LMS is not capable of being started.
BTW you should have a look at the error logs, search for a clue to find out what’s wrong. it may be differ from a simple typo, to a missed requirement.

Thanks for your time @mahyard. When I look at the lms log files the only error I can see is not being able to connect to my celery work which shouldn’t really affect. The only change I made was providing my self access to the for lms sudo chown ubuntu:daemon -R /edx/app/edxapp/edx-platform/lms/ The reason for this was to give me access to edit the file since I couldn’t initially and the only edit I made was to change a comment which I actually undid. The other command I ran was sudo chown edxapp -R /edx/app/edxapp/lms.env.json since I was getting a permission denied error to that file whenever I ran certain commands.

In my instance ( I have never changed owners and permissions ) all files under edx-platform directory are owned by edxapp:edxapp and all .json settings files are owned by edxapp:www-data. access permission of those .json files I think is very important to be 640. and you can use root or a sudoer user to edit them.
I think it’s not bad to reset these permissions and see the results (after restarting services).
if you think there would be sth wrong with your celery workers, have a look on this troubleshooting guide from Lawrence McDaniel’s Blog.

@mahyard thank you once again how would I go about reseting the permissions what would the command be I sort of new to this and login in as the edxapp user such that I can modify those files.

Thank you so much @mahyard it turns out it was a permissions issue will try to craft a solution and post later. Thank you once again.

1 Like