Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 30 Jan 2014 02:06:50 GMT
From:      Marc Rassbach <marc+fbsdopenerp7@sherpaconsulting.org>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   ports/186262: finance/openerp-server port is non-functional as shipped.
Message-ID:  <201401300206.s0U26oCt070600@oldred.freebsd.org>
Resent-Message-ID: <201401300210.s0U2A0xo043821@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         186262
>Category:       ports
>Synopsis:       finance/openerp-server port is non-functional as shipped.
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Jan 30 02:10:00 UTC 2014
>Closed-Date:
>Last-Modified:
>Originator:     Marc Rassbach
>Release:        FreeBSD 10.0 RELEASE
>Organization:
Sherpa Consulting
>Environment:
FreeBSD showbroke.sherpaconsulting.org 10.0-RELEASE FreeBSD 10.0-RELEASE #0 r260789: Thu Jan 16 22:34:59 UTC 2014     root@snap.freebsd.org:/usr/obj/usr/src/sys/GENERIC  amd64

>Description:
Short Version:
Various ports are not included.   And once included it ends up dead with:
OperationalError: Unable to use a closed cursor.



Long winded version:

The 1st error was complaining about cairo and as I did not ssh in I don't have something to cut and paste.

Eventually you get to:
/usr/local/bin/openerp-server
Traceback (most recent call last):
......
ImportError: No module named simplejson

So install simplejson and then get to:

After simplejson is installed:
/usr/local/bin/openerp-server
Traceback (most recent call last):
....
ImportError: No module named werkzeug.serving


Now the error log has:
CRITICAL:openerp.modules.module:Couldn't load module web
CRITICAL:openerp.modules.module:No module named unittest2

Later the log says:
CRITICAL:openerp.modules.module:No module named openid

Then:
CRITICAL:openerp.modules.module:No module named docutils

After docutils is installed - the log complaints about web go away and are replaced with:
WARNING:openerp.addons.email_template.email_template:jinja2 not available, templating features will not work!
WARNING:openerp.addons.google_docs.google_docs:Please install latest gdata-python-client from http://code.google.com/p/gdata-python-client/downloads/list


Huzaaa!  In the sense that a web page now exists at http://ipaddress:8069
And now it just bitches about a lack of a database - but if one goes to that page and did the poor security of giving superuser to the openerp login it now bombs with an error in the web browser.

Client Traceback (most recent call last):
  File "/usr/local/openerp/addons/web/http.py", line 204, in dispatch
    response["result"] = method(self, **self.params)
  File "/usr/local/openerp/addons/web/controllers/main.py", line 774, in create
    params['create_admin_pwd'])
  File "/usr/local/openerp/addons/web/session.py", line 30, in proxy_method
    result = self.session.send(self.service_name, method, *args)
  File "/usr/local/openerp/addons/web/session.py", line 103, in send
    raise xmlrpclib.Fault(openerp.tools.ustr(e), formatted_info)


Server Traceback (most recent call last):
  File "/usr/local/openerp/addons/web/session.py", line 89, in send
    return openerp.netsvc.dispatch_rpc(service_name, method, args)
  File "/usr/local/lib/python2.7/site-packages/openerp/netsvc.py", line 292, in dispatch_rpc
    result = ExportService.getService(service_name).dispatch(method, params)
  File "/usr/local/lib/python2.7/site-packages/openerp/service/web_services.py", line 122, in dispatch
    return fn(*params)
  File "/usr/local/lib/python2.7/site-packages/openerp/service/web_services.py", line 168, in exp_create_database
    _initialize_db(self, id, db_name, demo, lang, user_password)
  File "/usr/local/lib/python2.7/site-packages/openerp/service/web_services.py", line 98, in _initialize_db
    cr.close()
  File "/usr/local/lib/python2.7/site-packages/openerp/sql_db.py", line 160, in wrapper
    raise psycopg2.OperationalError(msg)
OperationalError: Unable to use a closed cursor.





>How-To-Repeat:
Install new FreeBSD 10.0 and run the below script

