Almost ready to implement erpnext

647 views
Skip to first unread message

Camilo

unread,
Sep 14, 2014, 4:52:24 PM9/14/14
to erpnext-dev...@googlegroups.com
Hi, very happy to be able to start bench... from terminal...but supervisord config its been a nightmare.
Could you please assist me on this:
root@vps [~]# service supervisord start
Starting supervisord:
Error: Another program is already listening on a port that one of our HTTP servers is configured to use.  Shut this program down first before starting supervisord.
For help, use /usr/bin/supervisord -h
frappe:frappe-web                RUNNING   pid 3137, uptime 1:11:55
frappe:frappe-worker             RUNNING   pid 3136, uptime 1:11:55
frappe:frappe-workerbeat         RUNNING   pid 3138, uptime 1:11:55

I'm using port 8000.

I appreciate your help,
Camilo Correa

Sunil Kumar

unread,
Sep 14, 2014, 11:25:50 PM9/14/14
to erpnext-dev...@googlegroups.com
Hi Camilo,

I think you should find out first what process is listening on that port then unlink it

----
Sunil
Partner for ERPNext

Pratik Vyas

unread,
Sep 15, 2014, 1:53:27 AM9/15/14
to erpnext-dev...@googlegroups.com
> --
> 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/ead70909-6dd6-4e9e-a238-44dc18e19155%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

Hi Camilo,

By any chance, are you trying to run `bench start` after setting up supervisor?

Thanks,
--
Pratik
erpnext

Camilo

unread,
Sep 15, 2014, 3:10:27 AM9/15/14
to erpnext-dev...@googlegroups.com
I did a lot...I think I did this also in order to check if 'bench start' was still working after setting up supervisor ... something wrong with it?
Thank you!

Camilo

unread,
Sep 15, 2014, 3:14:44 AM9/15/14
to erpnext-dev...@googlegroups.com
Hi Sunil,
I run 'netstat -tulpn' and see no conflicts...
Thank you!

Pratik Vyas

unread,
Sep 15, 2014, 3:44:03 AM9/15/14
to erpnext-dev...@googlegroups.com
On Mon, Sep 15, 2014 at 12:40 PM, Camilo <camilo...@gmail.com> wrote:
> I did a lot...I think I did this also in order to check if 'bench start' was
> still working after setting up supervisor ... something wrong with it?
> Thank you!
>

Alright, I think it's not clear in the documentation. Supervisor is a
replacement for `bench start`. So, supervisor starts the bench
processes and so that you don't have to run `bench start` to bring up
the service. Also, next step for you would be setting up nginx.

Thanks,
--
Pratik
erpnext

Camilo

unread,
Sep 15, 2014, 5:22:28 AM9/15/14
to erpnext-dev...@googlegroups.com
Pratik, since apache is running on my server I was trying to run ngnix on 8080 or 8000. May this be the problem? Should I try to setup nginx only? I was very proud as 'bench start' was doing the job. Then, I understand the funktion of supervisord and started to setup it, but no success. I'm really not an expert but like to look inside erpnext, implement it and offer it to others.
The supervisord.conf file bench is providing is just a part to be included in supervisord.conf. Am I right? Attached my config file, just in case...please take a look, since I'm realy not sure what I was doing...
Thank you Pratik,
I appreciate your support a lot!
Camilo
cami_supervisord.conf

Pratik Vyas

unread,
Sep 15, 2014, 7:05:56 AM9/15/14
to erpnext-dev...@googlegroups.com
On Mon, Sep 15, 2014 at 2:52 PM, Camilo <camilo...@gmail.com> wrote:
> Pratik, since apache is running on my server I was trying to run ngnix on
> 8080 or 8000. May this be the problem? Should I try to setup nginx only? I
> was very proud as 'bench start' was doing the job. Then, I understand the
> funktion of supervisord and started to setup it, but no success. I'm really
> not an expert but like to look inside erpnext, implement it and offer it to
> others.
> The supervisord.conf file bench is providing is just a part to be included
> in supervisord.conf. Am I right? Attached my config file, just in
> case...please take a look, since I'm realy not sure what I was doing...
> Thank you Pratik,
> I appreciate your support a lot!
> Camilo
>
>

Hi Camilo,

The bench can generate a config that you want.

```
bench config serve_default_site off
bench config dns_multitenant off
bench set-nginx-port {your-site} 8765
bench setup nginx
```

