Unable to start ERPNext

215 views
Skip to first unread message

Sultan Ghaznawi

unread,
Apr 28, 2014, 1:42:49 PM4/28/14
to erpnext-dev...@googlegroups.com
Hi Folks,

I downloaded the application and tested it on a test machine for a couple of days, it looks good and I wanted to give it a go for using in our retail operation. Here is what I did:

1. Installed Ubuntu 14.04 LTS 64 bit on a virtualbox guest.
2. Followed the instructions at https://github.com/frappe/erpnext/wiki/How-to-Install-ERPNext to install ERP Next, which went without any errors.
3. Executed the instructions at https://github.com/frappe/erpnext/wiki/WSGI-Production-Deployment to get the application to launch as a service on the production box. Again, there were no errors.

After step 3 was completed, I am able to see the generic NGINX html page when I go to http://serverIP which does not redirect the traffic to the ERPNext application. I did change the /path/to/ERPNext path in step 3 (both supervisor and nginx scripts) to make sure that wouldn't create a problem, rebuilt the python script as described at the end of 3 and yet again the ERPNext application is not running.

I am sure it is something trivial as I have been able to get ERPNext to run in the testing mode before. Please let me know what would the issue and any known fixes if you have.

Thanks,

Sultan

Pratik Vyas

unread,
Apr 28, 2014, 1:54:54 PM4/28/14
to erpnext-dev...@googlegroups.com
On Mon, Apr 28, 2014 at 11:12 PM, Sultan Ghaznawi
<sultan....@gmail.com> wrote:
> Hi Folks,
>
> I downloaded the application and tested it on a test machine for a couple of
> days, it looks good and I wanted to give it a go for using in our retail
> operation. Here is what I did:
>
> 1. Installed Ubuntu 14.04 LTS 64 bit on a virtualbox guest.
> 2. Followed the instructions at
> https://github.com/frappe/erpnext/wiki/How-to-Install-ERPNext to install ERP
> Next, which went without any errors.
> 3. Executed the instructions at
> https://github.com/frappe/erpnext/wiki/WSGI-Production-Deployment to get the
> application to launch as a service on the production box. Again, there were
> no errors.
>
> After step 3 was completed, I am able to see the generic NGINX html page
> when I go to http://serverIP which does not redirect the traffic to the
> ERPNext application. I did change the /path/to/ERPNext path in step 3 (both
> supervisor and nginx scripts) to make sure that wouldn't create a problem,
> rebuilt the python script as described at the end of 3 and yet again the
> ERPNext application is not running.

Great! All looks good. If you have replaced nginx.conf by what is in
the example conf, there is no reason for it to show the default page.
Did you reload nginx after making the changes? Also reload supervisor
if you see something like bad gateway.

>
> I am sure it is something trivial as I have been able to get ERPNext to run
> in the testing mode before. Please let me know what would the issue and any
> known fixes if you have.
>
> Thanks,
>
> Sultan
>
> --
> Note:
>
> If you are posting an issue,
> 1. 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.
> 2. Paste your code at http://pastebin.com or http://gist.github.com and send
> only the URL via email
> 3. 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/f6968e85-c7bd-4609-9010-11f0bef32bbc%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.



--
Pratik
erpnext

Sultan Ghaznawi

unread,
Apr 28, 2014, 7:34:26 PM4/28/14
to erpnext-dev...@googlegroups.com
Hi Pratik,

Thanks for your response. I tried so many things and nothing worked, infact I broke a few things. I installed a fresh VM with exact configuration as outlined above. This time, however, I replaced all the contents of the nginx.conf (as opposed to parts of it earlier) with the example for nginx.conf that you have provided on the 3 above. I made sure that the "/path/to/erpnext" is replace with the path to the wnf.py file which is "/home/erpnext/erpnext/lib/wnf.py" in both the supervisor and the nginx configuration files.


Again, the installation went will until the very end.

Running
sudo supervisorctl restart gunicorn

says "gunicorn: ERROR (not running)" and "gunicorn: ERROR (abnormal termination)".

Since everything is the same, I am assuming that the path to erpnext is incorrect. Can you please elaborate on this?

Thanks,

Sultan


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/QIoaDkLd9-U/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/CAG8U0E%3Dr%3D%2BtVspk00RFuidKHypEAVCrM3qoqh2j16%3Djfeh6PbA%40mail.gmail.com.

