How to install OpenERP 7.0 on Ubuntu 12.04 LTS

OpenERP Logo

Introduction

Welcome to the latest of our very popular OpenERP installation “How Tos”.

The new release of OpenERP 7.0 is a major upgrade and a new Long Term Support release; the 7.0 Release Notes extend to over 90 pages! The most noticeable change is a complete re-write of the User Interface that features a much more modern look and feel.

OpenERP 7.0 is not only better looking and easier to use, it also brings many improvements to the existing feature-set and adds a number of brand new features which extend the scope of the business needs covered by OpenERP. Integration of social network capabilities, integration with Google Docs and LinkedIn, new Contract Management, new Event Management, new Point of Sale, new Address Book, new Fleet Management,… are only some of the many enhancements in OpenERP 7.0.

The How To

Following that introduction, I bet you can’t wait to get your hands dirty…

Just one thing before we start: You can simply download a “.deb” package of OpenERP and install that on Ubuntu. Unfortunately that approach doesn’t provide us (Libertus Solutions) with enough fine-grained control over where things get installed, and it restricts our flexibility to modify & customise, hence I prefer to do it a slightly more manual way (this install process below should only take about 10-15 minutes once the host machine has been built).

So without further ado here we go:

Step 1. Build your server

I install just the bare minimum from the install routine (you may want to install the openssh-server during the install procedure or install subsequently depending on your needs).

After the server has restarted for the first time I install the openssh-server package (so we can connect to it remotely) and denyhosts to add a degree of brute-force attack protection. There are other protection applications available: I’m not saying this one is the best, but it’s one that works and is easy to configure and manage. If you don’t already, it’s also worth looking at setting up key-based ssh access, rather than relying on passwords. This can also help to limit the potential of brute-force attacks. [NB: This isn't a How To on securing your server...]

sudo apt-get install openssh-server denyhosts

Now make sure your server has all the latest versions & patches by doing an update:

sudo apt-get update
sudo apt-get dist-upgrade

Although not always essential it’s probably a good idea to reboot your server now and make sure it all comes back up and you can login via ssh.

Now we’re ready to start the OpenERP install.

Step 2. Create the OpenERP user that will own and run the application

sudo adduser --system --home=/opt/openerp --group openerp

This is a “system” user. It is there to own and run the application, it isn’t supposed to be a person type user with a login etc. In Ubuntu, a system user gets a UID below 1000, has no shell (it’s actually /bin/false) and has logins disabled. Note that I’ve specified a “home” of /opt/openerp, this is where the OpenERP server code will reside and is created automatically by the command above. The location of the server code is your choice of course, but be aware that some of the instructions and configuration files below may need to be altered if you decide to install to a different location.

[Note: If you want to run multiple versions of OpenERP on the same server, the way I do it is to create multiple users with the correct version number as part of the name, e.g. openerp70, openerp61 etc. If you also use this when creating the Postgres users too, you can have full separation of systems on the same server. I also use similarly named home directories, e.g. /opt/openerp70, /opt/openerp61 and config and start-up/shutdown files. You will also need to configure different ports for each instance or else only the first will start.]

A question I have been asked a few times is how to run the OpenERP server as the openerp system user from the command line if it has no shell. This can be done quite easily:

sudo su - openerp -s /bin/bash

This will su your current terminal login to the openerp user (the “-” between su and openerp is correct) and use the shell /bin/bash. When this command is run you will be in openerp’s home directory: /opt/openerp.

When you have done what you need you can leave the openerp user’s shell by typing exit.

Step 3. Install and configure the database server, PostgreSQL

sudo apt-get install postgresql

Then configure the OpenERP user on postgres:

First change to the postgres user so we have the necessary privileges to configure the database.

sudo su - postgres

Now create a new database user. This is so OpenERP has access rights to connect to PostgreSQL and to create and drop databases. Remember what your choice of password is here; you will need it later on:

createuser --createdb --username postgres --no-createrole --no-superuser --pwprompt openerp
Enter password for new role: ********
Enter it again: ********

Finally exit from the postgres user account:

exit

Step 4. Install the necessary Python libraries for the server

sudo apt-get install python-dateutil python-docutils python-feedparser python-gdata \
python-jinja2 python-ldap python-libxslt1 python-lxml python-mako python-mock python-openid \
python-psycopg2 python-psutil python-pybabel python-pychart python-pydot python-pyparsing \
python-reportlab python-simplejson python-tz python-unittest2 python-vatnumber python-vobject \
python-webdav python-werkzeug python-xlwt python-yaml python-zsi

With that done, all the dependencies for installing OpenERP 7.0 are now satisfied (note that there are some new packages required since 6.1).

Step 5. Install the OpenERP server

I tend to use wget for this sort of thing and I download the files to my home directory.

Make sure you get the latest version of the application: at the time of writing this it’s 7.0. I got the download links from their download pages (note there are also deb, rpm and exe builds in this area too). There isn’t a static 7.0 release tarball as such anymore, but there is a nightly build of the 7.0 source tree which should be just as good and will contain patches as and when things get fixed. The link below is to the source tarball for the 7.0 branch.

Note: As an alternative method of getting the code onto your server, Jerome added a very useful comment showing how to get it straight from launchpad. Thanks!

wget http://nightly.openerp.com/7.0/nightly/src/openerp-7.0-latest.tar.gz

Now install the code where we need it: cd to the /opt/openerp/ directory and extract the tarball there.

cd /opt/openerp
sudo tar xvf ~/openerp-7.0-latest.tar.gz

Next we need to change the ownership of all the the files to the OpenERP user and group we created earlier.

sudo chown -R openerp: *

And finally, the way I have done this is to copy the server directory to something with a simpler name so that the configuration files and boot scripts don’t need constant editing (I called it, rather unimaginatively, server). I started out using a symlink solution, but I found that when it comes to upgrading, it seems to make more sense to me to just keep a copy of the files in place and then overwrite them with the new code. This way you keep any custom or user-installed modules and reports etc. all in the right place.

sudo cp -a openerp-7.0 server

As an example, should OpenERP 7.0.1 come out soon, I can extract the tarballs into /opt/openerp/ as above. I can do any testing I need, then repeat the copy command so that the modified files will overwrite as needed and any custom modules, report templates and such will be retained. Once satisfied the upgrade is stable, the older 7.0 directories can be removed if wanted.

That’s the OpenERP server software installed. The last steps to a working system is to set up the configuration file and associated boot script so OpenERP starts and stops automatically when the server itself stops and starts.

Step 6. Configuring the OpenERP application

The default configuration file for the server (in /opt/openerp/server/install/) is actually very minimal and will, with only one small change work fine so we’ll simply copy that file to where we need it and change it’s ownership and permissions:

sudo cp /opt/openerp/server/install/openerp-server.conf /etc/
sudo chown openerp: /etc/openerp-server.conf
sudo chmod 640 /etc/openerp-server.conf

The above commands make the file owned and writeable only by the openerp user and group and only readable by openerp and root.

To allow the OpenERP server to run initially, you should only need to change one line in this file. Toward to the top of the file change the line db_password = False to the same password you used back in step 3. Use your favourite text editor here. I tend to use nano, e.g.

sudo nano /etc/openerp-server.conf

One other line we might as well add to the configuration file now, is to tell OpenERP where to write its log file. To complement my suggested location below add the following line to the openerp-server.conf file:

logfile = /var/log/openerp/openerp-server.log

Once the configuration file is edited and saved, you can start the server just to check if it actually runs.

sudo su - openerp -s /bin/bash
/opt/openerp/server/openerp-server

If you end up with a few lines eventually saying OpenERP is running and waiting for connections then you are all set.

On my system I noticed the following warning:

2012-12-19 11:53:51,613 6586 WARNING ? openerp.addons.google_docs.google_docs: Please install latest gdata-python-client from http://code.google.com/p/gdata-python-client/downloads/list

The Ubuntu 12.04 packaged version of the python gdata client library is not quite recent enough, so to install a more up-to-date version I did the following (exit from the openerp user’s shell if you are still in it first):

sudo apt-get install python-pip
sudo pip install gdata --upgrade

Going back and repeating the commands to start the server resulted in no further warnings

sudo su - openerp -s /bin/bash
/opt/openerp/server/openerp-server

If there are errors, you’ll need to go back and find out where the problem is.

Otherwise simply enter CTL+C to stop the server and then exit to leave the openerp user account and go back to your own shell.

Step 7. Installing the boot script

For the final step we need to install a script which will be used to start-up and shut down the server automatically and also run the application as the correct user. There is a script you can use in /opt/openerp/server/install/openerp-server.init but this will need a few small modifications to work with the system installed the way I have described above. Here’s a link to the one I’ve already modified for 7.0.

Similar to the configuration file, you need to either copy it or paste the contents of this script to a file in /etc/init.d/ and call it openerp-server. Once it is in the right place you will need to make it executable and owned by root:

sudo chmod 755 /etc/init.d/openerp-server
sudo chown root: /etc/init.d/openerp-server

In the configuration file there’s an entry for the server’s log file. We need to create that directory first so that the server has somewhere to log to and also we must make it writeable by the openerp user:

sudo mkdir /var/log/openerp
sudo chown openerp:root /var/log/openerp

Step 8. Testing the server

To start the OpenERP server type:

sudo /etc/init.d/openerp-server start

You should now be able to view the logfile and see that the server has started.

less /var/log/openerp/openerp-server.log

If there are any problems starting the server you need to go back and check. There’s really no point ploughing on if the server doesn’t start…

OpenERP 7 Database Management Screen

OpenERP 7 Database Management Screen

If the log file looks OK, now point your web browser at the domain or IP address of your OpenERP server (or localhost if you are on the same machine) and use port 8069. The url will look something like this:

http://IP_or_domain.com:8069

What you should see is a screen like this one (it is the Database Management Screen because you have no OpenERP databases yet):

What I do recommend you do at this point is to change the super admin password to something nice and strong (Click the “Password” menu). By default this password is just “admin” and knowing that, a user can create, backup, restore and drop databases! This password is stored in plain text in the /etc/openerp-server.conf file; hence why we restricted access to just openerp and root. When you change and save the new password the /etc/openerp-server.conf file will be re-written and will have a lot more options in it.

Now it’s time to make sure the server stops properly too:

sudo /etc/init.d/openerp-server stop

Check the logfile again to make sure it has stopped and/or look at your server’s process list.

Step 9. Automating OpenERP startup and shutdown

If everything above seems to be working OK, the final step is make the script start and stop automatically with the Ubuntu Server. To do this type:

sudo update-rc.d openerp-server defaults

You can now try rebooting you server if you like. OpenERP should be running by the time you log back in.

If you type ps aux | grep openerp you should see a line similar to this:

openerp 1491 0.1 10.6 207132 53596 ? Sl 22:23 0:02 python /opt/openerp/server/openerp-server -c /etc/openerp-server.conf

Which shows that the server is running. And of course you can check the logfile or visit the server from your web browser too.

OpenERP 70 Main Setup Screen

OpenERP 70 Main Setup Screen

That’s it! Next I would suggest you create a new database filling in the fields as desired. Once the database is initialised, you will be directed straight to the new main configuration screen which gives you a fell for the new User Interface in OpenERP 7 and shows you how easy it is to set up a basic system.

Tags: , , ,

436 Comments

  • roger says:

    Hi,
    when i try to run /opt/openerp/server/openerp-server
    i have the message that “Import error: no module named babel.dates
    WHat to do ?

  • Anthony says:

    Hi,

    After completing the installation, when I try to create a new Database I have the message :

    OpenERP Server Error

    Client Traceback (most recent call last):
    File “/openerp/server/openerp/addons/web/http.py”, line 203, in dispatch
    response["result"] = method(self, **self.params)
    File “/openerp/server/openerp/addons/web/controllers/main.py”, line 757, in create
    params['create_admin_pwd'])
    File “/openerp/server/openerp/addons/web/session.py”, line 31, in proxy_method
    result = self.session.send(self.service_name, method, *args)
    File “/openerp/server/openerp/addons/web/session.py”, line 98, in send
    raise xmlrpclib.Fault(‘AccessDenied’, openerp.tools.ustr(e))

    Server Access denied.

    Thanks a lot for your help!

    • Alan Lord says:

      Looks like the password you used for the openerp postgres user does not match what is configured in your config file.

    • Petar says:

      I just got unstuck with the same problem. Solution was: use default master password – at that first db creation page, it is not asking you for new master password, it is asking the old one so it can create new admin user…

  • Scott Nolan says:

    when it comes to sudo cp -a openerp-7.0 server i get (no such file or directory) everything up to that point worked fine.

    • Scott Nolan says:

      openerp-7.0-20130316-002523/README
      openerp-7.0-20130316-002523/setup.py
      openerp-7.0-20130316-002523/setup.cfg
      openerp-7.0-20130316-002523/setup_rpm.sh
      ubuntu@ip-10-170-103-169:/opt/openerp$

      Just an eample of were the files went

  • Jaco Maritz says:

    Hi Scott
    You need to mv the openerp-7.0-20130316-002523 directory to openerp-7.0,
    use this command mv openerp-7.0-20130316-002523 openerp-7.0
    Then try the cp part

  • Miguel Samano says:

    Hi Alan, I got this error when I try to run the server, any ideas?

    login as: root
    root@166.78.25.89‘s password:
    Welcome to Ubuntu 12.04.2 LTS (GNU/Linux 3.2.0-24-virtual x86_64)

    * Documentation: https://help.ubuntu.com/

    System information as of Mon Mar 18 02:12:25 UTC 2013

    System load: 0.24 Processes: 71
    Usage of /: 2.2% of 157.49GB Users logged in: 0
    Memory usage: 1% IP address for eth0: 166.78.25.89
    Swap usage: 0% IP address for eth1: 10.181.146.230

    Graph this data and manage this system at https://landscape.canonical.com/

    0 packages can be updated.
    0 updates are security updates.

    Last login: Mon Mar 18 02:05:40 2013 from 187.205.66.168
    root@cttserver:~# sudo su openerp
    openerp@cttserver:/root$ cd /opt/openerp/v7/server/
    openerp@cttserver:~/v7/server$ ./openerp-server -c /etc/openerp-server.conf &
    [1] 1788
    openerp@cttserver:~/v7/server$ Traceback (most recent call last):
    File “./openerp-server”, line 5, in
    openerp.cli.main()
    File “/opt/openerp/v7/server/openerp/cli/__init__.py”, line 61, in main
    o.run(args)
    File “/opt/openerp/v7/server/openerp/cli/server.py”, line 266, in run
    main(args)
    File “/opt/openerp/v7/server/openerp/cli/server.py”, line 223, in main
    openerp.tools.config.parse_config(args)
    File “/opt/openerp/v7/server/openerp/tools/config.py”, line 369, in parse_config
    self.load()
    File “/opt/openerp/v7/server/openerp/tools/config.py”, line 556, in load
    p.read([self.rcfile])
    File “/usr/lib/python2.7/ConfigParser.py”, line 305, in read
    self._read(fp, filename)
    File “/usr/lib/python2.7/ConfigParser.py”, line 512, in _read
    raise MissingSectionHeaderError(fpname, lineno, line)
    ConfigParser.MissingSectionHeaderError: File contains no section headers.
    file: /etc/openerp-server.conf, line: 1
    ‘ [options]\n’

    [1]+ Exit 1 ./openerp-server -c /etc/openerp-server.conf
    openerp@cttserver:~/v7/server$

  • [...] The Open Sourcerer for his [...]

  • David says:

    Great step by step instructions allowed me to flawlessly install OE on my cloudbox.
    Well … almost flawlessly ;-)
    Install went fine, basic settings too but then I tried to create a new user but it doesn’t show up in the list of users.
    When I then go to form view I get a server error. (see below)
    The user doesn’t seem to be created, I can’t use it to log in or anything.
    It would be greatly appreciated if someone could help me out with this.

    OpenERP Server Error

    Client Traceback (most recent call last):
    File “/opt/openerp/server/openerp/addons/web/http.py”, line 195, in dispatch
    response["result"] = method(self, **self.params)
    File “/opt/openerp/server/openerp/addons/web/controllers/main.py”, line 1078, in call_kw
    return self._call_kw(req, model, method, args, kwargs)
    File “/opt/openerp/server/openerp/addons/web/controllers/main.py”, line 1062, in _call_kw
    names = dict(req.session.model(model).name_get(args[0], **kwargs))
    File “/opt/openerp/server/openerp/addons/web/session.py”, line 40, in proxy
    result = self.proxy.execute_kw(self.session._db, self.session._uid, self.session._password, self.model, method, args, kw)
    File “/opt/openerp/server/openerp/addons/web/session.py”, line 28, in proxy_method
    result = self.session.send(self.service_name, method, *args)
    File “/opt/openerp/server/openerp/addons/web/session.py”, line 101, in send
    raise xmlrpclib.Fault(openerp.tools.exception_to_unicode(e), formatted_info)

    Server Traceback (most recent call last):
    File “/opt/openerp/server/openerp/addons/web/session.py”, line 87, in send
    return openerp.netsvc.dispatch_rpc(service_name, method, args)
    File “/opt/openerp/server/openerp/netsvc.py”, line 281, in dispatch_rpc
    result = ExportService.getService(service_name).dispatch(method, params)
    File “/opt/openerp/server/openerp/service/web_services.py”, line 614, in dispatch
    res = fn(db, uid, *params)
    File “/opt/openerp/server/openerp/osv/osv.py”, line 169, in execute_kw
    return self.execute(db, uid, obj, method, *args, **kw or {})
    File “/opt/openerp/server/openerp/osv/osv.py”, line 123, in wrapper
    return f(self, dbname, *args, **kwargs)
    File “/opt/openerp/server/openerp/osv/osv.py”, line 179, in execute
    res = self.execute_cr(cr, uid, obj, method, *args, **kw)
    File “/opt/openerp/server/openerp/osv/osv.py”, line 166, in execute_cr
    return getattr(object, method)(cr, uid, *args, **kw)
    File “/opt/openerp/server/openerp/osv/orm.py”, line 2374, in name_get
    load=’_classic_write’, context=context)]
    File “/opt/openerp/server/openerp/addons/base/res/res_users.py”, line 793, in read
    res = super(users_view, self).read(cr, uid, ids, fields, context=context, load=load)
    File “/opt/openerp/server/openerp/addons/base/res/res_users.py”, line 268, in read
    result = super(res_users, self).read(cr, uid, ids, fields=fields, context=context, load=load)
    File “/opt/openerp/server/openerp/osv/orm.py”, line 3603, in read
    result = self._read_flat(cr, user, select, fields, context, load)
    File “/opt/openerp/server/openerp/osv/orm.py”, line 3655, in _read_flat
    cr.execute(query, [tuple(sub_ids)] + rule_params)
    File “/opt/openerp/server/openerp/sql_db.py”, line 162, in wrapper
    return f(self, *args, **kwargs)
    File “/opt/openerp/server/openerp/sql_db.py”, line 227, in execute
    res = self._obj.execute(query, params)
    File “/usr/lib/python2.7/dist-packages/psycopg2/extensions.py”, line 124, in getquoted
    qobjs = [str(o.getquoted()) for o in pobjs]
    AttributeError: ‘str’ object has no attribute ‘getquoted’

    • David says:

      Stupid mistake from my side, repeated entire setup but this time with latest version of OE7. Everything works fine now, including user creation. Thanks again for the magnificent ‘how to’!

  • Kamela says:

    Hi.. Great tutorial!

    I just want to clarify about your example of when a latest version upload is up I will just extract it and copy paste in the server folder, is it right?

    If so, does my data in v7 stays the same after I upgrade it?

    Thanks so much..

    • Alan Lord says:

      That depends on the changes that have been made to the code between updates.

      I generally update all databases just in case. You can do this from the command line.

      1 stop openerp
      2 “su” to the openerp user with a shell
      3 run the openerp-server script adding the switches -u all and -d DBNAME -c PATHTOYOURCONFIGFILE
      4 In another terminal tail the openerp-server log file until the update has finished
      5 In the first terminal type CTL+C to stop openerp
      5 repeat for every database

  • Andy says:

    Hi,

    I am reading this and seeing all the success you guys have had. I would like to try this but I keep getting the following error message please can someone assist me as to why this is happening.

    Invalid username or password

    Username
    Password

    Manage Databases | Powered by OpenERP
    OpenERP

    OpenERP Server Error

    Client Traceback (most recent call last):
    File “C:\Program Files\OpenERP 7.0-20130322-002354\Server\server\openerp\addons\web\http.py”, line 203, in dispatch
    File “C:\Program Files\OpenERP 7.0-20130322-002354\Server\server\openerp\addons\web\controllers\main.py”, line 868, in authenticate
    File “C:\Program Files\OpenERP 7.0-20130322-002354\Server\server\openerp\addons\web\session.py”, line 116, in authenticate
    File “C:\Program Files\OpenERP 7.0-20130322-002354\Server\server\openerp\addons\web\session.py”, line 31, in proxy_method
    File “C:\Program Files\OpenERP 7.0-20130322-002354\Server\server\openerp\addons\web\session.py”, line 104, in send

    Server Traceback (most recent call last):
    File “C:\Program Files\OpenERP 7.0-20130322-002354\Server\server\openerp\addons\web\session.py”, line 90, in send
    File “C:\Program Files\OpenERP 7.0-20130322-002354\Server\server\.\openerp\netsvc.py”, line 293, in dispatch_rpc
    File “C:\Program Files\OpenERP 7.0-20130322-002354\Server\server\.\openerp\service\web_services.py”, line 433, in dispatch
    File “C:\Program Files\OpenERP 7.0-20130322-002354\Server\server\.\openerp\service\web_services.py”, line 444, in exp_authenticate
    File “C:\Program Files\OpenERP 7.0-20130322-002354\Server\server\.\openerp\pooler.py”, line 49, in get_pool
    File “C:\Program Files\OpenERP 7.0-20130322-002354\Server\server\.\openerp\pooler.py”, line 33, in get_db_and_pool
    File “C:\Program Files\OpenERP 7.0-20130322-002354\Server\server\.\openerp\modules\registry.py”, line 192, in get
    File “C:\Program Files\OpenERP 7.0-20130322-002354\Server\server\.\openerp\modules\registry.py”, line 218, in new
    File “C:\Program Files\OpenERP 7.0-20130322-002354\Server\server\.\openerp\modules\loading.py”, line 304, in load_modules
    File “C:\Program Files\OpenERP 7.0-20130322-002354\Server\server\.\openerp\modules\loading.py”, line 168, in load_module_graph
    File “C:\Program Files\OpenERP 7.0-20130322-002354\Server\server\.\openerp\modules\module.py”, line 381, in init_module_models
    File “C:\Program Files\OpenERP 7.0-20130322-002354\Server\server\.\openerp\osv\orm.py”, line 3224, in _auto_end
    File “C:\Program Files\OpenERP 7.0-20130322-002354\Server\server\.\openerp\sql_db.py”, line 161, in wrapper
    File “C:\Program Files\OpenERP 7.0-20130322-002354\Server\server\.\openerp\sql_db.py”, line 226, in execute
    IntegrityError: insert or update on table “res_country” violates foreign key constraint “res_country_currency_id_fkey”
    DETAIL: Key (currency_id)=(135) is not present in table “res_currency”.

    Thank you

    Andy

    • Alan Lord says:

      Hi Andy,

      I’ve not seen that error before so not sure I can be much help here, but the final error looks like something is not quite right in your database:

      DETAIL: Key (currency_id)=(135) is not present in table “res_currency”.

      You could try using the python cli tool called erpeek to investigate further:

      https://erppeek.readthedocs.org/en/latest/

      or contact a friendly OpenERP partner for technical assistance ;-)

  • Faisal says:

    Hi Alan,
    Thanks for writing this nice Howto. I used Debian 6.0.x. to setup the environment. I can su to root, but as per above doc cannot to su to openerp. Neither I can login to this account. I can still run the server but of course it takes my account id as the database user name as well, so fails to give desired result. Any idea how I can make it work on Debian?

    What is the option to the following instruction in Debian?
    sudo su – openerp -s /bin/bash
    Thanks in advance.

  • john says:

    hi, I had setup openerp based on info. Today i stopped openerp-server, deleted the directory and pulled server, addons, web directory from bzr command.

    I performed,
    sudo su – openerp -s /bin/bash
    /opt/openerp/server/openerp-server –addons=./addons/,./web/addons -d dbname -u all

    there were no errors.
    But when i launch openerp URL.. i get https://openerp.mydomain.com, openerp.mydomain.com/?db= dbname. Any idea why i have repeated domain pops up in URL. if i deleted the first URL ,links works. There were no issue with Single DB. when i created multiple DB.. the url acts strange. Kindly let me know what you think might happen..

  • Bill says:

    Hi.

    I’ve successfully used your previous guide to 6.1 and would like to try a separate installation of 7.0 on the same virtual server as you describe above (using openerp70 etc.).

    I’ve hit a snag early on when creating the new database user. When I enter:

    createuser –createdb –username postgres70 –no-createrole –no-superuser –pwprompt openerp

    I get:

    createuser: could not connect to database postgres: FATAL: Peer authentication failed for user “postgres70″

    As you can probably tell I’m pretty new to this and don’t really understand what the different parts of that command are doing so I’ve probably misunderstood the suggestion to name things in accordance with the version of OpenERP I’m installing.

    Any help appreciated.

    Bill.

    • Bill says:

      ah, figured that one out…sorry, silly me. Now I’m stumped by how to make OpenERP 7.0 use a different port than 8069 so I can run 6.1 on the same system. I tried adding:

      xmlrpc_port = 8066

      to openerp-server.config but it didn’t seem to have any effect???

      Thanks for this tutorial and blog by the way Alan. It’s very generous of you.

      Bill.

      • Alan Lord says:

        First you need to create different users.
        Next create different init scripts (change the username and config file)
        Next create different config files, e.g. openerp61.server.conf, openerp70-server.conf (this is where you should change port numbers).
        Next create different log directories
        Next chown the relevant files and directories to the new users.

        Something like that anyway…

        • Bill says:

          Thanks Alan. Got it up and running now. I tied myself in knots during the process of renaming all the openerp references to openerp70. For others who are trying the same thing, I had to change the init script as follows (not sure if it was all necessary but the server is now listening on the port that I specified and I can connect to it via a web-browser):

          DAEMON=/opt/openerp70/server/openerp-server
          NAME=openerp70-server
          DESC=openerp70-server

          USER=openerp70

          CONFIGFILE=”/etc/openerp70-server.conf”

          and of course I renamed the init script (in /etc/init.d/) “openerp70-server” and the config file (in /etc) “openerp70-server.conf”.

          Now I just have to go back and make sure the 6.1.1 installation is setup similarly and it should all be peachy (fingers crossed).

          Thanks again Alan.

          Bill.

          • Alan Lord says:

            Excellent! Well done Bill.

            That sounds about right.

            Be sure to change the Linux owner of the opt/openerpXX directory to the right one for each version, e.g. sudo chown -R openerp70:openerp70 /opt/openerp70 and also do the same for the log directory and something similar for the config files so they can only be read/written by the right process owner.

            But once done it works fine. We have a development server running 4 different versions of OpenERP at the same time!

  • Gurney says:

    Thank you very much for this tuto !

  • Yoshi says:

    Thank you very much for this tutorial.

    For some reason “sudo /etc/init.d/openerp-server start” does not work. Nothing happens with this command. Permission and daemon directory setting should be correct. Any idea what I might be missing?

    I’m using Ubuntu Server 12.04LTS.

    • Alan Lord says:

      What, if anything, gets written to the log file?
      Can you run openerp as the openerp user and use the correct config file?
      Are you sure nothing is happening? Are there any openerp processes running after you have run the command?

      Without much more info I can’t really suggest what might be wrong.

      • Yoshi says:

        Just found out that I wasn’t paying attention to the extra carriage returns that were added when I modified the file in Windows machine. It works fine after removing them. Sorry about the confusion and thanks again for the thorough tutorial!

  • Peter says:

    For me the startup script also does not work. I can start openERP 7 manually but the script does nothing. Also the log file shows up nothing.
    I did an update from openERP 6.1 – perhaps this is the reason? The correct permissions are added to the file. The only problem is the start up file does nothing. It also ouputs no information about starting or stopping.

  • Christian A Bryant says:

    This site is wonderful. I wated to post an additional step I had to do to make openERP work on my Ubuntu 12.04 LTS server today.

    When I started the server, I saw the following error:

    2013-03-28 13:33:52,977 13564 CRITICAL ? openerp.modules.module: Couldn’t load module web
    2013-03-28 13:33:52,977 13564 CRITICAL ? openerp.modules.module: No module named mock
    2013-03-28 13:33:52,977 13564 ERROR ? openerp.service: Failed to load server-wide module `web`.
    The `web` module is provided by the addons found in the `openerp-web` project.
    Maybe you forgot to add those addons in your addons_path configuration.

    The solution? I forgot to run the setup file, oops. Just do the following at as the Root user (NOT user openerp):

    cd openerp-8.0
    python setup.py install

    Then I was able to start OpenERP error free by doing:

    sudo /etc/init.d/openerp-server start

  • tabor says:

    Hi,
    I have problem to install the boot script.
    Which modification I will do for openerp-server_7.0_latest-1.
    After installing the file on etc/init.d folder I had this error:
    christian@Fellouyarel:~$ sudo chown openerp:root /var/log/openerp
    christian@Fellouyarel:~$ sudo /etc/init.d/openerp-server start
    /etc/init.d/openerp-server: line 23: /etc/rc.d/init.d/functions: No such file or directory.
    Do I have possibility to run openerp at this stage?

    • Alan Lord says:

      The script is saying it can’t find a file called “functions”.

      1. Are you running this on Ubuntu 12.04?
      2. If yes, then look above that line in the file and check for errors and typos etc.
      3. Do not use Windows to edit the file. It uses a different line termination than Unix/Linux (CR+LF vs LF) and can cause problems that are quite hard to track down unless you know.

      • Cyril says:

        Hello,
        thanks for this tutorial.

        I’ve got the same error with Ubuntu 12.04 LTS. STEP 6 is correct (sudo su – openerp -s /bin/bash
        /opt/openerp/server/openerp-server) but not STEP 8.
        I’ve no /etc/rc.d directory.
        Do you have any idea??

        Thanks.
        Cyril

        • Alan Lord says:

          Well, I do not know what you are doing wrong, but you can not be following the instructions above.

          In my init script that is linked to in Step 7, there is no line sourcing /etc/rc.d/init.d/functions.

          As a matter of fact “functions” and that directory structure is not what Ubuntu/Debian systems use. Isn’t that a CentOS/Redhat structure?

          • Cyril says:

            Yes, you’re right. In fact, I used the original script, not your.
            Excuse me and thanks a lot.

            I will continue by installing/configuring the database.
            Regards,
            Cyril

  • Bernard says:

    Thanks for the fantastic guide,
    I’ve got an openerp server setup on my vps, but, what if I want to transfer it to another server? do I just follow and set it up as above then transfer all from /addons (we have some custom modules) that I was using to the new server then import the database?

  • cristycool says:

    Hi,Thanks very much for this tutorial. Iam a newbie on OpenERP, I’ve a problem after running OpenERP. The problem is:

    Traceback (most recent call last):
    File "/opt/openerp/server/openerp/openerp-server", line 2, in import openerp
    File "/opt/openerp/server/openerp/__init__.py", line 39, in import addons
    File "/opt/openerp/server/openerp/addons/__init__.py", line 38, in from openerp.modules import get_modules_resource, get_module_path
    File "/opt/openerp/server/openerp/modules/__init__.py", line 27, in from . import db, graph, loading, migration, module, registry
    File "/opt/openerp/server/openerp/modules/__init__.py", line 27, in from . import db, graph, loading, migration, module, registry
    File "/opt/openerp/server/openerp/modules/graph.py", line 32, in import openerp.osv as osv
    File "/opt/openerp/server/openerp/osv/__init__.py", line 22, in import osv
    File "/opt/openerp/server/openerp/osv/osv.py", line 30, in import orm
    File "/opt/openerp/server/openerp/osv/orm.py", line 62, in import fields
    File "/opt/openerp/server/openerp/osv/fields.py", line 41, in import pytz
    ImportError: No module named pytz

    Please can you help me? Sorry for my English

    • Alan Lord says:

      The error is “ImportError: No module named pytz”

      You have not installed python-tz from the list in step 4.

      Not sure if you realise but you can just cut and paste the code snippets, you do not have to type them all in!

      (On Linux: CTL+C to copy & SHFT+CTL+V to paste into your terminal window)

  • Majok says:

    works like a charm.. Thanks.

  • Guillaume says:

    Thanks for the great HowTo.

    Usefull and working nice here.

  • Samanth says:

    Flawless instructions!!! Everything went smooth. Thanks a lot.

    Just have one question, have you tried installing openerp prestashop sync too? If yes, would love to see the instructions for that. Am so in direstraits install the sync.

    Once again, thanks a ton.

    Samanth

    • SyncProyect says:

      Hello Samanth,

      We have the same problem than you…do you have found the answer yet, or are you still looking for??

      Thank you!!!!

  • \/4a says:

    Hi,

    I’m doing dot-to-dot as per your instructions, but when I reach stage 3, and enter the following command (after becoming postgres user):
    createuser –createdb –username postgres –no-createrole –no-superuser –pwprompt openerp

    I’m asked for the password twice, but then end up getting the follwing error:

    createuser: could not connect to database postgres: could not connect to server: No such file or directory
    Is the server running locally and accepting
    connections on Unix domain socket “/var/run/postgresql/.s.PGSQL.5432″?

    Would really appreciate some help on this, pls.

    Regards.

    • Alan Lord says:

      Sounds like postgres isn’t running or you didn’t run this command first from your own user login (not still as the openerp user mentioned at the end of step 2):

      sudo su - postgres

      You must be the postgres user to run the subsequent command.

      • Bizres says:

        Thanks Alan.
        I am first becoming postgres user with the following command: sudo su – postgres

        Then I do the following command:
        createuser –createdb –username postgres –no-createrole –no-superuser –pwprompt openerp

        and end up with the error (here’s a copy of the command and responses):

        root@faynaj:~# sudo su – postgres
        postgres@faynaj:~$ createuser –createdb –username postgres –no-createrole –no-superuser –pwprompt openerp
        Enter password for new role:
        Enter it again:
        createuser: could not connect to database postgres: could not connect to server: No such file or directory
        Is the server running locally and accepting
        connections on Unix domain socket “/var/run/postgresql/.s.PGSQL.5432″?

        Regards.

        • Alan Lord says:

          #1. You are root. Not good practice. You do not need sudo if you are already root.

          #2 I can only guess that postgres isn’t running. You will need to work out why and fix that first. I have no idea. On Ubuntu if you just do the command: sudo apt-get install postgresql it should be installed and running automatically.

  • Mika B says:

    Hi Alan! I dont have opportunity to open the port 8069 from the firewall that is in front of my virtual machine that is runnin latest Ubuntu 12.04. What is the recommended way to implement OpenERP in this case, do I need just virtual hosting or some proxyin, or perhaps both? You have such a great tutorials and Im sure you can point me which tutorials I shouls follow in this case. Thank you so much in advance, these tutorials are most helpful for many many people.

  • Nathan says:

    Alan, just wanted to say thanks again for the great tutorial. With a basic understanding of linux and your instructions above, I was able to get an instance of OpenERP 7 up and running in about 15 minutes.

    Keep up the good work and thanks again.

    Cheers,
    Nathan

  • SCN says:

    Dear Alan

    Thanks for the great step by step guide.

    I installed on Debian 6.0.7 and everything works fine.

    Logged in to SuperUser with su and exectued all commands without the sudo and those work fine. Just to clarify someone’s Debian related question.

    Thanks again for the great guide.

    SCN

  • Bless says:

    Great work. I followed the steps precisely, and got the same results. It looked daunting from the beginning, but you had everything covered. Again, great work. The only warning I got is something about re-exposing view at /web/treeview. Not sure about that, but it still works great.

    Question though.. I did this on my local server, so no problems there. How would I go about setting this up on a shared hosting platform, then be able to access it from my client’s browser over the internet? Could I do it myself or would the hosting company have to do it for me? And what would I need? I realised we installed openssh-server in the beginning. Is that related to this in any way? Thanks.

    • Mudassar Pasha Maniyar says:

      To do this on a shared hosting platform all you need to do is connect connect through an ssh terminal to your remote server and execute the same steps. Once you are done with the steps, you simply use ur shared hosting server’s IP address followed by the port number 8069. For example. http://xxx.xxx.x.x:8069

      If you are not able to do remote ssh for some reason to your server, perhaps you might require contact your hosting support and raise a request with them.

      That should load your OpenERP application. Hope this helps.

  • Gerod says:

    Why do not use .deb package?

    • Alan Lord says:

      Because you then are in the hands of the package maintainer.

      Want to patch something?
      Want to update the version?
      Want to do something that I haven’t thought of?
      Want to *know* how your ERP is installed and what services it is using on your server?

      I do actually explain this just before Step 1:

      Just one thing before we start: You can simply download a “.deb” package of OpenERP and install that on Ubuntu. Unfortunately that approach doesn’t provide us (Libertus Solutions) with enough fine-grained control over where things get installed, and it restricts our flexibility to modify & customise, hence I prefer to do it a slightly more manual way (this install process below should only take about 10-15 minutes once the host machine has been built).

  • Paulo Matos says:

    Great post Alan,
    Finally I made my first OpenERP installation on Ubuntu thanks to you (i am new to both systems)
    I have followed all instructions and correctly installed OpenERP 7 on a Ubuntu 12.10 x86_x64
    I am just having some problems making the boot scritp to work.

    I follow all instructions until Step 6 and the server worked fine and tested the connection from a client PC to http://server_ip:8069
    Followed the steps described on Step 7 and downloaded the script file and copy it to /etc/init.d/openerp-server
    Added the required permissions
    sudo chmod 755 /etc/init.d/openerp-server
    sudo chown root: /etc/init.d/openerp-server

    If I run the server manually as described on step 6 the server runs fine, but when I try to use the boot script to test it, I get an error:
    sudo /etc/init.d/openerp-server start
    sudo: unable to execute /etc/init.d/openerp-server: No such file or directory

    I have followed the instructions and used the same file names for files and directories on the instructions and nothing changed.
    Also, used the boot scritp on “http://www.theopensourcerer.com/wp-content/uploads/2012/12/openerp-server”.

    Perhaps the problem is on the uBuntu version since the instructions are for ubuntu 12.04 and I am using 12.10…?

    What could be the problem?
    Thank you very much

    Regards

    Paulo Matos

  • peerapat says:

    OpenERP Server Error
    Client Traceback (most recent call last):
    File “/opt/openerp/server/openerp/addons/web/http.py”, line 204, in dispatch
    response["result"] = method(self, **self.params)
    File “/opt/openerp/server/openerp/addons/web/controllers/main.py”, line 769, in create
    params['create_admin_pwd'])
    File “/opt/openerp/server/openerp/addons/web/session.py”, line 31, in proxy_method
    result = self.session.send(self.service_name, method, *args)
    File “/opt/openerp/server/openerp/addons/web/session.py”, line 104, in send
    raise xmlrpclib.Fault(openerp.tools.ustr(e), formatted_info)

    Server Traceback (most recent call last):
    File “/opt/openerp/server/openerp/addons/web/session.py”, line 90, in send
    return openerp.netsvc.dispatch_rpc(service_name, method, args)
    File “/opt/openerp/server/openerp/netsvc.py”, line 293, in dispatch_rpc
    result = ExportService.getService(service_name).dispatch(method, params)
    File “/opt/openerp/server/openerp/service/web_services.py”, line 122, in dispatch
    return fn(*params)
    File “/opt/openerp/server/openerp/service/web_services.py”, line 167, in exp_create_database
    self._create_empty_database(db_name)
    File “/opt/openerp/server/openerp/service/web_services.py”, line 136, in _create_empty_database
    cr.execute(“””CREATE DATABASE “%s” ENCODING ‘unicode’ TEMPLATE “%s” “”” % (name, chosen_template))
    File “/opt/openerp/server/openerp/sql_db.py”, line 161, in wrapper
    return f(self, *args, **kwargs)
    File “/opt/openerp/server/openerp/sql_db.py”, line 226, in execute
    res = self._obj.execute(query, params)
    DataError: encoding UTF8 does not match locale en_US
    DETAIL: The chosen LC_CTYPE setting requires encoding LATIN1.

    When I clicked “Create Database” from #action=database_manager page, It’s shown above error.
    Could you help me how to solve?

    I use Ubuntu 12.10 on EC2

    • Mike says:

      I’m having the same problem, did you find a solution ?

      • I had the same problem. The problem is connected with wrong encoding in PostgreSQL and template1 database. The solution is to fix encoding in Linux to UTF-8 and then:

        sudo su postgres

        psql

        update pg_database set datistemplate=false where datname=’template1′;
        drop database Template1;
        create database template1 with owner=postgres encoding=’UTF-8′

        lc_collate=’en_US.utf8′ lc_ctype=’en_US.utf8′ template template0;

        update pg_database set datistemplate=true where datname=’template1′;

  • Jan says:

    I used the setup from here, and everything is running.

    I want to connect to the OpenERP database via an external connection.
    where can I find some clear information on what to change, in settings, which user and password to use?
    Applications like PGadmin3 complains: could not connect to server: Connection refused (0x0000274D/10061) Is the server running on host “X.X.X.X” and accepting TCP/IP connections on port 5432?

  • Vincent Romero says:

    I type in muy browser http:IP.8069 and displayed “No handler found”. Can help me please

    Regards

    • Jan says:

      Hi Vincent, I see you have a period in the address before 8069 . It has to be for example: 123.123.123.123:8069

      Kind regards,
      Jan

  • Vincent Romero says:

    It was a typing error.

  • Tómas Aron says:

    Good day, thank you for a great tutorial.

    I followed it and everything is up and working, except for the mail.
    I cant seem to get the server to send any mail, I setup gmail smtp in the Settings->general settings->Configure outgoing email servers and the test there said success so , am I missing something ?

    Clean ubuntu server.

  • kim-li says:

    when i create db (7.0server on centos6.4 i386)
    OpenERP Server Error
    Client Traceback (most recent call last):
    File “/opt/openerp/server/openerp/addons/web/http.py”, line 195, in dispatch
    response["result"] = method(self, **self.params)
    File “/opt/openerp/server/openerp/addons/web/controllers/main.py”, line 718, in create
    params['create_admin_pwd'])
    File “/opt/openerp/server/openerp/addons/web/session.py”, line 28, in proxy_method
    result = self.session.send(self.service_name, method, *args)
    File “/opt/openerp/server/openerp/addons/web/session.py”, line 95, in send
    raise xmlrpclib.Fault(‘AccessDenied’, str(e))

    Server Access denied.cc

  • kholitta says:

    Thank you so much for this tuto!

    when I try to run /etc/init.d/openerp-server I get an error (/etc/init.d/openerp-server: line 22: /etc/rc.d/init.d/functions: No such file or directory)

    how can i fix it ?

    I’m using Ubuntu Server 12.04LTS.

  • uzh00 says:

    Thanks a lot for your great tut Alan!

    Where is the openerp folder because id like to change the foldername like dalejsa mentioned above. I tried to type: ls but it doesn't show me any folder.

    I have following Error:

  • ajanekay says:

    Thanks for your tutorial!
    Everything work fine, but only for the boot script. I have got this message “start-stop-daemon: unrecognized option ‘—c'” Try ‘start-stop-daemon –help’. I checked the bash, and I could not figure out where is the problem?

  • timfatt says:

    Thanks for the detailed instructions. Installed on Ubuntu, it’s okay, everything works.
    Decided to put on Debian.
    Step 6.
    sudo su – openerp -s /bin/bash
    /opt/openerp/server/openerp-server
    OpenERP is running and waiting for connections. Open in web browser http://localhost:8069. – it’s okay, everything works.
    CTL+C – stop the server, and exit.
    Next step7. Install the boot script.
    Next step 8. Testing the server
    Run: sudo /etc/init.d/openerp-server start
    The server does not start.
    Why?

  • timfatt says:

    Hello Alan. Thanks for the quick reply. I am a young user of Linux. It seems to me that my problem was that it is wrong to set file permissions. Therefore, the script does not run. I did not solve the problem, I just walked away from the problem.
    I deleted the program. Then found the last package (http://nightly.openerp.com/7.0/nightly/deb/). Automatically set the program by using GDebi. Everything worked fine. Your installation method I liked more, because I knew what I was doing. So I have a question. What is your installation method is better than the method of installation using the deb package?

    • Alan Lord says:

      They are different.

      Using the deb package your ERP system is almost totally in the hands of the package maintainer. So it is more difficult to apply any updates, patches etc. unless you really understand how the package maintainer installed it in the first place.

      If you follow the instructions *exactly* this how to will work. It’s read about 500 times per day…

  • Hi there

    How do I add Aeroo reports as an addon? I am stuck need it to customise my invoices and reports. I followed the entire setup and succesfully but got stuck when installing Aeroo Reports. Please help

    • Alan Lord says:

      Installing Aeroo is not that hard.

      First download the aeroolib library, and install using it’s setup code.

      Then add the aeroo module packages you want to use to your addons directory.

      Then install openoffice/libreoffice, including the headless, packages.

      Then enable “technical features” for your admin user and find the modules in the updated list and install them.

      One simple google search led me to various pages of howtos and videos, including this one from the producers of Aeroo:

      http://www.alistek.com/wiki/index.php/Aeroo_Reports_Linux_server

  • Stone says:

    Hi Alan,

    i just finished install openerp vs 6.1 on my ubuntu 10.04 LTS
    i followed your steps on http://www.theopensourcerer.com/2012/02/how-to-install-openerp-6-1-on-ubuntu-10-04-lts/

    now my question is is it possible for me to have 1 more version which is openerp 7.0 on my ubuntu 10.04 LTS?
    if yes then what’s the step i need to do in order to install vs 7.0 ?
    do i need to follow your step in this link from beginning?

    please advice…

    • Alan Lord says:

      Hi Stone,

      It is possible and has been discussed in the comments a few times.

      Basically you need to create multiple separate users (openerp & postgres), config files, init scripts and directory structures.

      For example we use openerpXX where the XX represents the version number for all users and filenames and the top level directories under /opt.

      Take you time and you’ll get there!

  • Nishit says:

    when i am using command “sudo cp -a openerp-7.0 server” then i will get this error “cp: cannot stat `openerp-7.0′: No such file or directory” how to solve this error pls help…

    • Alan Lord says:

      It’s saying that there is no directory called openerp-7.0 which may well be correct depending on what tarball you have downloaded.

      I suggest using ls to list the names of the directories. You’ll probably see one called openerp-7.0-latest or openerp-7.0-20130521…

      Use “tab complete” to get the directory name into your copy command. So you type sudo cp -a opener[tab] and it should auto-fill the rest of the directory name, then add “server” to the end.

  • gcp says:

    Thanks for the great article, perhaps you can help me with a small issue I’m having? I can create, duplicate and drop databases but I cannot backup. I get the following error:

    Access is denied.
    ——————————————————————————–
    http://192.168.47.10:8069/web/webclient/js?db=gcp_testing:3058

    Kind regards,
    :)

  • jorge says:

    It worked in Ubuntu 13.04. I followed your directions and have no problems. Everything worked as expected step by step.

  • Chillimar says:

    Thank you!
    This was really nice and helpful tutorial :)

  • Denton the bear says:

    Many thanks, excellent tutorial which I managed to stumble through without too many problems.

    Will you be writing any more articles on OpenERP?

  • Some Guy says:

    You don’t explain how to configure the pg_hba.conf, which is problematic as it comes with an excessively paranoid configuration right out of the box.

    • Alan Lord says:

      @Some Guy

      If you follow these instructions, there is no need to edit pg_hba.conf.

      This is a tutorial to help people get OpenERP installed and running on Ubuntu 12.04. There are many, quite possibly infinite, alternative steps and tweaks to configure a system to suit specific requirements but I couldn’t possibly mention all of them here!

  • Hi, Alan thanks for your effort to teach us, can you help me with this error please?

    root@v7erp:~# sudo su – openerp -s /bin/bash
    openerp@v7erp:~$ /opt/openerp/v7/server/openerp-server
    2013-06-09 18:09:28,395 23526 INFO ? openerp: OpenERP version 7.0
    2013-06-09 18:09:28,395 23526 INFO ? openerp: addons paths: /opt/openerp/v7/server/openerp/addons
    2013-06-09 18:09:28,396 23526 INFO ? openerp: database hostname: localhost
    2013-06-09 18:09:28,396 23526 INFO ? openerp: database port: 5432
    2013-06-09 18:09:28,396 23526 INFO ? openerp: database user: openerp
    2013-06-09 18:09:28,398 23526 WARNING ? openerp.modules.module: module web: module not found
    2013-06-09 18:09:28,398 23526 CRITICAL ? openerp.modules.module: Couldn’t load module web
    2013-06-09 18:09:28,399 23526 CRITICAL ? openerp.modules.module: No module named web
    2013-06-09 18:09:28,399 23526 ERROR ? openerp.service: Failed to load server-wide module `web`.
    The `web` module is provided by the addons found in the `openerp-web` project.
    Maybe you forgot to add those addons in your addons_path configuration.
    Traceback (most recent call last):
    File “/opt/openerp/v7/server/openerp/service/__init__.py”, line 59, in load_server_wide_modules
    openerp.modules.module.load_openerp_module(m)
    File “/opt/openerp/v7/server/openerp/modules/module.py”, line 405, in load_openerp_module
    __import__(‘openerp.addons.’ + module_name)
    File “/opt/openerp/v7/server/openerp/modules/module.py”, line 132, in load_module
    f, path, descr = imp.find_module(module_part, ad_paths)
    ImportError: No module named web
    2013-06-09 18:09:28,399 23526 WARNING ? openerp.modules.module: module web_kanban: module not found
    2013-06-09 18:09:28,400 23526 CRITICAL ? openerp.modules.module: Couldn’t load module web_kanban
    2013-06-09 18:09:28,400 23526 CRITICAL ? openerp.modules.module: No module named web_kanban
    2013-06-09 18:09:28,400 23526 ERROR ? openerp.service: Failed to load server-wide module `web_kanban`.
    Traceback (most recent call last):
    File “/opt/openerp/v7/server/openerp/service/__init__.py”, line 59, in load_server_wide_modules
    openerp.modules.module.load_openerp_module(m)
    File “/opt/openerp/v7/server/openerp/modules/module.py”, line 405, in load_openerp_module
    __import__(‘openerp.addons.’ + module_name)
    File “/opt/openerp/v7/server/openerp/modules/module.py”, line 132, in load_module
    f, path, descr = imp.find_module(module_part, ad_paths)
    ImportError: No module named web_kanban
    2013-06-09 18:09:28,421 23526 INFO ? openerp.service.wsgi_server: HTTP service (werkzeug) running on 0.0.0.0:8069
    2013-06-09 18:09:28,422 23526 INFO ? openerp: OpenERP server is running, waiting for connections…

    • Alan Lord says:

      You are not starting it with a config file so it cannot find your addons and web directories.

      Make sure your config file has the right addon paths configured then add -c /path/to/my/configfile when you try and start openerp manually.

  • Alan, I did it, as You recommend me, but i’m still having this error, can You advice me? I’m newbie ubuntu/openerp user

    root@v7erp:~# sudo su openerp
    openerp@v7erp:/root$ cd /opt/openerp/v7/server/
    openerp@v7erp:~/v7/server$ ./openerp-server -c /etc/openerp-server.conf &
    [1] 1219
    openerp@v7erp:~/v7/server$ Traceback (most recent call last):
    File “./openerp-server”, line 5, in
    openerp.cli.main()
    File “/opt/openerp/v7/server/openerp/cli/__init__.py”, line 61, in main
    o.run(args)
    File “/opt/openerp/v7/server/openerp/cli/server.py”, line 265, in run
    main(args)
    File “/opt/openerp/v7/server/openerp/cli/server.py”, line 222, in main
    openerp.tools.config.parse_config(args)
    File “/opt/openerp/v7/server/openerp/tools/config.py”, line 369, in parse_config
    self.load()
    File “/opt/openerp/v7/server/openerp/tools/config.py”, line 556, in load
    p.read([self.rcfile])
    File “/usr/lib/python2.7/ConfigParser.py”, line 305, in read
    self._read(fp, filename)
    File “/usr/lib/python2.7/ConfigParser.py”, line 512, in _read
    raise MissingSectionHeaderError(fpname, lineno, line)
    ConfigParser.MissingSectionHeaderError: File contains no section headers.
    file: /etc/openerp-server.conf, line: 1
    ‘ [options]\n’

    [1]+ Exit 1 ./openerp-server -c /etc/openerp-server.conf
    openerp@v7erp:~/v7/server$

    • Alan Lord says:

      Your config file is not correct:

      ConfigParser.MissingSectionHeaderError: File contains no section headers.
      file: /etc/openerp-server.conf, line: 1

Leave a Reply

XHTML: You can use these tags:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>