This should generate an nginx that doesn't listen on port 80. You can
regenerate supervisor config by running `bench setup supervisor`

You have to link the config files in the correct config dirs of
nginx/supervisor for it to take effect.

https://github.com/frappe/bench/#production-deployment

Thanks,
--
Pratik
ERPNext

Camilo

unread,
Sep 15, 2014, 7:25:41 AM9/15/14
to erpnext-dev...@googlegroups.com
Great Pratik, I will do it, but
I already setup Multitenant and created a second site...
Same procedure anyways?
I appreciate,
Camilo

Pratik Vyas

unread,
Sep 15, 2014, 7:42:19 AM9/15/14
to erpnext-dev...@googlegroups.com
On Mon, Sep 15, 2014 at 4:55 PM, Camilo <camilo...@gmail.com> wrote:
> Great Pratik, I will do it, but
> I already setup Multitenant and created a second site...
> Same procedure anyways?
> I appreciate,
> Camilo
>

Yes (port based multitenant system)

Camilo

unread,
Sep 15, 2014, 10:02:49 AM9/15/14
to erpnext-dev...@googlegroups.com
Pratik,
by {your-site} you mean the first site installed as {site1.local} or my first domain?

bench set-nginx-port site1.local 8765 
bench set-nginx-port hydrocarbon-americas.com 8765 

I appreciate a lot and would love to be able to take part on the conf there on Sept. 25. Not possible jet but nextERP.conf
Sincerely,
Camilo

On Monday, September 15, 2014 1:05:56 PM UTC+2, Pratik Vyas wrote:

Camilo

unread,
Sep 15, 2014, 11:09:06 AM9/15/14
to erpnext-dev...@googlegroups.com
Also a question about this command line:
 sudo ln -s `pwd`/config/supervisor.conf /etc/supervisor/conf.d/frappe.conf

Since the easy_install put supervisord.conf on /etc/supervisord.conf

So it would be:
sudo ln -s `pwd`/config/supervisor.conf /etc/frappe.conf (OK???)

And, may not be relevant, but your conf file name, supervisor.conf should not be supervisord.conf ??
Sorry, I'm realy confused about this addresses...
Looking other instructions I have seen the dir: /etc/supervisord/conf.d/

I appreciate,
best,
Camilo

Camilo

unread,
Sep 15, 2014, 1:44:59 PM9/15/14
to erpnext-dev...@googlegroups.com
NGNIX TALKING TO ME!!!!!: 

502 Bad Gateway


Allways near of supervisor to work. Thank you! 
Camilo

Pratik Vyas

unread,
Sep 15, 2014, 2:07:58 PM9/15/14
to erpnext-dev...@googlegroups.com
Are processes running?
`supervisorctl status`
Log?
tail -n50 frappe-bench/logs/web.error.log
> --
> 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/0f61a3fa-4fd0-4213-9dae-612e2c72b842%40googlegroups.com.
>
> For more options, visit https://groups.google.com/d/optout.



--
Pratik
erpnext

Camilo

unread,
Sep 15, 2014, 2:17:11 PM9/15/14
to erpnext-dev...@googlegroups.com

frappe:frappe-web                RUNNING   pid 5915, uptime 0:01:54
frappe:frappe-worker             RUNNING   pid 5914, uptime 0:01:54
frappe:frappe-workerbeat         RUNNING   pid 5916, uptime 0:01:54

Thanks!

Camilo

unread,
Sep 15, 2014, 2:18:54 PM9/15/14
to erpnext-dev...@googlegroups.com
Exception KeyError: KeyError(47283097993728,) in <module 'threading' from '/usr/local/lib/python2.7/threading.pyc'> ignored

No idea...something I can do?
Appreciate,
Camilo

Camilo

unread,
Sep 15, 2014, 2:21:29 PM9/15/14
to erpnext-dev...@googlegroups.com
Two of them:

Exception KeyError: KeyError(46928062566912,) in <module 'threading' from '/usr/local/lib/python2.7/threading.pyc'> ignored
Exception KeyError: KeyError(47283097993728,) in <module 'threading' from '/usr/local/lib/python2.7/threading.pyc'> ignored

Camilo

unread,
Sep 15, 2014, 3:08:10 PM9/15/14
to erpnext-dev...@googlegroups.com
Pratik,

