Sorry! We will be back soon!

then you require to generate one and link it up through supervisor service, since I using Fedora it may different than yours , just for your reference only.

image

and supervisor service can’t execute directly through root in Fedora, I not sure how about on ubuntu or Debian, here is my control for your reference in /etc/group

image

this can allow me to use systemctl to manage supervisor service

oh not enough, I still require to take supervisor pid to correct permission in supervisor.conf files
like this:
image

Lawes_Chan,

Thanks again so much. :slight_smile:

So, I have the following:

  1. A symbolic link in etc/supervisor/conf.d that points to frappe-bench.conf

  2. The frappe-bench.conf file is in /home/myerpnext/frappe-bench/config/supervisor.conf

  3. I then ran:

sudo bench setup supervisor
sudo supervisorctl reread
sudo supervisorctl update

sudo supervisorctl stop all
sudo supervisorctl start all

Maybe I should restart Nginx after that? Oh, wait, I just remembered that I tried all of this earlier (including the following)

sudo ln -s /home/myerpnext/frappe-bench/config/nginx.conf /etc/nginx/conf.d/frappe-bench.conf

When I add that symbolic link (above) Nginx won’t restart and the logs tell me there is a

“duplicate upstream frappe-bench-frappe in /etc/nginx/conf.d/frappe-bench.conf:1”

So I delete the symbolic link so I can get Nginx back up and running so it will serve the other apps that are actively being used by a few people.

I’ve somehow got things all messed up :frowning:

Jason

if you delete the link … it seems nginx can’t locate the erpnext conf file, it won’t work I think.

for duplicate upstream … it seems miss config for your other web apps config file.

you may need check the conflict issue.

ps. if you can shutdown your web apps for a moment, can it be test like:

  • keep the symbol link to erpnext
  • remove / relocate out the other web app nginx conf

restart nginx service, it should allow only erpnext config to execute, and see can the website bring up first

Lawes_Chan,

Wait! I made some progress! :slight_smile: Just a tiny bit.

Instead of putting the symbolic link in conf.d I put it in sites-enabled like this:

sudo ln -s /home/myerpnext/frappe-bench/config/nginx.conf /etc/nginx/sites-enabled/frappe-bench.conf

And now I am back to the “Sorry! We will be back soon” message. Not where I want to be but it feels like progress :slight_smile:

Jason

P.S. I guess now I have to figure out why supervisorctl is not running…

What Linux are you using?
If I’m not mistaken the extension of frappe-bench for the supervisor in CentOS is .ini. And for Ubuntu it is .conf

I use CentOS:

sudo ln -s `pwd`/config/supervisor.conf /etc/supervisord.d/frappe-bench.ini

and

sudo ln -s `pwd`/config/nginx.conf /etc/nginx/conf.d/frappe-bench.conf

rahy,

Thanks, I’m using Ubuntu 20.04. The extension is .conf it seems.

But I’m not clear on the path you have. Where is the ‘config’ directory? I guess that is in frappe-bench right?

So in that directory (home/myerpnext/frappe-bench/config) I have the conf file “supervisor.conf”

And in /etc/supervisor/conf.d/ I have a symbolic link titled “frappe-bench.conf” that points to the file in the /home/myerpnext/frappe-bench/config file.

I guess that is the correct configuration?

Jason

rahy, lawes_chan,

Thank you so much for all of your support! I finally figured it all out. Somehow my symbolic link to the frappe-bench.conf file in the supervisor directory had been deleted. I messed a few other things up along the way but finally managed to get them all repaired last night.

Then, this morning I was trying to figure out why supervisor was not running and I noticed I had copied pasted the symbolic link creation command but did not correct some information in the path! Oh no! The title of my ERPNext instance is part of the path.

So, I had a symbolic link pointing to something that didn’t exist. :frowning:

I fixed the link and then ran the following commands and finally I have everything running again. :slight_smile:

sudo bench setup supervisor
sudo supervisorctl reread
sudo supervisorctl update

sudo supervisorctl stop all
sudo supervisorctl start all

Whew! I don’t know why this happened just because the power went out. Hopefully it won’t happen again or, if it does, hopefully I’ll remember how to fix it.

Thanks again

Jason

Good to hear you have solved the problem.
I mostly don’t use the name frappe-bench for the installation I did. So your mistake happened to me several times. Forget to change the name of the bench when pasting the command :smiley:

rahy,

Thanks :slight_smile: I’ve just realized that by solving my ERPNext problem, somehow I introduced a new problem. My three other applications running through Nginx are now inaccessible. If I remove the config for ERPNext those sites are available but with the ERPNext config they are inaccessible.

I guess I need to adjust something in that ERPNet config…not sure what though. Any ideas?

Jason

I’m not the expert for nginx or computer for that matter :slight_smile:

Now that you have resolved the supervisor issue, I think you should place the nginx back to the conf.d and see if that resolve the other issues.

Try kill the processes on port 8000, 11000, 12000, 13000.
You can use the following commands

sudo lsof -t -i tcp:8000 -s tcp:listen | sudo xargs kill
sudo lsof -t -i tcp:11000-s tcp:listen | sudo xargs kill
sudo lsof -t -i tcp:12000-s tcp:listen | sudo xargs kill
sudo lsof -t -i tcp:13000-s tcp:listen | sudo xargs kill

Then do:
sudo bench restart

1 Like

FOLLOW THIS INSTALLATION STEPS