Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 351927 - app-office/openerp-server-5.0.15 initd script fails to allow db connection
Summary: app-office/openerp-server-5.0.15 initd script fails to allow db connection
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Server (show other bugs)
Hardware: All Linux
: High major
Assignee: No maintainer - Look at https://wiki.gentoo.org/wiki/Project:Proxy_Maintainers if you want to take care of it
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-01-17 16:57 UTC by barrie backhurst
Modified: 2015-03-19 13:24 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description barrie backhurst 2011-01-17 16:57:41 UTC
Since the upgrade to openerp-server-5.0.15 I have been unable to connect to the database via either the web or gtk client. This happens on 2 separate machines, one testing(postgresql 9 and python 2.7) and the other stable(postgresql 8.4 and python 2.6).

It appears that the init.d script may be either setting the root user as the postgresql user(which I do not have set up in either postgresql database) or ignoring the configuration file for some reason and loading the defaults? Launching openerp-server manually with the following command

"python /usr/lib/python2.6/site-packages/openerp-server/openerp-server.py -c /etc/openerp/openerp-server.cfg" 

allows connection and creation of databases, although I did experience problems installing the sale module(which appears to be a known bug on the openerp forums).

If it helps no log file is generated when launching via the init.d script, whereas it is when launching via the command line

Reproducible: Always

Steps to Reproduce:
1./etc/init.d/openerp-server start
2.
3.

Actual Results:  
Server starts without error, but clients unable to connect

Expected Results:  
clients can connect to database
Comment 1 INODE64 Sistemas 2011-02-06 08:44:04 UTC
Check permissions in /etc/openerp and /usr/lib/python2.6/site-packages/openerp-server/addons

and 

db_user = openerp

in /etc/openerp/openerp-server.cfg
Comment 2 INODE64 Sistemas 2011-02-06 08:46:16 UTC
chown openerp:openerp -R /usr/lib/python2.6/site-packages/openerp-server/addons
chown openerp:openerp -R /etc/openerp

I change init script for start as root

Comment 3 barrie backhurst 2011-02-17 00:23:07 UTC
Hi Francisco

It was the permissions as you suggested.

Many thanks
Comment 4 Yaroslav Gorbunov 2011-03-04 20:57:12 UTC
In ebuilds attached to #267886 or available in overlays was OPENERP_USER="oerp" and OPENERP_GROUP="oerp". User had had
drwxr-xr-x  2 oerp   oerp    224 Mar  4 23:37 /var/run/openerp/

Now in main tree ebuilds OPENERP_USER="openerp" and OPENERP_GROUP="openerp". If user upgrade from old ebuild he still have oerp:oerp permissions, but should have openerp:openerp. Therefore he couldn't start openerp-server.

I solve it by adding
 pkg_postinst() {
+       chown ${OPENERP_USER}:${OPENERP_GROUP} /var/run/openerp
+       chown ${OPENERP_USER}:${OPENERP_GROUP} /var/log/openerp
+

Fixed ebuild available in yarik-overlay
Comment 5 Vladimir Datsevich 2014-12-16 21:46:09 UTC
Would it be possible to close this one, since outdated?
Comment 6 Pacho Ramos gentoo-dev 2015-03-19 13:24:24 UTC
dropped