I installed Python2.7 but the system shows still Python 2.6.6
I think it has something to do with it but I don't know the solution yet. Any idea?
Thank you,
Camilo

Sunil Kumar

unread,
Sep 15, 2014, 11:31:40 PM9/15/14
to erpnext-dev...@googlegroups.com
Hello Camilo,

I think issue is with your server configuration. Otherwise ERPNext installation for production/development is just a 5 min job.

I would say, try once DigitalOcean, amazon, Google. I'm sure your ERPNext experience will be smooth.

----
Sunil
Partner for ERPNext 

Pratik Vyas

unread,
Sep 15, 2014, 11:51:15 PM9/15/14
to erpnext-dev...@googlegroups.com
On Mon, Sep 15, 2014 at 11:51 PM, Camilo <camilo...@gmail.com> wrote:
> Two of them:
>
> Exception KeyError: KeyError(46928062566912,) in <module 'threading' from
> '/usr/local/lib/python2.7/threading.pyc'> ignored
> Exception KeyError: KeyError(47283097993728,) in <module 'threading' from
> '/usr/local/lib/python2.7/threading.pyc'> ignored
>

Gunicorn is using Python 2.7 (evident from the traceback). Can you try
restarting the processes?

`sudo supervisorctl restart frappe:`

Thanks,
--
Pratik
erpnext

Camilo Correa

unread,
Sep 16, 2014, 7:08:48 AM9/16/14
to erpnext-dev...@googlegroups.com
Hello Pratik, This is what I get. What this mean, please. Thank you

root@vps [~/frappe-bench]# supervisorctl status
frappe:frappe-web                RUNNING   pid 3154, uptime 15:04:20
frappe:frappe-worker             RUNNING   pid 3153, uptime 15:04:20
frappe:frappe-workerbeat         RUNNING   pid 3155, uptime 15:04:20
root@vps [~/frappe-bench]# supervisorctl restart frappe
frappe: ERROR (no such process)
frappe: ERROR (no such process)
root@vps [~/frappe-bench]#


--
Pratik
erpnext

--
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 a topic in the Google Groups "ERPNext Developer Forum" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/erpnext-developer-forum/BIz4bhKo_-Q/unsubscribe.
To unsubscribe from this group and all its topics, 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/CAG8U0En6ojXb5iMV1R4WtH3Jmp%2Bzb0_4BbfrDk0vHoqGBBDc9Q%40mail.gmail.com.

Pratik Vyas

unread,
Sep 16, 2014, 7:19:44 AM9/16/14
to erpnext-dev...@googlegroups.com
On Tue, Sep 16, 2014 at 4:38 PM, Camilo Correa <camilo...@gmail.com> wrote:
> Hello Pratik, This is what I get. What this mean, please. Thank you
>
> root@vps [~/frappe-bench]# supervisorctl status
> frappe:frappe-web RUNNING pid 3154, uptime 15:04:20
> frappe:frappe-worker RUNNING pid 3153, uptime 15:04:20
> frappe:frappe-workerbeat RUNNING pid 3155, uptime 15:04:20
> root@vps [~/frappe-bench]# supervisorctl restart frappe
> frappe: ERROR (no such process)
> frappe: ERROR (no such process)
> root@vps [~/frappe-bench]#
>

You forgot the colon in the end,

`supervisorctl restart frappe:`

Also, after you restart, what is the output of `curl localhost:8000`

Camilo

unread,
Sep 16, 2014, 7:21:51 AM9/16/14
to erpnext-dev...@googlegroups.com
Sunil,
Yes, I will consider DigitalOcean as soon as our contract is near to the end. I hear good things about. Thank you.
I hope it willo be possible to get supervisor doing th job...
Camilo

Camilo

unread,
Sep 16, 2014, 7:24:27 AM9/16/14
to erpnext-dev...@googlegroups.com
Thank you!

curl: (7) couldn't connect to host

Pratik Vyas

unread,
Sep 16, 2014, 9:50:02 AM9/16/14
to erpnext-dev...@googlegroups.com
Alright that means that gunicorn is not running. Can you stop
supervisor and try this,

`supervisorctl stop frappe:`

```
cd frappe-bench/sites
../env/bin/gunicorn -b 127.0.0.1:8000 frappe.app:application

```

The above command is what supervisor will try to run.
> --
> 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/c7703260-1e10-4111-802d-434486811042%40googlegroups.com.
>
> For more options, visit https://groups.google.com/d/optout.