Pratik Vyas

unread,
Apr 29, 2014, 12:28:33 AM4/29/14
to erpnext-dev...@googlegroups.com
On Tue, Apr 29, 2014 at 5:04 AM, Sultan Ghaznawi
<sultan....@gmail.com> wrote:
> Hi Pratik,
>
> Thanks for your response. I tried so many things and nothing worked, infact
> I broke a few things. I installed a fresh VM with exact configuration as
> outlined above. This time, however, I replaced all the contents of the
> nginx.conf (as opposed to parts of it earlier) with the example for
> nginx.conf that you have provided on the 3 above. I made sure that the
> "/path/to/erpnext" is replace with the path to the wnf.py file which is
> "/home/erpnext/erpnext/lib/wnf.py" in both the supervisor and the nginx
> configuration files.
>
>
> Again, the installation went will until the very end.
>
> Running
>
> sudo supervisorctl restart gunicorn
>
> says "gunicorn: ERROR (not running)" and "gunicorn: ERROR (abnormal
> termination)".
>
>
> Since everything is the same, I am assuming that the path to erpnext is
> incorrect. Can you please elaborate on this?
>

Okay, lets see why gunicorn terminated abnormally. Can you see the
logs? By default, I think they are stored in /tmp

> Thanks,
>
> Sultan
>


--
Pratik
erpnext

Sultan Ghaznawi

unread,
Apr 29, 2014, 9:17:21 AM4/29/14
to erpnext-dev...@googlegroups.com
Hi Pratik,

Thanks for your response. Actually, I can not find any log files for gunicorn under /tmp or under /var/log directories. I do see the logs for nginx and supervisor under /var/log.

Your help is very much appreciated

Sultan


>


--
Pratik
erpnext

--
Note:

If you are posting an issue,
1. 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.
2. Paste your code at http://pastebin.com or http://gist.github.com and send only the URL via email
3. 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/QIoaDkLd9-U/unsubscribe.
To unsubscribe from this group and all its topics, send an email to erpnext-developer...@googlegroups.com.

Pratik Vyas

unread,
Apr 29, 2014, 9:48:26 AM4/29/14
to erpnext-dev...@googlegroups.com
Hi Sultan,

On Tue, Apr 29, 2014 at 6:47 PM, Sultan Ghaznawi
<sultan....@gmail.com> wrote:
> Hi Pratik,
>
> Thanks for your response. Actually, I can not find any log files for
> gunicorn under /tmp or under /var/log directories. I do see the logs for
> nginx and supervisor under /var/log.
>

