Error while Installation on CentOS

OS -> CentOS 6.5
upgrade python2.7 and all prerequisites
download of bench-repo and installation is successful.

Getting Error while running this CLI

server# bench init frappe-bench
Traceback (most recent call last):
File “/usr/bin/bench”, line 9, in
load_entry_point(‘bench==0.1’, ‘console_scripts’, ‘bench’)()
File “/home/jivant/bench-repo/bench/cli.py”, line 29, in cli
return bench()
File “/usr/lib64/python2.6/site-packages/click/core.py”, line 610, in call
return self.main(*args, **kwargs)
File “/usr/lib64/python2.6/site-packages/click/core.py”, line 590, in main
rv = self.invoke(ctx)
File “/usr/lib64/python2.6/site-packages/click/core.py”, line 936, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/usr/lib64/python2.6/site-packages/click/core.py”, line 782, in invoke
return ctx.invoke(self.callback, **ctx.params)
File “/usr/lib64/python2.6/site-packages/click/core.py”, line 416, in invoke
return callback(*args, **kwargs)
File “/home/jivant/bench-repo/bench/cli.py”, line 68, in init
no_auto_update=no_auto_update, frappe_path=frappe_path, frappe_branch=frappe_branch)
File “/home/jivant/bench-repo/bench/utils.py”, line 31, in init
print ‘Directory {} already exists!’.format(path)
ValueError: zero length field name in format

Does frappe-bench dir already exist?

Also, the installation script installs python2.7 also, so no need to do that manually. Can you try with a clean installaiton?

Hi pdvyas
M sorry for a little mistake. Actually error start with this CLI.

  1. bench init frappe-bench
    Traceback (most recent call last):
    File “/usr/bin/bench”, line 9, in
    load_entry_point(‘bench==0.1’, ‘console_scripts’, ‘bench’)()
    File “/home/jivant/bench-repo/bench/cli.py”, line 29, in cli
    return bench()
    File “/usr/lib64/python2.6/site-packages/click/core.py”, line 610, in call
    return self.main(*args, **kwargs)
    File “/usr/lib64/python2.6/site-packages/click/core.py”, line 590, in main
    rv = self.invoke(ctx)
    File “/usr/lib64/python2.6/site-packages/click/core.py”, line 936, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
    File “/usr/lib64/python2.6/site-packages/click/core.py”, line 782, in invoke
    return ctx.invoke(self.callback, **ctx.params)
    File “/usr/lib64/python2.6/site-packages/click/core.py”, line 416, in invoke
    return callback(*args, **kwargs)
    File “/home/jivant/bench-repo/bench/cli.py”, line 68, in init
    no_auto_update=no_auto_update, frappe_path=frappe_path, frappe_branch=frappe_branch)
    File “/home/jivant/bench-repo/bench/utils.py”, line 40, in init
    setup_env(bench=path)
    File “/home/jivant/bench-repo/bench/utils.py”, line 65, in setup_env
    exec_cmd(‘virtualenv -q {} -p {}’.format(‘env’, sys.executable), cwd=bench)
    ValueError: zero length field name in format

  2. Actually was not installing all software, so i need to install it manually.

Hopefully you got the idea of problem statement.

Regards
shiv

It seems that bench is not running on python2.7

Can you start with a minimal centos image and let the setup_frappe.sh script handle all deps? It installs the correct version of python too.

Hi pdvyas
I got this Error i started installed in new CentOS using setup_frappe.sh file only.

(14/42): libXpm-3.5.10-2.el6.x86_64.rpm | 51 kB 00:00
(15/42): libaio-0.3.107-10.el6.x86_64.rpm | 21 kB 00:00
(16/42): libcom_err-1.41.12-18.el6_5.1.x86_64.rpm | 37 kB 00:00
(17/42): libcom_err-devel-1.41.12-18.el6_5.1.x86_64.rpm | 32 kB 00:00
(18/42): libevent-1.4.13-4.el6.x86_64.rpm | 66 kB 00:00
(19/42): libgcrypt-devel-1.4.5-11.el6_4.x86_64.rpm | 118 kB 00:00
(20/42): libgpg-error-devel-1.7-4.el6.x86_64.rpm | 14 kB 00:00
(21/42): libselinux-devel-2.0.94-5.3.el6_4.1.x86_64.rpm | 136 kB 00:00
(22/42): libsepol-devel-2.0.41-4.el6.x86_64.rpm | 64 kB 00:00
(23/42): libss-1.41.12-18.el6_5.1.x86_64.rpm | 41 kB 00:00
(24/42): libxml2-2.7.6-14.el6_5.2.x86_64.rpm | 800 kB 00:08
(25/42): libxml2-devel-2.7.6-14.el6_5.2.x86_64.rpm | 1.1 MB 00:08
(26/42): libxslt-1.1.26-2.el6_3.1.x86_64.rpm | 452 kB 00:03
(27/42): libxslt-devel-1.1.26-2.el6_3.1.x86_64.rpm | 561 kB 00:04
(28/42): memcached-1.4.4-3.el6.x86_64.rpm | 68 kB 00:01
(29/42): nginx-1.0.15-5.el6.x86_64.rpm | 397 kB 00:03
(30/42): openssl-1.0.1e-16.el6_5.15.x86_64.rpm | 1.5 MB 00:14
(31/42): openssl-devel-1.0.1e-16.el6_5.15.x86_64.rpm | 1.2 MB 00:16
(32/42): perl-DBI-1.609-4.el6.x86_64.rpm | 705 kB 00:14
(33/42): postfix-2.6.6-6.el6_5.x86_64.rpm | 2.0 MB 00:22
(34/42): python-setuptools-0.6.10-3.el6.noarch.rpm | 336 kB 00:04
(35/42): python27-2.7.8-1.ius.centos6.x86_64.rpm | 79 kB 00:00
(36/42): python27-backports-1.0-2.ius.centos6.x86_64.rpm | 4.6 kB 00:00
(37/42): python27-backports-ssl_match_hostname-3.4.0.2-2.ius.centos6.noarch.rpm | 11 kB 00:00
(38/42): python27-devel-2.7.8-1.ius.centos6.x86_64.rpm | 385 kB 00:06
(39/42): python27-libs-2.7.8-1.ius.centos6.x86_64.rpm | 5.4 MB 02:12
(40/42): python27-setuptools-5.8-1.ius.centos6.noarch.rpm | 426 kB 00:13
(41/42): redis-2.4.10-1.el6.x86_64.rpm | 213 kB 00:07
(42/42): zlib-devel-1.2.3-29.el6.x86_64.rpm | 44 kB 00:00

Error Downloading Packages:
MariaDB-client-5.5.40-1.el6.x86_64: failure: rpms/MariaDB-5.5.40-centos6-x86_64-client.rpm from mariadb: [Errno 256] No more mirrors to try.
MariaDB-server-5.5.40-1.el6.x86_64: failure: rpms/MariaDB-5.5.40-centos6-x86_64-server.rpm from mariadb: [Errno 256] No more mirrors to try.
MariaDB-compat-5.5.40-1.el6.x86_64: failure: rpms/MariaDB-5.5.40-centos6-x86_64-compat.rpm from mariadb: [Errno 256] No more mirrors to try.

seems to be problem with mariadb repo, can you try again after sometime?

Hi Tried to install again by commenting initial packages and it installed completely and completed all Steps using this link

But Still i am facing these 2 issues

  1. Whenever i am tried to reload and restart nginx server i am getting this error.
    server# /etc/init.d/nginx reload
    nginx: [alert] could not open error log file: open() “/var/log/nginx/error.log” failed (13: Permission denied)
    2014/10/15 18:39:38 [warn] 1220#0: the “user” directive makes sense only if the master process runs with super-user privileges, ignored in /etc/nginx/nginx.conf:5
    2014/10/15 18:39:38 [emerg] 1220#0: open() “/var/run/nginx.pid” failed (13: Permission denied)
    nginx: configuration file /etc/nginx/nginx.conf test failed

I even tried to change the ownership and permission of the log files and nginx folder to 755 and owner nginx. But still i am getting this Error.

  1. I am not able to access Site. I tried using “curl localhost” then i am getting this Error

curl localhost:8080

502 Bad Gateway

502 Bad Gateway


nginx/1.0.15

Hi pdvyas
I am able to resolve above issue. So now i have only one issue :-
I have installed erpnext on my virtual machine so i want to access it from my local machine, i tried to access through ip and domain as well. But i am not able to access it.

     "curl localhost" and "curl ip"  is working fine.

And i am getting this Error in worker.error.log file

self._register(*ident)

File “/home/erpnext/frappe-bench/env/lib/python2.7/site-packages/kombu/transport/redis.py”, line 265, in _register
client.connection.connect()
File “/home/erpnext/frappe-bench/env/lib/python2.7/site-packages/redis/connection.py”, line 436, in connect
raise ConnectionError(self._error_message(e))
ConnectionError: Error 111 connecting to localhost:6379. Connection refused.
[2014-10-15 19:23:54,609: ERROR/MainProcess] consumer: Cannot connect to redis://localhost:6379//: Error 111 connecting to localhost:6379. Connection refused…
Trying again in 2.00 seconds…

      Hopefully i will hear from you soon.

For the error, your redis server seems.down

You’ll have to setup NAT or networking. Are you using the VM from our website?

Hi Pdvyas
No actually i have installed VM on my system and trying to install deployment process. Can you give me some reference that how to use NAT on machine.

Regards
Shiv

Hi Pdvyas
Is it possible to install ErpNext on my hosting machine where mysql and apache is already running. As mysql is using 3309 port and http is using 80 port. As for apache it is fine, i can run nginx on any other port. But mysql is it ok to not install mysql. Because there is difference in between mysql and MariaDB.

Hi pdvyas
Actually i moved Mysql and http to some other port so that it will not create any conflicts with erpnext. But now i am getting MariaDB installation failure Error.
See full logs in following link

http://pastebin.com/j5j9fmhV
Please suggest me what next i can take to keep both together on server.
Hopefully i will hear from you soon.

Thanks & Regards
Shiv

fixing virtualbox is out of scope but can you just try the vm available for download from https://erpnext.com/download?

it is port forwarding configured and will be available on port 8080 on host machine.

Hi pdvyas
Actually i moved Mysql and http to some other port so that it will not create any conflicts with erpnext. But now i am getting MariaDB installation failure Error.
See full logs in following link

http://pastebin.com/j5j9fmhV1
Please suggest me what next i can take to keep both together on server.
Hopefully i will hear from you soon.

Thanks & Regards
Shiv

Hi Pdvyas
I have done with installation process. Then i tried to access from browser.

  1. I am not login able to login as administrator and i am getting error on Javascript console

Failed to load resource: the server responded with a status of 404 (Not Found) http://66.160.143.119:8004/assets/css/frappe-web.css
Failed to load resource: the server responded with a status of 404 (Not Found) http://66.160.143.119:8004/assets/js/frappe-web.min.js
Failed to load resource: the server responded with a status of 404 (Not Found) http://66.160.143.119:8004/assets/frappe/js/lib/jquery/jquery.min.js
Failed to load resource: the server responded with a status of 404 (Not Found) http://66.160.143.119:8004/assets/js/erpnext-web.min.js
Uncaught ReferenceError: $ is not defined 66.160.143.119:8004/?:115
Uncaught ReferenceError: $ is not defined 66.160.143.119:8004/?:235
Uncaught ReferenceError: __ is not defined 66.160.143.119:8004/?:382

  1. I am getting these errors in nginx error.log

2014/10/18 15:30:29 [crit] 6751#0: *1 stat() “/home/frappe/frappe-bench/sites/erpnext/public//” failed (13: Permission denied), client: 103.29.221.211, server: erpnext, request: “GET / HTTP/1.1”, host: “66.160.143.119:8004”, referrer: “http://66.160.143.119:8004/

  Can you help me on this part. What is the reason ? Did i missed any step?

Thanks
Shiv

chmod o+rx /home/frappe
service nginx restart

What is preventing you from using the easy install script or the vm available for download?

Thanks allot pdvyas
Actually i tried to find on internet and i read some forums. And i got same solutions and its working now. I am getting Error for configuration of outgoing email server as below

outgoing_email_settings/outgoing_email_settings.py", line 29, in validate
sess = smtpserver.sess
File “/home/frappe/frappe-bench/apps/frappe/frappe/utils/email_lib/smtp.py”, line 82, in sess
cint(self.port) or None)
File “/usr/lib64/python2.7/smtplib.py”, line 251, in init
(code, msg) = self.connect(host, port)
File “/usr/lib64/python2.7/smtplib.py”, line 311, in connect
self.sock = self._get_socket(host, port, self.timeout)
File “/usr/lib64/python2.7/smtplib.py”, line 286, in _get_socket
return socket.create_connection((host, port), timeout)
File “/usr/lib64/python2.7/socket.py”, line 571, in create_connection
raise err
error: [Errno 110] Connection timed out