--
Pratik
erpnext

Camilo

unread,
Sep 16, 2014, 10:13:53 AM9/16/14
to erpnext-dev...@googlegroups.com
Done!
root@vps [~/frappe-bench]# supervisorctl stop frappe:
frappe:frappe-web: stopped
frappe:frappe-workerbeat: stopped
frappe:frappe-worker: stopped
root@vps [~/frappe-bench]# cd sites
root@vps [~/frappe-bench/sites]# ../env/bin/gunicorn -b 127.0.0.1:8000 frappe.app:application


no answer at all.

Camilo

unread,
Sep 16, 2014, 10:19:08 AM9/16/14
to erpnext-dev...@googlegroups.com
but now I access the site "incomplete" at port 8765: http://promusica.co:8765/

success??...
Thanks,
Camilo

Pratik Vyas

unread,
Sep 16, 2014, 10:38:26 AM9/16/14
to erpnext-dev...@googlegroups.com
Post your gunicorn and nginx config (via dpaste.com)
>> > email to erpnext-developer...@googlegroups.com.
>> > To view this discussion on the web visit
>> >
>> > https://groups.google.com/d/msgid/erpnext-developer-forum/c7703260-1e10-4111-802d-434486811042%40googlegroups.com.
>> >
>> > For more options, visit https://groups.google.com/d/optout.
>>
>>
>>
>> --
>> Pratik
>> erpnext
>
> --
> 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/06644f75-2c2d-431e-88fb-ca0d8087802a%40googlegroups.com.

Camilo

unread,
Sep 16, 2014, 11:25:23 AM9/16/14
to erpnext-dev...@googlegroups.com
sorry Pratik, which is the name of the gunicorn conf file. just gunicorn? Thank you.

Camilo

unread,
Sep 18, 2014, 6:50:15 AM9/18/14
to erpnext-dev...@googlegroups.com
now I know how dpaste works!...sorry for the delay. Thank you!!

http://dpaste.com/35YE793

Camilo

unread,
Sep 19, 2014, 7:56:50 AM9/19/14
to erpnext-dev...@googlegroups.com
Sunil,

The experience with DigitalOcean was awesome, although trying to install ERPNext  manualy brougth me to understand more the components and how it works.

"Setup-frappe.sh" did the job perfectly!

Still, I'm havig dificulties with supervisor. I will come back with details. For now, thank you! all for your help and advice.
Camilo

On Tuesday, September 16, 2014 5:31:40 AM UTC+2, Sunil Kumar wrote:

Sunil Kumar

unread,
Sep 19, 2014, 1:03:25 PM9/19/14
to erpnext-dev...@googlegroups.com
Best of luck Camilo.

If you looking for performance even better than DigitalOcean, try Google cloud platform. 
For testing purpose, I have installed ERPNext on Azure, Amazon, Openshift, DigitalOcean and Google. Every where I got issue pertains of Nginx & supervisor but Google instance is up and running without any issue till yet. 

Reread & update supervisor, it might work for you :)

sudo supervisorctl reread
sudo supervisorctl update

----
Sunil
Partner for ERPNext 

Pratik Vyas

unread,
Sep 19, 2014, 1:14:58 PM9/19/14
to erpnext-dev...@googlegroups.com

Thanks.

Sorry, I meant supervisor config

>> >> > email to erpnext-developer...@googlegroups.com.

>> > email to erpnext-developer...@googlegroups.com.


>> > To view this discussion on the web visit
>> >
>> > https://groups.google.com/d/msgid/erpnext-developer-forum/06644f75-2c2d-431e-88fb-ca0d8087802a%40googlegroups.com.
>> >
>> > For more options, visit https://groups.google.com/d/optout.
>>
>>
>>
>> --
>> Pratik
>> erpnext
>

> --
> 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/e221c664-531a-42f4-b735-05d9ddb32e16%40googlegroups.com.


>
> For more options, visit https://groups.google.com/d/optout.

--
Pratik
erpnext

Camilo

unread,
Sep 22, 2014, 7:10:31 AM9/22/14
to erpnext-dev...@googlegroups.com
This is it, supervisor.conf

http://dpaste.com/3HW3W31

I will be able to look at it again in 2 hours or so.
Thank you!
Camilo

--
Pratik
erpnext

Reply all
Reply to author
Forward
0 new messages