#! /bin/sh
cd /usr/ports
portsnap fetch
portsnap extract
portsnap fetch
portsnap update
cd /usr/ports/finance/openerp-server
make install BATCH=yes
# blows up with missing  cairo  Do another make install BATCH=yes
make install BATCH=yes
cp /usr/local/etc/openerp-server.conf.sample /usr/local/etc/openerp-server.conf
# the build works now and the instructions included are a far more correct 
# way of being a real DBA VS following the instructions from OpenERP at
# https://doc.openerp.com/install/linux/postgres/
# Now the server isn't actually installed but 9.0 client is.  So go get server 
# installed.   Should prob. pick 9.2 client/server 1st then install openerp-server.
cd /usr/ports/databases/postgresql90-server
make install BATCH=yes
echo 'postgresql_enable="YES"' >> /etc/rc.conf
/usr/local/etc/rc.d/postgresql initdb
/usr/local/etc/rc.d/postgresql start
# now for doing a bad thing - make openerp user WAY too powerful.   
echo 'Gonna ask for a password - insecure ppl just use openerp OK?'
echo 'grep db_password /usr/local/etc/openerp-server.conf'
grep db_password /usr/local/etc/openerp-server.conf
createuser -s -P --username pgsql openerp
# enter in the lousy password of openerp so it matches database options in 
# /usr/local/etc/openerp-server.conf  
# now get ready!  Watch it fail!
/usr/local/etc/rc.d/openerpd onestart
# look - failed to run.  lets watch the logs...no logs unless:
/usr/local/bin/openerp-server
cd /usr/ports/devel/py-simplejson
make install BATCH=yes
/usr/local/bin/openerp-server
cd /usr/ports/www/py-werkzeug
make install BATCH=yes
/usr/local/bin/openerp-server
# Good!   Letting you know you are an idiot to run as root!
# now we get /var/log/message action.   So a tail -f of /var/log/message in another window.
/usr/local/etc/rc.d/openerpd onestart
# trying the web page per the instructions given says:
# No handler found.
cd /usr/ports/devel/py-unittest2
make install BATCH=yes
# Odds are this is wrong and I should modify the openerp-server.conf but that 
# will be next
cd /usr/ports/www/webpy
make install BATCH=yes


# fine - modify the conf file   I could do it with sed but just run vi.
echo 'vi /usr/local/etc/openerp-server.conf and edit the path to include where it is installed /usr/local/openerp OK?'
echo ',/usr/local/openerp to the correct root and addons path'
exit 0

#! /bin/sh
# post vi-ing as I'm not wanting to use sed, m'kay?
/usr/local/etc/rc.d/openerpd onestart
cd /usr/ports/devel/py-mock
make install BATCH=yes
# now one needs to start looking for running version of openerp server and killing 'em.
# Things are looking up!  at least the process stay around now VS dying.
# and now its bright enough to know that the default directory listed is 
# not there.   
# if you keep running /usr/local/etc/rc.d/openerpd onestart eventually you'll 
# perhaps find an openerp bug?   Unless you change to 
# root_path = /usr/local/openerp
# addons_path = /usr/local/openerp/addons
# and be rid of the bad directory you won't see the need for openid
cd /usr/ports/security/py-openid
make install BATCH=yes
cd /usr/ports/textproc/py-docutils
make install BATCH=yes
cd /usr/ports/devel/py-gdata
make install BATCH=yes
cd /usr/ports/devel/py-Jinja2
make install BATCH=yes
#
# And the end of the saga for me as I don't know if it is a port issue or not
#
/usr/local/etc/rc.d/openerpd onestart










>Fix:
Well, doing the "script" gets most of the stuff fixed but it still seems broken.   My time with OpenERP doesn't give me insight if the code/port is bad or if I'm the broken item in the toolchain.  Odds are the not installing PostgreSQL server 1st is a mis-step on my part.  

But now I turn it over to the port maintainer....



>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201401300206.s0U26oCt070600>