Introduction
OpenERP 6.0 requires Python 2.6 and Postgres 8.4. This document describes how to install these on an Ubuntu 10.10 server (aka. Maverick Meerkat).
These instructions should be run as root – using sudo or similar.
Install and configure Postgresql 8.4
- Install Postgres. These instructions mostly come from this document: http://doc.openerp.com/install/linux/postgres/index.html
apt-get install postgresql apt-get install postgresql-server apt-get install postgresql-client
- Allow remote PgAdmin clients access to the database: edit /etc/postgresql/8.4/main/postgresql.conf and add this line:
listen_addresses = '*'
You could tighten this address range for better security.
- Set the logging level. To tell Postgres to log all SQL activity (i.e. to see all the SELECT’s, UPDATES, DELETEs and INSERT statements), edit /etc/postgresql/8.4/main/postgresql.conf and add this line:
log_statement = 'all'
- Allow openerp-server to connect to postgresql: edit /etc/postgresql/8.4/main/pg_hba.conf. Modify lines as indicated below:
# TYPE DATABASE USER CIDR-ADDRESS METHOD # "local" is for Unix domain socket connections only # MODIFY THE EXISTING LINE TO LOOK LIKE THIS: local all all trust # IPv4 local connections: # MODIFY THE EXISTING LINE TO LOOK LIKE THIS: host all all 127.0.0.1/32 trust # ADD THIS LINE TO ALLOW REMOTE ACCESS; use your own IP address range: host all all 10.10.10.0/24 trust # IPv6 local connections: host all all ::1/128 ident
You could tighten this address range and methods for better security.
- Retart Postgres
service postgresql restart
Install and configure the OpenERP Server
- Add an openerp user under which the openerp server can be run:
adduser openerp
- Set up a postgres user:
su - postgres createuser --createdb --no-createrole --pwprompt openerp Enter password for new role: ..... Enter it again: ..... Shall the new role be a superuser? (y/n) y
- Install the Python dependencies needed by OpenERP:
apt-get install python python-psycopg2 python-reportlab \ python-egenix-mxdatetime python-tz python-pychart \ python-pydot python-lxml python-vobject python-setuptools easy_install PyYaml apt-get install python-mako apt-get install python-yaml
The version numbers that got installed when I did this on 24 January 2011 were as follows; I’ve recorded these version numbers here because I found that OpenERP 6 does not work very well on Centos 5.5 and I suspect it is because some of the Centos Python packages are not up to the same version numbers as these ones, so if it’s any help to anybody installing on Centos 5.5, here’s version numbers you may need:
Package Version python 2.6 python-psycopg2 2.2.1 python-reportlab 2.4-3 python-egenix-mxdatetime python-tz 2010b-1 python-pychart 1.39-7 python-pydot 1.0.2-1 python-lxml 2.2.6.1 python-vobject 0.8.1c-3 python-setuptools 0.6.14-3 PyYaml 3.09-py2.6 python-mako 0.3.4-2 python-yaml 3.09-4 python-dev 2.6.6 - Install the OpenERP Server from http://www.openerp.com/download/stable/deb/openerp-server_6.0.1-0_all.deb. This step is NOT RECOMMENDED – I’ve included this step to show what I did, but I recommend you skip this step. After downloading the package, I installed it using
dpkg -i openerp-server_6.0.1-0_all.deb
however, I got the following dependency errors:
Selecting previously deselected package openerp-server. (Reading database ... 25179 files and directories currently installed.) Unpacking openerp-server (from openerp-server_6.0.1-0_all.deb) ... dpkg: dependency problems prevent configuration of openerp-server: openerp-server depends on python-libxslt1; however: Package python-libxslt1 is not installed. openerp-server depends on python-yaml; however: Package python-yaml is not installed. openerp-server depends on python-mako; however: Package python-mako is not installed. dpkg: error processing openerp-server (--install): dependency problems - leaving unconfigured Processing triggers for ureadahead ... Processing triggers for man-db ... Errors were encountered while processing: openerp-server
so I removed the package using:
dpkg -r openerp-server
- Install the OpenERP Server: download the package from http://www.openerp.com/download/stable/source/openerp-server-6.0.1.tar.gz then unzip it using
tar xvf openerp-server-6.0.1.tar.gz
then install it using
cd openerp-server-6.0.1 python setup.py install
Configure OpenERP Server as service
The OpenERP Server is now ready to run, and it can be run using these commands:
sudo -u openerp openerp-server
However, you will probably want the server to be started automatically at boot time, so install it as a service:
- Create a new fie, /etc/init.d/openerp-server with these contents. This script should work on Ubuntu and Centos. If you are on Ubuntu or Debian and have start-stop-daemon available, you can get a better script here.
#!/bin/sh # # OpenERP init script v0.1 for centos by Open-Future # Bert Deferme - www.open-future.be - bert@open-future.be # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License version 3 as # published by the Free Software Foundation. # # For a copy of the GNU General Public License, see <http://www.gnu.org/licenses/>. # chkconfig: 345 60 61 # description: starts the openerp-server service NAME=openerp-server USER=openerp PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/bin PIDDIR=/var/run/openerp PIDFILE=$PIDDIR/$NAME.pid DAEMON=/usr/local/bin/openerp-server DAEMONOPTS="--pidfile=${PIDFILE}" checkpid() { [ -f $PIDFILE ] || return 1 pid=`cat $PIDFILE` [ -d /proc/$pid ] && return 0 return 1 } do_start() { if [ -f $PIDFILE ]; then echo "pidfile already exists: $PIDFILE" exit 1 fi echo -n "Starting $NAME: " if [ ! -d $PIDDIR ] then mkdir $PIDDIR chown $USER $PIDDIR fi su - $USER -c "nohup $DAEMON $DAEMONOPTS >/dev/null 2>&1 &" sleep 3 checkpid if [ $? -eq 1 ]; then rm -f $PIDFILE echo "failed." exit 1 fi echo "done." } do_stop() { checkpid if [ $? -eq 1 ]; then echo -n "$NAME not running... (no pidfile found)" exit 0 fi echo -n "Stopping $NAME: " pid=`cat $PIDFILE` kill -15 $pid sleep 2 if [ $? -eq 1 ]; then echo "Failed. (pidfile found but process didn't exist)" exit 1 fi echo "done." } do_status() { echo -n "Checking $NAME: " checkpid if [ $? -eq 1 ]; then echo "stopped." else echo "running." fi } do_restart() { do_stop if [ $? -eq 1 ]; then exit 1 fi do_start } case "$1" in start) do_start ;; stop) do_stop ;; restart|force-reload) do_restart ;; status) do_status ;; *) N=/etc/init.d/$NAME echo "Usage: $N {start|stop|restart|status}" >&2 exit 1 ;; esac exit 0
- Make the file executable.
chmod a+x /etc/init.d/openerp-server
- DON’T DO THIS STEP: it wrongly rewrites the order of the filenaming in the /etc/rc?.d directories: Configure openerp-server to start on boot.
apt-get install chkconfig cd /etc/init.d chkconfig --add openerp-server chkconfig --levels 2345 openerp-server on
- Link from /etc/init.d/openerp-server to /etc/rc*.d (this is instead of the previous step):
ln -s /etc/init.d/openerp-server /etc/rc0.d/K83openerp-server ln -s /etc/init.d/openerp-server /etc/rc1.d/S83openerp-server ln -s /etc/init.d/openerp-server /etc/rc2.d/S83openerp-server ln -s /etc/init.d/openerp-server /etc/rc3.d/S83openerp-server ln -s /etc/init.d/openerp-server /etc/rc4.d/S83openerp-server ln -s /etc/init.d/openerp-server /etc/rc5.d/S83openerp-server ln -s /etc/init.d/openerp-server /etc/rc6.d/K83openerp-server
- Make sure the log file is writable by openerp.
touch /var/log/openerp-server.log chown openerp /var/log/openerp-server.log
- Create a config file. If the user you created as part of the installation was openerp, then create ~openerp/.openerp_serverrc with these contents:
[options] debug_mode = True logfile = /var/log/openerp-server.log log_level = debug_rpc_answer ############################################# # Uncomment the options that you want to override: # email_from = False # xmlrpc_interface = '' # this will bind the server to all interfaces # xmlrpc_port = 8069 # netrpc_interface = '' # netrpc_port = 8070 # xmlrpcs_interface = '' # this will bind the server to all interfaces # xmlrpcs_port = 8071 # db_host = False # db_port = False # db_name = False # db_user = False # db_password = False # db_maxconn = 64 # reportgz = False # netrpc = True # xmlrpc = True # xmlrpcs = True # translate_in = None # translate_out = None # overwrite_existing_translations = False # load_language = None # language = None # pg_path = None # admin_passwd = 'admin' # csv_internal_sep = ',' # addons_path = None # root_path = None # debug_mode = False # import_partial = "" # pidfile = None # logfile = None # logrotate = True # smtp_server = 'localhost' # smtp_user = False # smtp_port = 25 # smtp_ssl = False # smtp_password = False # stop_after_init = False # this will stop the server after initialization # syslog = False # log_level = INFO # Options for log-level are: ['info', 'debug_rpc', 'warn', 'critical', 'error', 'debug', 'notset', 'debug_rpc', 'debug_rpc_answer'] # debug_rpc_answer seems to be the highest level. # assert_exit_level = ERROR # level above which a failed assert will be raised # cache_timeout = 100000 # login_message = False # list_db = True # timezone = False # to override the default TZ # test_file = False # test_report_directory = False # test_disable = False # test_commit = False # static_http_enable = False # static_http_document_root = None # static_http_url_prefix = None # secure_cert_file = 'server.cert' # secure_pkey_file = 'server.pkey' # publisher_warranty_url = 'http://services.openerp.com/publisher-warranty/' #############################################
- If you were running these commands as root, change the ownership to openerp:
chown openerp:openerp ~openerp/.openerp_serverrc
- Start the OpenERP server:
service openerp-server start
Install and configure the OpenERP Web Client
The Web client is actually a server-side component, not a client-side component that needs to be installed on each client PC.
- Install these packages:
apt-get install python-dev build-essential
- Download and install the web client from http://www.openerp.com/download/stable/source/openerp-web-6.0.1.tar.gz
tar xvf openerp-web-6.0.1.tar.gz cd openerp-web python setup.py install
- Copy /usr/local/lib/python2.6/dist-packages/openerp_web-6.0.1-py2.6.egg/doc/openerp-web.cfg to /etc/openerp-web.cfg and edit it so that it looks something like this:
[global] server.environment = "development" # Some server parameters that you may want to tweak server.socket_host = "0.0.0.0" # server.socket_host = "127.0.0.1" server.socket_port = 8080 # Sets the number of threads the server uses server.thread_pool = 10 tools.sessions.on = True # Simple code profiling server.profile_on = False server.profile_dir = "profile" # if this is part of a larger site, you can set the path # to the TurboGears instance here #server.webpath = "" # Set to True if you are deploying your App behind a proxy # e.g. Apache using mod_proxy #tools.proxy.on = True # If your proxy does not add the X-Forwarded-Host header, set # the following to the *public* host url. #tools.proxy.base = 'http://example.com' # logging log.access_file = "/var/log/openerp-web/access.log" log.error_file = "/var/log/openerp-web/error.log" # OpenERP tools tools.nestedvars.on = True # OpenERP Server openerp.server.host = 'localhost' openerp.server.port = '8070' openerp.server.protocol = 'socket' openerp.server.timeout = 450 # Web client settings [openerp-web] # filter dblists based on url pattern? # NONE: No Filter # EXACT: Exact Hostname # UNDERSCORE: Hostname_ # BOTH: Exact Hostname or Hostname_ dblist.filter = 'NONE' # whether to show Databases button on Login screen or not dbbutton.visible = True # will be applied on company logo company.url = 'http://www.example.com/your_logo.jpg'
- SKIP THIS STEP: It is no longer needed as I fixed a bug in the /etc/init.d/openerp-web script, of which the latest version is below.
Make sure the log directory /var/log/openerp-web exists and is owned by openerp.mkdir /var/log/openerp-web chown openerp /var/log/openerp-web
- Create the openerp-web startup file, /etc/init.d/openerp-web, with these contents. This script should work on Ubuntu and Centos. If you are on Ubuntu or Debian and have start-stop-daemon available, you can get a better script here.
#!/bin/sh # # OpenERP init script v0.2 for Centos and Ubuntu by Open-Future # Bert Deferme - www.open-future.be - bert@open-future.be # Philip Uren - www.mbase.com.au - philu A-t ieee.org # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License version 3 as # published by the Free Software Foundation. # # For a copy of the GNU General Public License, see <http://www.gnu.org/licenses/>. # chkconfig: 345 61 60 # description: runs the openerp-web service ################################################################################### NAME=openerp-web USER=openerp PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/bin DAEMON=/usr/local/bin/openerp-web PIDDIR=/var/run/openerp PIDFILE=$PIDDIR/$NAME.pid DAEMONOPTS="-c /etc/openerp-web.cfg" checkpid() { [ -s $PIDFILE ] || return 1 pid=`cat $PIDFILE` [ -z "$pid" ] && return 1 [ -d /proc/$pid ] && return 0 return 1 } do_start() { if [ -f $PIDFILE ]; then echo "pidfile already exists: $PIDFILE" exit 1 fi echo -n "Starting $NAME: " if [ ! -d $PIDDIR ] then mkdir $PIDDIR chown $USER $PIDDIR fi su - $USER -c "nohup $DAEMON $DAEMONOPTS >/dev/null 2>&1 &" sleep 2 # This next line, in particular the use of the cut command, doesn't work on Ubuntu 10.10 # because it treats a single space as a delimiter, not a series of spaces. # pid=`ps -ef|grep openerp-web|grep -v grep|cut -d " " -f3` ps -ef | grep openerp-web | grep python | grep -v grep | awk '{print $2}' > $PIDFILE checkpid if [ $? -eq 1 ]; then rm -f $PIDFILE echo "failed." exit 1 fi echo "done." } do_stop() { checkpid if [ $? -eq 1 ]; then echo -n "$NAME not running... (no pidfile found)" exit 0 fi echo -n "Stopping $NAME: " pid=`cat $PIDFILE` kill -15 $pid sleep 2 if [ $? -eq 1 ]; then echo "Failed. (pidfile found but process didn't exist)" exit 1 fi rm $PIDFILE echo "done." } do_status() { echo -n "Checking $NAME: " checkpid if [ $? -eq 1 ]; then echo "stopped." else echo "running." fi } do_restart() { do_stop if [ $? -eq 1 ]; then exit 1 fi do_start } case "$1" in start) do_start ;; stop) do_stop ;; restart|force-reload) do_restart ;; status) do_status ;; *) N=/etc/init.d/$NAME echo "Usage: $N {start|stop|restart|status}" >&2 exit 1 ;; esac exit 0
- Make openerp-web executable:
chmod a+x /etc/init.d/openerp-web
- DON’T DO THIS STEP: it wrongly rewrites the order of the filenaming in the /etc/rc?.d directories: Configure openerp-web to start on boot.
chkconfig --add openerp-web chkconfig --levels 235 openerp-web on
- Link from /etc/init.d/openerp-server to /etc/rc*.d (this is instead of the previous step):
ln -s /etc/init.d/openerp-web /etc/rc0.d/K82openerp-web ln -s /etc/init.d/openerp-web /etc/rc1.d/S84openerp-web ln -s /etc/init.d/openerp-web /etc/rc2.d/S84openerp-web ln -s /etc/init.d/openerp-web /etc/rc3.d/S84openerp-web ln -s /etc/init.d/openerp-web /etc/rc4.d/S84openerp-web ln -s /etc/init.d/openerp-web /etc/rc5.d/S84openerp-web ln -s /etc/init.d/openerp-web /etc/rc6.d/K82openerp-web
- Start the OpenERP web client:
service openerp-web start
Install your Windows Client
- Download and install the Windows GTK Client from http://www.openerp.com/download/stable/source/openerp-client-6.0.1.tar.gz, or your preferred client from http://www.openerp.com/downloads. Run it; hit the Change button and point it to your server; hit the Cancel button on the login window, then go to File / Databases / New Database and create a new database and install modules and proceed to use the system.
Run OpenERP from a Web Client
- In your browser, go to http://example.com:8080, select your database, log in and proceed to use the system.
See Also
Here are some related references that may be helpful:
- How to install OpenERP 5.0.12 on Ubuntu 10.04:
http://www.novapointgroup.com/learn/articles/45-openerp/65-how-to-install-openerp-on-ubuntu - How to install OpenERP 6 on Ubuntu 10.04:
https://docs.google.com/viewer?a=v&pid=explorer&chrome=true&srcid=0B5sP74yBnjjDOTdmYjM1ZTItOWNlYi00OTNjLWI1ZDYtOTkyOTA0NGUzMWQ0&hl=en&authkey=CIz–pYK - How to install OpenERP 6 on Ubuntu 10.04 for beginners:
http://www.openerp.com/forum/topic17584.html - How to install OpenERP6 on Ubuntu 10.04
http://www.openerp.com/forum/topic22157.html - How to install OpenERP 6 on Ubuntu 10.04 in a Virtual Machine:
http://www.smartmode.co.uk/site/OpenERP-6-a-how-to-install-on-Ubuntu-10.4 - Installing OpenERP on Ubuntu 10.0.4 LTS
http://brunogirin.blogspot.com/2010/05/installing-openerp-on-ubuntu-1004-lts.html
thanks for this tutorial
However I think in step 4 in Install and configure Postgresql 8.4
we edit pg_hba.conf not postgesql.conf
please correct me if I am wrong
Thanks; I updated the document.
Point 4 should refer to file /etc/postgresql/8.4/main/pg_hba.conf
And in point 4 about the postgresql installation, the lines:
# ADD THIS LINE TO ALLOW REMOTE ACCESS; use your own IP address range;
local all all 10.10.10.0/24 trust
should look like:
# ADD THIS LINE TO ALLOW REMOTE ACCESS; use your own IP address range;
host all all 10.10.10.0/24 trust
Thanks; document updated.
Thanks; updated the document.
You also forgot to mention to add the user openerp to the system
useradd openerp
and how to create the database you want to use.
Hey!
Nice work but i’m getting this error when i try to run the service :
sudo service openerp-web start
Starting openerp-web: failed.
and i don’t know what’s wrong, can u give me a hand?
Thank’s!!!
1. Look in the log files (usually under /var/log/openerp*) to find out what went wrong.
2. Change your user to the openerp user and then run the web client, and watch for errors, e.g.
sudo su - openerp
openerp-web
Installed the server fine using this tutorial (thanks), and my windows client, got my database created. Just can’t start the webserver. Same error as Sergio above me. Running it as the openerp user, was a little more informative. No log file is created for the webserver.
openerp@KGI-OPENERP:/home/mlindsay$ openerp-web
Traceback (most recent call last):
File "/usr/local/bin/openerp-web", line 4, in
import pkg_resources
File "/usr/lib/python2.6/dist-packages/pkg_resources.py", line 2655, in
working_set.require(__requires__)
File "/usr/lib/python2.6/dist-packages/pkg_resources.py", line 648, in require
needed = self.resolve(parse_requirements(requirements))
File "/usr/lib/python2.6/dist-packages/pkg_resources.py", line 546, in resolve
raise DistributionNotFound(req)
pkg_resources.DistributionNotFound: Beaker>=1.1
Check the permissions on your log file; it needs to exist and be owned by the openerp user as the openerp user doesn’t have write permission to the /var/log directory.
i’ve checked the access to the error.log – its ok, but the file is empty and i am getting the same error as mike
Check the other log files as well, especially the one from the openerp-server. See my post, Where are the log files for OpenERP for more details.
the openerp-server serive runs like a charm… i am connected with the client to the server.
if i want to start the openerp-web i get the error as mike posted, if i want to start it as service i get following error:
openerp@ubuntusrv:~$ service openerp-web start
Starting openerp-web: Password:
/etc/init.d/openerp-web: 127: cannot create /var/run/openerp-web.pid: Permission denied
failed.
finally got i work.
@mike: do a apt-get install python-beaker and it will work. I’ve got the same erros as you and after installing the python-beaker the openerp-web works like a charm (as service as well).
Thanks
It worked perfectly
Updated the above document – fixed a bug in /etc/init.d/openerp-web script whereby the PID of the web client was not recorded in the pidfile.
Nice Work !
i have the same problem with the script on /etc/openerp-web
Starting openerp-web: failed
i get following error when i want to start the openerp-server:
service openerp-server start
Starting openerp-server: failed.
do you have any ideas where i have to look for the problem?
You’ll need to provide more details than just that!
Have a look in the log files.
Run the service directly as the openerp user and watch for error messages.
I am doing this exact install of OE 6.0.1 on Ubuntu 10.10 on a Rackspace Cloud Server. On the Postgresql install step, the command “apt-get install postgresql-server” returned a message “Package postgresql-server is not available, but is referred to by another package. This may mean that the package is missing, has been obsoleted, or is available from another source.” I am continuing on, but wanted to make a note of it.
Do a “man apt-get” and read and understand it. It will have the clues you need about what to do.
Didn’t seem to matter. Everything is working great! Thanks a lot!
Spoke too soon. The openerp-web service will not start. When I do an “su – openerp”, then run “service openerp-web start”, it just returns with a “failed” message and there is nothing in the openerp-web error log.
See earlier reply about this same problem for other people.
Hi,
I got the same error like some users have:
Traceback (most recent call last):
File “/usr/local/bin/openerp-web”, line 4, in
import pkg_resources
File “/usr/lib/python2.6/dist-packages/pkg_resources.py”, line 2655, in
working_set.require(__requires__)
File “/usr/lib/python2.6/dist-packages/pkg_resources.py”, line 648, in require
needed = self.resolve(parse_requirements(requirements))
File “/usr/lib/python2.6/dist-packages/pkg_resources.py”, line 546, in resolve
raise DistributionNotFound(req)
pkg_resources.DistributionNotFound: Beaker>=1.1
I am using ubuntu 10.04 instead of 10.10 because 10.04 is LTS.
The openerp-server.log gives this as last info:
[2011-02-11 10:52:17,186][?] DEBUG:psycopg2:installed. Logging using Python logging module
[2011-02-11 10:52:17,188][?] DEBUG:web-services:Registered an exported service: db
[2011-02-11 10:52:17,189][?] DEBUG:web-services:Registered an exported service: common
[2011-02-11 10:52:17,189][?] DEBUG:web-services:Registered an exported service: object
[2011-02-11 10:52:17,189][?] DEBUG:web-services:Registered an exported service: wizard
[2011-02-11 10:52:17,189][?] DEBUG:web-services:Registered an exported service: report
[2011-02-11 10:52:17,234][?] INFO:web-services:starting HTTP service at 0.0.0.0 port 8069
[2011-02-11 10:52:17,234][?] INFO:web-services:starting HTTPS service at 0.0.0.0 port 8071
[2011-02-11 10:52:17,234][?] INFO:web-services:Registered XML-RPC over HTTP
[2011-02-11 10:52:17,235][?] INFO:web-services:starting NET-RPC service at 0.0.0.0 port 8070
[2011-02-11 10:52:17,236][?] INFO:server:Starting 3 services
[2011-02-11 10:52:17,238][?] INFO:server:OpenERP server is running, waiting for connections…
Found the solution:
apt-get install python-beaker
Also I’ve noticed that when I copy the init script from the web interface the $PIDDIR is replaced by $?
Also should the piddir should be /var/run/openerp ?
The reason for placing the PIDFILE in a SUBDIRECTORY of /var/run instead of directly in /var/run is because openerp-server failed to start at boot because it was running as the user, openerp, which does not have write-permission to /var/run; hence the startup script, which runs as root not openerp, creates a sub-directory, /var/run/openerp, and makes openerp the owner of that directory.
hai,
I am success install openerp-server & openerp-web,
when i click some menu on web, the web page always redirect to login page, can someone help me?
thanks
has you solved this?
Thx
Also in the init script I had to remove:
[ -z “$pid” ] && return 1 [ -d /proc/$pid ] && return 0
by
[ -d /proc/$pid ] && return 0
else the web interface started up but the script reported failed.
Also
I’ve modified your script to use the start-stop-daemon from this script.
It is security wise safer now.
https://docs.google.com/viewer?a=v&pid=explorer&chrome=true&srcid=0B5sP74yBnjjDOTdmYjM1ZTItOWNlYi00OTNjLWI1ZDYtOTkyOTA0NGUzMWQ0&hl=en&authkey=CIz–pYK
This line:
[ -z “$pid” ] && return 1 [ -d /proc/$pid ] && return 0
should have been on two separate lines:
[ -z “$pid” ] && return 1
[ -d /proc/$pid ] && return 0
Somehow the line break didn’t paste into WordPress correctly.
Thanks for the improved start-stop-daemon script. I’ll leave my script as is because it’s more suitable for Centos users as they don’t have start-stop-daemon, but I’m add a note to see your link for Debian/Ubuntu users.
Thank you so much for your post with the how-to instructions. Very clear and helpful.
Just one thing – in the two start-stop daemons, we needed to insert a space between the “–” and $DAEMON_OPTS. While the space was there in the pdf file, when I exported it to notepad (in Windows), for some reason the space disappeared.
thanks again
Thanks for the feedback. That PDF file is on another web site owned by somebody else, so I can’t update it.
Hello,
I just installed openerp-server and openerp-web. I get the a failed error message when run service openerp-server start command. The log file for openerp-server is as follows:
[2011-03-02 03:58:19,066][?] DEBUG:web-services:Registered an exported service: wizard
[2011-03-02 03:58:19,066][?] DEBUG:web-services:Registered an exported service: report
[2011-03-02 03:58:19,073][?] ERROR:httpd:Error occured when starting the server daemon.
Traceback (most recent call last):
File “/usr/local/lib/python2.6/dist-packages/openerp-server/service/http_server.py”, line 147, in __init__
self.server = ThreadedHTTPServer((interface, port), handler, proto=self._RealProto)
File “/usr/local/lib/python2.6/dist-packages/openerp-server/service/http_server.py”, line 75, in __init__
HTTPServer.__init__(self, addr, requestHandler)
File “/usr/lib/python2.6/SocketServer.py”, line 402, in __init__
self.server_bind()
File “/usr/lib/python2.6/BaseHTTPServer.py”, line 108, in server_bind
SocketServer.TCPServer.server_bind(self)
File “/usr/lib/python2.6/SocketServer.py”, line 413, in server_bind
self.socket.bind(self.server_address)
File “”, line 1, in bind
error: [Errno 98] Address already in use
when i run openerp-web i get the following erros:
Traceback (most recent call last):
File “/usr/local/bin/openerp-web”, line 5, in
pkg_resources.run_script(‘openerp-web==6.0.1’, ‘openerp-web’)
File “/usr/lib/python2.6/dist-packages/pkg_resources.py”, line 467, in run_script
self.require(requires)[0].run_script(script_name, ns)
File “/usr/lib/python2.6/dist-packages/pkg_resources.py”, line 1200, in run_script
execfile(script_filename, namespace, namespace)
File “/usr/local/lib/python2.6/dist-packages/openerp_web-6.0.1-py2.6.egg/EGG-INFO/scripts/openerp-web”, line 4, in
from openobject.commands import start, ConfigurationError
File “/usr/local/lib/python2.6/dist-packages/openerp_web-6.0.1-py2.6.egg/openobject/commands.py”, line 8, in
from cherrypy._cpconfig import as_dict
ImportError: cannot import name as_dict
Does anyone have any clue about this?
For openerp-server, it looks like another server is already running on that address.
You could run ps -fe and have a look for other instances of openerp-server or similar.
You could search the net for how to find what processes are listening on the port that you configured for your openerp-server.
As for openerp-web – try asking on the OpenERP forum.
Any solutions for openerp-web?
Traceback (most recent call last):
File “/usr/local/bin/openerp-web”, line 5, in
pkg_resources.run_script(‘openerp-web==6.0.1′, ‘openerp-web’)
File “/usr/lib/python2.6/dist-packages/pkg_resources.py”, line 467, in run_script
self.require(requires)[0].run_script(script_name, ns)
File “/usr/lib/python2.6/dist-packages/pkg_resources.py”, line 1200, in run_script
execfile(script_filename, namespace, namespace)
File “/usr/local/lib/python2.6/dist-packages/openerp_web-6.0.1-py2.6.egg/EGG-INFO/scripts/openerp-web”, line 4, in
from openobject.commands import start, ConfigurationError
File “/usr/local/lib/python2.6/dist-packages/openerp_web-6.0.1-py2.6.egg/openobject/commands.py”, line 8, in
from cherrypy._cpconfig import as_dict
ImportError: cannot import name as_dict
Thanks,
Alessandro
Check that all your version numbers match the version numbers I reported in the post.
Check if there is a syntax error in your openerp-web configuration file (e.g. /etc/openerp-web.cfg).
Try asking on the OpenERP forum.
problem is cherrypy version. the default version of cherrypy was 3.2.0 and the web-server seems to have needed 3.1.2.
Found the solution here http://www.openerp.com/forum/topic23011.html
Pieter
Hi,
I’m getting the Same Error.
Both Versions are 6.0.1.
Ive done absolutley every step in this tutorial, except the ones i shouldn’t 😉
openerp@csw-server-US:-$ openerp-web start
Traceback (most recent call last):
File "/usr/local/bin/openerp-web", line 5, in pkg_resources.run_scripteopenerp-web==6.0.1', 'openerp-web')
File "/usr/lib/python2.6/dist-packages/pkg_resources.py", line 467, in run_scr ipt
self.reguire(reguires)[0].run_script(script_name, ns)
File "/usr/lib/python2.6/dist-packages/pkg_resources.py", line 1200, in run_sc ript
execfile(script_filename, namespace, namespace)
File "/usr/local/lib/python2.6/dist-packages/openerp_web-6.0.1-py2.6.egg/EGG-I NFO/scripts/openerp-web", line 4, in
from openobject.commands import start, ConfigurationError
File "/usr/local/lib/python2.6/dist-packages/openerp_web-6.0.1-py2.6.egg/openo bject/commands.py", line 8, in
from cherrypy._cpconfig import as_dict
ImportError: cannot import name as_dict
openerp@csw-server-US:-$
Pingback: How to install openerp on Ubuntu10.10 | openerp86
I also get “Starting openerp-server: failed”. when I try to start openerp with “service openerp-server start”.
openerp log does not have any information. where can I get the reason of the failed services? I run the command with both root user and openerp user and I still get the same error
Check that your config file doesn’t have errors and that logging is turned on.
Log in or sudo to the openerp-server and run the server from the command line and take note of the error messages.
thank you for the tutorial. it helps me a lot!
if you got a problem with openerp-web including cherrypy, it’s a dependancy problem. just run :
easy_install -m cherrypy
easy_install cherrypy==3.1.2
src: http://www.openerp.com/forum/post76240.html#p76240
oh, and your locale should be in UTF8 to avoid problems with postgresql & openerp :
sudo echo ‘LANG=xx_XX.UTF-8’ >/etc/default/locale
sudo reboot # or logout is enough ? not sure
Pingback: Installing Openerp 6.x server and Web client on Ubuntu server | FBA Knowledgebase
When i created the openerp user then i swith the the postgres user in ubuntu 10.04
When i do the following command
createuser –createdb –no-createrole –pwprompt openerp
The server asks me the postgres password but i don’t have one.
What should i do i’m stuck now.
Kind regards for your help.
1. Are you sure it’s not just asking you for a new password for the new user? Try entering a new password.
2. Ask the person, who installed Postgres, what password they set for postgres.
3. Google default postgres password.
4. Ask on a postgres forum.
Its a new ubuntu install
I don’t understand
I got a clean install and i’m following your instructions to install postgresql
+ their is no default pasword for postgress
Maybe it has something to do with the pg_hba.conf file that modified some things in how ubuntu users can acces the data
dunno.
i’ll start with a clean install again.
Your guideline on installation of openerp on ubuntu 10.10 is great. I have the system up and viewable. It is just that when I create a database, it would take a few minutes and then an error messages pops out.. “Connection errors!….”. The database had been created on screen and on postgresql. Try connecting to the new database just created, take a few minutes and then pop out the similar error message. check the log file and seem ok without any error. would you have any clue what would be the most possible problem? I tried on fedora 13 and centos 5.5 before deciding onto Ubuntu 10.10. Appreciate your advice. Thanks.
1. Think. Take a step back and think carefully about how you think it all should be working, all the connections and components you know about, what components ARE working, what components you can TEST. Test as many components as you can.
2. Check your ~openerp/.openerp_serverrc file is set correctly.
3. Make sure the openerp server is starting correctly – check its log file.
4. Check that you can ping the IP address of the openerp server from the client that you are trying to connect from.
5. Check that your IP address, from where you are trying to connect, is allowed in the postgres configuration file, pg_hba.conf, (see step 4).
6. Post a query on the Openerp forum.
7. Google “Can’t connect to Postgres”.
The OpenERP Server package will setup everything for you (except for Postgres). You just need to correct the broken dependencies after getting the dependency errors; so actually, you only need to run the following two commands:
sudo dpkg -i openerp-server_6.0.1-0_all.deb
sudo apt-get -f install
After the broken dependencies are fixed, OpenERP server will finish installing and be started as a service under the openerp account. The server config file will be found here:
/etc/openerp-server.conf
I had the same issue for getting the webclient to work, it kept saying starting failed, while when started manually it worked.
The issue was that the openerp user was associated no shell in the /etc/passwd file (/bin/false), this is because I followed some openerp installation which created this user via the postgresql. I simply fixed the etc/passwd file to give the opernerp user a bash shell (/bin/bash) and it’s now working just fine
Hi, i install openerp-server, client and web without problems, but i when try acces in the web i see login screen, select DB, user and password click on login button and browser show me the follow:
Unrecoverable error in the server.
Traceback (most recent call last):
File “/usr/lib/pymodules/python2.6/cherrypy/_cprequest.py”, line 541, in run
self.respond(pi)
File “/usr/lib/pymodules/python2.6/cherrypy/_cprequest.py”, line 624, in respond
self.handle_error()
File “/usr/lib/pymodules/python2.6/cherrypy/_cprequest.py”, line 746, in handle_error
self.error_response()
File “/usr/local/lib/python2.6/dist-packages/openerp_web-6.0.2-py2.6.egg/addons/openerp/controllers/root.py”, line 35, in _cp_on_error
message = errorpage.render()
AttributeError: ‘NoneType’ object has no attribute ‘render’
I look in web search but i can’t resolve this problem, if you can help me, regrads.
I Solved this fix with follow commands:
$ sudo chown openerp:openerp -R /usr/lib/pymodules/python2.6/openerp-server/addons
$ sudo chown openerp:openerp -R /usr/share/pyshared/openerp-server/addons
awesome this solutions is really cool,works fine
how to start openerp-web on boot start automatically. i have to start manually on daily basis, any script or modified file.
thanks in advance.
Make sure you followed the steps above to set up a file, /etc/init.d/openerp-web and that linked that file into the appropriate /etc/rc.* directories, and that that file can be run successfully from the command-line and by the openerp-web user.
Please let me just thank you a lot for this
regards
thank you very much for this tutorial is really excellent.
Would you help me please guys? I can’t start openerp-web service. I get a ‘failed’ message. Did someone solve this issue?. Thanks. I attached my log file below:
Traceback (most recent call last):
File “/usr/local/bin/openerp-web”, line 5, in
pkg_resources.run_script(‘openerp-web==6.0.1’, ‘openerp-web’)
File “/usr/lib/python2.6/dist-packages/pkg_resources.py”, line 467, in run_script
self.require(requires)[0].run_script(script_name, ns)
File “/usr/lib/python2.6/dist-packages/pkg_resources.py”, line 1200, in run_script
execfile(script_filename, namespace, namespace)
File “/usr/local/lib/python2.6/dist-packages/openerp_web-6.0.1-py2.6.egg/EGG-INFO/scripts/openerp-web”, line 4, in
from openobject.commands import start, ConfigurationError
File “/usr/local/lib/python2.6/dist-packages/openerp_web-6.0.1-py2.6.egg/openobject/commands.py”, line 8, in
from cherrypy._cpconfig import as_dict
ImportError: cannot import name as_dict
Heeelp !
I seem to have a permission error when launching the openerp-web (either as user : openerp) or from the “service openerp-web start” as root.
Below is the traceback :
Traceback (most recent call last):
File “/usr/local/bin/openerp-web”, line 5, in
pkg_resources.run_script(‘openerp-web==6.0.2’, ‘openerp-web’)
File “/usr/lib/python2.6/dist-packages/pkg_resources.py”, line 467, in run_script
self.require(requires)[0].run_script(script_name, ns)
File “/usr/lib/python2.6/dist-packages/pkg_resources.py”, line 1200, in run_script
execfile(script_filename, namespace, namespace)
File “/usr/local/lib/python2.6/dist-packages/openerp_web-6.0.2-py2.6.egg/EGG-INFO/scripts/openerp-web”, line 8, in
start()
File “/usr/local/lib/python2.6/dist-packages/openerp_web-6.0.2-py2.6.egg/openobject/commands.py”, line 78, in start
cherrypy.engine.start()
File “/usr/local/lib/python2.6/dist-packages/CherryPy-3.1.2-py2.6.egg/cherrypy/process/wspbus.py”, line 184, in start
self.publish(‘start’)
File “/usr/local/lib/python2.6/dist-packages/CherryPy-3.1.2-py2.6.egg/cherrypy/process/wspbus.py”, line 147, in publish
output.append(listener(*args, **kwargs))
File “/usr/local/lib/python2.6/dist-packages/CherryPy-3.1.2-py2.6.egg/cherrypy/_cpserver.py”, line 90, in start
ServerAdapter.start(self)
File “/usr/local/lib/python2.6/dist-packages/CherryPy-3.1.2-py2.6.egg/cherrypy/process/servers.py”, line 60, in start
self.wait()
File “/usr/local/lib/python2.6/dist-packages/CherryPy-3.1.2-py2.6.egg/cherrypy/process/servers.py”, line 95, in wait
raise self.interrupt
socket.error: [Errno 13] Permission denied
Any chance someone has faced the same issue and fixed it ?
FYI, this error was cause since I had configured openerp-web to use port 80 which seem already in use. I reverted to 8080 and the web server starts.
How to install UBUNTU SERVER quick and easy.Any questions just post them on the youtube channel.
It?s really a nice and useful piece of info. I?m satisfied that you shared this helpful info with us. Please stay us up to date like this. Thanks for sharing.
pls tell me how to remove the Publisher warranty on the openerp?
No.
I have installed OpenERP Web 6.1, and I have this error : “AttributeError: ‘Request’ object has no attribute ‘loading_addons’.
Changing owner property on addons directory does not solve the problem.
Thanks, managed to install and start the server and web-server on Debian GNU Squeeze. Thanks for sharing the information, really appreciate very much!!
Thanks for help every one I succed on install openerp on ubuntu 11.10 by upgrading the package
cherrypy3 to fix the problem
Thankfulness to my father who informed me concerning this web site,
this web site is truly remarkable.