You can set stderr_logfile
(http://supervisord.org/configuration.html#program-x-section-settings)

Or run `supervisorctl tail gunicorn stderr` (could be error instead of
stderr, writing from memory).
> 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/CAPg4WV-oEKQFPmUDkSgiVgVdAUvHwx_Z9DqicpcrEwnASw85vg%40mail.gmail.com.
>
> For more options, visit https://groups.google.com/d/optout.



--
Pratik
erpnext

Sultan Ghaznawi

unread,
Apr 29, 2014, 10:28:32 AM4/29/14
to erpnext-dev...@googlegroups.com
Thanks Pratik, I am a little confused. I opened the supervisord.conf file and following the instructions in the link, I wanted to place the stderr_logfile variable inside it. But I guess I need to specify a program with which this log will be invoked. Any pointers there would be very much appreciated.

I found a couple of error log files that are gunicorn related, in the /var/log/supervisor directory and here are what they say:

gunicorn-stdout---supervisor-TBBZmP.log

supervisor: couldn't chdir to /home/erpnext/erpnext/lib/wnf.py: ENOTDIR
supervisor: child process was not spawned
supervisor: couldn't chdir to /home/erpnext/erpnext/lib/wnf.py: ENOTDIR
supervisor: child process was not spawned
supervisor: couldn't chdir to /home/erpnext/erpnext/lib/wnf.py: ENOTDIR
supervisor: child process was not spawned
supervisor: couldn't chdir to /home/erpnext/erpnext/lib/wnf.py: ENOTDIR
supervisor: child process was not spawned
supervisor: couldn't chdir to /home/erpnext/erpnext/lib/wnf.py: ENOTDIR
supervisor: child process was not spawned
supervisor: couldn't chdir to /home/erpnext/erpnext/lib/wnf.py: ENOTDIR
supervisor: child process was not spawned
supervisor: couldn't chdir to /home/erpnext/erpnext/lib/wnf.py: ENOTDIR
supervisor: child process was not spawned
supervisor: couldn't chdir to /home/erpnext/erpnext/lib/wnf.py: ENOTDIR

--------

gunicorn-stderr---supervisor-vQN1ZW.log is empty

-----------

supervisord.log:

2014-04-28 19:19:15,013 CRIT Supervisor running as root (no user in config file)
2014-04-28 19:19:15,041 INFO RPC interface 'supervisor' initialized
2014-04-28 19:19:15,041 CRIT Server 'unix_http_server' running without any HTTP authentication checking
2014-04-28 19:19:15,043 INFO daemonizing the supervisord process
2014-04-28 19:19:15,044 INFO supervisord started with pid 12114
2014-04-28 19:20:35,803 CRIT Supervisor running as root (no user in config file)
2014-04-28 19:20:35,803 WARN Included extra file "/etc/supervisor/conf.d/gunicorn.conf" during parsing
2014-04-28 19:20:35,803 INFO RPC interface 'supervisor' initialized
2014-04-28 19:20:35,804 CRIT Server 'unix_http_server' running without any HTTP authentication checking
2014-04-28 19:20:35,804 INFO supervisord started with pid 12114
2014-04-28 19:20:36,807 INFO spawned: 'gunicorn' with pid 12134
2014-04-28 19:20:36,817 INFO exited: gunicorn (exit status 127; not expected)
2014-04-28 19:20:37,820 INFO spawned: 'gunicorn' with pid 12135
2014-04-28 19:20:37,829 INFO exited: gunicorn (exit status 127; not expected)
2014-04-28 19:20:39,833 INFO spawned: 'gunicorn' with pid 12136
2014-04-28 19:20:39,839 INFO exited: gunicorn (exit status 127; not expected)
2014-04-28 19:20:42,845 INFO spawned: 'gunicorn' with pid 12137
2014-04-28 19:20:42,851 INFO exited: gunicorn (exit status 127; not expected)
2014-04-28 19:20:43,852 INFO gave up: gunicorn entered FATAL state, too many start retries too quickly
2014-04-28 19:28:46,762 INFO spawned: 'gunicorn' with pid 12937
2014-04-28 19:28:46,767 INFO exited: gunicorn (exit status 127; not expected)
2014-04-28 19:28:47,770 INFO spawned: 'gunicorn' with pid 12938
2014-04-28 19:28:47,786 INFO exited: gunicorn (exit status 127; not expected)
2014-04-28 19:28:49,791 INFO spawned: 'gunicorn' with pid 12939
2014-04-28 19:28:49,801 INFO exited: gunicorn (exit status 127; not expected)
2014-04-28 19:28:52,808 INFO spawned: 'gunicorn' with pid 12940
2014-04-28 19:28:52,816 INFO exited: gunicorn (exit status 127; not expected)
2014-04-28 19:28:53,818 INFO gave up: gunicorn entered FATAL state, too many start retries too quickly

--------------

I hope you can help me by getting an idea from the logs. I see the errors but your opinion is highly appreciated.

Thanks,

Sultan






Pratik Vyas

unread,
Apr 29, 2014, 12:09:49 PM4/29/14
to erpnext-dev...@googlegroups.com
Hi Sultan,
Good Job with the logs! It seems that your directory variable is set
to the path of wnf.py and not the erpnext dir. From the logs, I
deduce, it should be '/home/erpnext/erpnext/'


Thanks,
Pratik
--
ERPNext

Sultan Ghaznawi

unread,
Apr 29, 2014, 3:17:52 PM4/29/14
to erpnext-dev...@googlegroups.com
Hi Pratik,

Thank you so much for all your help. That fixed the issue with gunicorn and I don't see those errors anymore. However, when I go to the http://xxx.xxx.x.xxx which is the IP address of the box (on port 80), I get the generic nginx index page. I have reloaded both supervisor and restarted nginx and gunicorn. I also ran the build command at the bottom of the WSGI deployment page.

Any ideas?

Sultan


--
Note:

If you are posting an issue,
1. 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.
2. Paste your code at http://pastebin.com or http://gist.github.com and send only the URL via email
3. 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/QIoaDkLd9-U/unsubscribe.
To unsubscribe from this group and all its topics, send an email to erpnext-developer...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages