Need help in deploying ERPNext in production server

690 views
Skip to first unread message

Subhra Jyoti Bhuyan

unread,
Aug 19, 2014, 2:50:47 AM8/19/14
to erpnext-dev...@googlegroups.com
I am trying to install ERPNext in Digitalocean fresh droplet. But I am not sure how to run the app in production server. I want to run the app through http://demo.reliconindia.net

I followed the following steps (in a fresh Ubuntu 14 (32bit) server):

1. Ran the following command.


2. Then

cd ~
bench init frappe
-bench
cd frappe
-bench
bench
get-app erpnext https://github.com/frappe/erpnext
bench
get-app shopping_cart https://github.com/frappe/shopping-cart
bench
new-site site1.local
bench frappe
--install_app erpnext erp1.local
bench frappe
--install_app shopping_cart erp1.local

3. Then setup
supervisor

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

4. Then setup nginx

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

5. Then I removed the default Nginx site

sudo rm /etc/nginx/sites-enabled/default

6. Then I created a new site

bench frappe --install_app erpnext demo.reliconindia.net

7. Re generated config

bench setup nginx

8. Restarted nginx

sudo service nginx restart

9. Changed the default site

bench set-default-site demo.reliconindia.net

Now if try accessing the site http://demo.reliconindia.net, it is saying 502 Bad Gateway

Can anyone help me out?

Pratik Vyas

unread,
Aug 19, 2014, 7:14:48 AM8/19/14
to erpnext-dev...@googlegroups.com
Would be great if you repost on developer forum.


Did you reload nginx and supervisor?
> --
> Note:
>
> If you are posting an issue,
>
> 1. ERPNext is a free and open source software and support is given on this
> forum by a team (https://frappe.io/webnotes). So please consider donating if
> you find this forum useful (https://frappe.io/buy). Even a small amount
> would be helpful.
> 2. We should be able to replicate it at our end. So please give us as much
> information as you can. Please see it from the point of view of the person
> receiving the communication.
> 3. Paste your code at http://pastebin.com or http://gist.github.com and send
> only the URL via email
> 4. For sending images, use http://imgur.com or other similar services. Do
> not send images as attachments. Links are good. Same goes for any file you
> are going to send.
>
> End of Note
> ---
> You received this message because you are subscribed to the Google Groups
> "ERPNext Developer Forum" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to erpnext-developer...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/erpnext-developer-forum/4c5a5e97-7317-4c76-84ce-9c6f7bb38920%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.



--
Pratik
erpnext

Pratik Vyas

unread,
Aug 19, 2014, 7:15:36 AM8/19/14
to erpnext-dev...@googlegroups.com
On Tue, Aug 19, 2014 at 4:44 PM, Pratik Vyas <pdv...@gmail.com> wrote:
> Would be great if you repost on developer forum.
>

Oh sorry, you already posted on dev forum.

Subhra Jyoti Bhuyan

unread,
Aug 19, 2014, 8:03:00 AM8/19/14
to erpnext-dev...@googlegroups.com
Yes. Restarted both nginx and supervisor.

Did I miss anything?

First how can I check whether it is properly in local or not?

If I run it locally using

bench start

I am getting http://pastebin.com/sZCMJnsj

Y Y

unread,
Aug 20, 2014, 1:35:01 AM8/20/14
to erpnext-dev...@googlegroups.com
Hi, just post my experience,

1. if it is a whole new server, please try restart it
2. list your process use 'ps aux' in forum then we can check if necessary command is running or not

thanks,yang

在 2014年8月19日星期二UTC+8下午2时50分47秒,Subhra Jyoti Bhuyan写道:

Subhra Jyoti Bhuyan

unread,
Aug 20, 2014, 1:53:38 AM8/20/14
to erpnext-dev...@googlegroups.com
Hi,

Thanks for the reply.

I restarted the server and ran the command 'ps aux', it is showing these processes.

Y Y

unread,
Aug 20, 2014, 3:02:10 AM8/20/14
to erpnext-dev...@googlegroups.com
to clarify, your local server, it was using old bench, they offered new bench.

your demo site, please help do following 2 things:
1. post your current nginx.conf in forum
2. try use sudo supervisorctl restart all to see if return any error.

thanks, yang



在 2014年8月20日星期三UTC+8下午1时53分38秒,Subhra Jyoti Bhuyan写道:

Subhra Jyoti Bhuyan

unread,
Aug 20, 2014, 3:31:52 AM8/20/14
to erpnext-dev...@googlegroups.com
I rebuilt the server and followed exactly these steps http://subhra.me/installing-erpnext-in-digitalocean-server/

Now if I do 'curl http://0.0.0.0:8000', I am getting 'curl: (7) Failed to connect to 0.0.0.0 port 8000: Connection refused'

If I do 'curl http://0.0.0.0:80', I am getting this.

I think the app is not running properly in local server itself.

My current process list (after rebooting the server) is this.

Have not setup the server for production yet after rebuilding.

Subhra Jyoti Bhuyan

unread,
Aug 20, 2014, 3:34:01 AM8/20/14
to erpnext-dev...@googlegroups.com
I followed the exactly same steps (http://subhra.me/installing-erpnext-in-digitalocean-server/) in my desktop (ubuntu 14), local setup is working fine.

Subhra Jyoti Bhuyan

unread,
Aug 21, 2014, 1:23:46 AM8/21/14
to erpnext-dev...@googlegroups.com
Managed to deploy the erp in production server. Thanks.

Y Y

unread,
Aug 21, 2014, 4:18:55 AM8/21/14
to erpnext-dev...@googlegroups.com
Working now? what's issue then?

在 2014年8月21日星期四UTC+8下午1时23分46秒,Subhra Jyoti Bhuyan写道:

Subhra Jyoti Bhuyan

unread,
Aug 21, 2014, 5:04:53 AM8/21/14
to erpnext-dev...@googlegroups.com
No idea. Rebuilt the server and started from the beginning again.
Reply all
Reply to author
Forward
0 new messages