Install Odoo 10 on Ubuntu 16.04 LTS

EASIEST way to Install Odoo 10 on Ubuntu 16.04 from GitHub. You are few steps away from exploring Next Big Revolution: “Odoo 10″. Open the terminal and execute below commands step-by-step to achieve excellence. Explore Odoo 10 Awesome Features.

Step 1

Update apt source list

sudo apt-get update

Step 2

Install Updates

sudo apt-get upgrade

Step 3

Install Python Dependencies for Odoo

sudo apt-get install python-dateutil python-docutils python-feedparser 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 poppler-utils python-pip python-pypdf python-passlib python-decorator gcc python-dev mc bzr python-setuptools python-markupsafe python-reportlab-accel python-zsi python-yaml python-argparse python-openssl python-egenix-mxdatetime python-usb python-serial lptools make python-pydot python-psutil python-paramiko poppler-utils python-pdftools antiword python-requests python-xlsxwriter python-suds python-psycogreen python-ofxparse python-gevent

Step 4

Odoo Web Dependencies

sudo apt-get install -y npm
sudo ln -s /usr/bin/nodejs /usr/bin/node
sudo npm install -g less less-plugin-clean-css

Step 5

Install PostgreSQL

sudo apt-get install python-software-properties
sudo vim /etc/apt/sources.list.d/pgdg.list
add a line for the repository
deb http://apt.postgresql.org/pub/repos/apt/ xenial-pgdg main
wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
sudo apt-get update
sudo apt-get install postgresql-9.6

Step 6

Create Database user for Odoo

sudo su postgres
cd
createuser -s odoo
createuser -s ubuntu_user_name
exit

Step 7

Create Odoo user and group

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

Step 8

Install Gdata

cd /opt/odoo
Go to the link “https://pypi.python.org/pypi/gdata” and download the gdata-2.0.18 and transfer the file to server.
Otherwise through terminal follow the below step:
sudo wget https://pypi.python.org/packages/a8/70/bd554151443fe9e89d9a934a7891aaffc63b9cb5c7d608972919a002c03c/gdata-2.0.18.tar.gz
sudo tar zxvf gdata-2.0.18.tar.gz
sudo chown -R odoo: gdata-2.0.18
sudo -s
cd gdata-2.0.18/
python setup.py install
exit

Step 9

Odoo 10 Download from GitHub

Get lastest Odoo 10 from github repository. Download the Zip file from URL : “https://github.com/odoo/odoo/tree/10.0″ . Transfer the same file to /opt/odoo directory on server through ftp. Otherwise Follow the below Step
cd /opt/odoo
sudo wget https://github.com/odoo/odoo/archive/10.0.zip
sudo unzip 10.0.zip
sudo chown -R odoo: odoo-10.0
Or Git Clone Odoo
git clone --depth=1 --branch=10.0 https://github.com/odoo/odoo.git /opt/odoo/odoo
sudo mv odoo/ odoo-10.0/
sudo chown -R odoo: odoo-10.0

Step 10

Create Odoo Log File

sudo mkdir /var/log/odoo
sudo chown -R odoo:root /var/log/odoo

Step 11

Edit Odoo configuration file

sudo cp /opt/odoo/odoo-10.0/debian/odoo.conf /etc/odoo.conf
sudo chown odoo: /etc/odoo.conf
sudo vim /etc/odoo.conf
#Copy and paste below content in config file , write correct addons paths
[options]
; This is the password that allows database operations:
; admin_passwd = PASSWORD
db_host = False
db_port = False
db_user = odoo
db_password = False
addons_path = /opt/odoo/odoo-10.0/addons
;Log Settings
logfile = /var/log/odoo/odoo.log
log_level = error

Step 12

WKHTMLTOPDF for Odoo

Follow the steps mention in below link and then return back for the next step.
https://www.getopenerp.com/wkhtmltopdf-for-odoo8/

Step 13

Now Start Odoo Server

cd /opt/odoo/odoo-10.0
./odoo-bin

Step 14

Go to web browser to access Odoo 10

http://localhost:8069

Your Feedback will be Appreciated. Thanks

Recent Posts
Showing 51 comments
  • Dan
    Reply

    Hi,
    Thanks for the tutorial, works pretty well, but there are two minor issues:
    1. At the python modules installation (step 3), the correct name for python-pypdf module is “python-pypdf”, not “python-pyPdf”.
    2. When you clone Odoo 10 from Git (git clone –depth=1 –branch=10.0 https://github.com/odoo/odoo.git /opt/odoo/odoo), the resulting dirs structure is /opt/odoo/odoo, not /opt/odoo/odoo-10.0

    Thanks again.

    Dan

    • GetOpenERP
      Reply

      Thanks for your feedback.

  • Sebastian
    Reply

    Hi, great tutorial.

    Worked well. One question: how would I run odoo as a service?
    A soon as I close the ssh connection to my vserver odoo shuts down and isn´t available any more.

    Thanks again
    Sebastian

  • Coko Tracy Mirindi
    Reply

    It easy dear Sebstian. Simply create a boot script called odoo10-server to gain control over Odoo’s behavior and use it at server startup and shutdown.

    $ sudo vim /etc/init.d/odoo10-server and past this that boot-script file

    #!/bin/sh
    ### BEGIN INIT INFO
    # Provides: odoo-server
    # Required-Start: $remote_fs $syslog
    # Required-Stop: $remote_fs $syslog
    # Should-Start: $network
    # Should-Stop: $network
    # Default-Start: 2 3 4 5
    # Default-Stop: 0 1 6
    # Short-Description: Odoo ERP
    # Description: Odoo is a complete ERP business solution.
    ### END INIT INFO

    PATH=/bin:/sbin:/usr/bin
    # Change the Odoo10 source files location according your needs.
    DAEMON=/opt/odoo/openerp-server
    # Use the name convention of your choice
    NAME=odoo10-server
    DESC=odoo10-server

    # Specify the user name (Default: odoo).
    USER=odoo

    # Specify an alternate config file (Default: /etc/odoo-server.conf).
    CONFIGFILE=”/etc/odoo-server.conf”

    # pidfile
    PIDFILE=/var/run/$NAME.pid

    # Additional options that are passed to the Daemon.
    DAEMON_OPTS=”-c $CONFIGFILE”

    [ -x $DAEMON ] || exit 0
    [ -f $CONFIGFILE ] || exit 0

    checkpid() {
    [ -f $PIDFILE ] || return 1
    pid=`cat $PIDFILE`
    [ -d /proc/$pid ] && return 0
    return 1
    }

    case “${1}” in
    start)
    echo -n “Starting ${DESC}: ”

    start-stop-daemon –start –quiet –pidfile ${PIDFILE} \
    –chuid ${USER} –background –make-pidfile \
    –exec ${DAEMON} — ${DAEMON_OPTS}

    echo “${NAME}.”
    ;;

    stop)
    echo -n “Stopping ${DESC}: ”

    start-stop-daemon –stop –quiet –pidfile ${PIDFILE} \
    –oknodo

    echo “${NAME}.”
    ;;

    restart|force-reload)
    echo -n “Restarting ${DESC}: ”

    start-stop-daemon –stop –quiet –pidfile ${PIDFILE} \
    –oknodo

    sleep 1

    start-stop-daemon –start –quiet –pidfile ${PIDFILE} \
    –chuid ${USER} –background –make-pidfile \
    –exec ${DAEMON} — ${DAEMON_OPTS}

    echo “${NAME}.”
    ;;

    *)
    N=/etc/init.d/${NAME}
    echo “Usage: ${NAME} {start|stop|restart|force-reload}” >&2
    exit 1
    ;;
    esac

    exit 0

    save then work on Odoo File Ownership and Permissions.
    Change the odoo10-server file permissions and ownership so only root can write to it, while the odoo user will only be able to read and execute it.

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

    PS: check goopd files nominations and boot-script parametters.

    Hope this will help you.

    • dj
      Reply

      @Coko your startup script looks like it is for an older Odoo version as it references openerp odoo 9 and older but not the latest odoo 10
      DAEMON=/opt/odoo/openerp-server
      CONFIGFILE=”/etc/odoo-server.conf”

      Also it appears that Ubuntu is/has migrated to systemd and not an upstart. So how should we really setup odoo to run as a service after reboot?

    • Ian Thompson
      Reply

      Starting Odoo 10 on 16.04 doesn’t use /etc/init.d/ scripts anymore. To start it automatically you need to create a Systemd Upstart script.
      See here: https://www.odoo.com/forum/help-1/question/odoo-10-runs-via-odoo-bin-but-cannot-get-to-run-as-a-service-is-this-a-systemd-upstart-thing-112460

      Here is the script based on this setup.

      sudo vim /etc/systemd/system/odoo10.service
      CTRL-I
      —–Copy Below—–
      [Unit]
      Description=Odoo
      Documentation=http://www.odoo.com/

      [Service]
      # Ubuntu/Debian convention:
      Type=simple
      User=odoo
      ExecStart=/opt/odoo/odoo-10.0/odoo-bin -c /etc/odoo.conf

      [Install]
      WantedBy=default.target
      —–END Script—–

      sudo mkdir /var/lib/odoo
      sudo chown odoo:root /var/lib/odoo -R

      sudo systemctl start odoo10.service (starts service)
      sudo systemctl stop odoo10.service (stops service)
      sudo systemctl restart odoo10.service (restarts Service)
      sudo systemctl status odoo10.service (status of service)
      sudo systemctl enable odoo10.service (starts service at boot)
      sudo systemctl disable odoo10.service (disables service at boot)

      • freedomoss
        Reply

        Thanks Ian! It’s perfect.

        Cheers!

  • Georg
    Reply

    Hi,
    doing STEP 3 I get the following result:

    Reading package lists… Done
    Building dependency tree
    Reading state information… Done
    Note, selecting ‘libpython2.7-stdlib’ instead of ‘python-argparse’
    Package python-pybabel is not available, but is referred to by another package.
    This may mean that the package is missing, has been obsoleted, or
    is only available from another source

    E: Package ‘python-pybabel’ has no installation candidate

    I read a bit about and it seems that ubuntu 16.10 forces python 3. Do you have a solution?

    Thanks for your help.

    Georg

    • Sergey
      Reply

      try

      pip install Babel

  • reena
    Reply

    Great tutorial.One question: how would I run odoo as a service?
    I added script as above and start service by sudo /etc/init.d/odoo-server start but not started…start service only by ./odoo-bin.

    • Caneron
      Reply

      Reena – did you manage to get the service started?

  • fernando vinha
    Reply

    Can someone help me

    I followed the whole tutorial and it gave me the second error in the terminal

    2016-11-09 18:49:00,632 18050 ERROR ? odoo.addons.bus.models.bus: Bus.loop error, sleep and retry
    Traceback (most recent call last):
    File “/opt/odoo/odoo-10.0/addons/bus/models/bus.py”, line 170, in run
    self.loop()
    File “/opt/odoo/odoo-10.0/addons/bus/models/bus.py”, line 148, in loop
    with odoo.sql_db.db_connect(‘postgres’).cursor() as cr:
    File “/opt/odoo/odoo-10.0/odoo/sql_db.py”, line 622, in cursor
    return Cursor(self.__pool, self.dbname, self.dsn, serialized=serialized)
    File “/opt/odoo/odoo-10.0/odoo/sql_db.py”, line 164, in __init__
    self._cnx = pool.borrow(dsn)
    File “/opt/odoo/odoo-10.0/odoo/sql_db.py”, line 505, in _locked
    return fun(self, *args, **kwargs)
    File “/opt/odoo/odoo-10.0/odoo/sql_db.py”, line 573, in borrow
    **connection_info)
    File “/usr/lib/python2.7/dist-packages/psycopg2/__init__.py”, line 164, in connect
    conn = _connect(dsn, connection_factory=connection_factory, async=async)
    OperationalError: FATAL: role “pc” does not exist
    And in the browser
    Internal Server Error

    The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there is an error in the application.

    • GetOpenERP
      Reply

      Hello ,

      Create postgresql user named pc. Hope this will resolve your issue.

      • Anoop
        Reply

        The above suggestion works. Thank you.

  • Jason
    Reply

    Hi Coko,

    Thanks a lot for your write-up on this. It’s been really helpful.

    BTW, I tried the code for making odoo a restartable service that you put in the comment here but it isnt working for me. When I run the command “/ect/init.d/odoo-server start”, I get the following error:

    “/etc/init.d/odoo-server: 26: /etc/init.d/odoo-server: ”/etc/odoo.conf””: not found”
    which is really wierd because I have the said “/ect/odoo.conf” file on my server.

    What am I doing wrong?

  • Ian Thompson
    Reply

    Instead of using the long and drawn out process of Installing GDATA as you listed, isn’t it just easier to install via pip.

    The whole section turns into…

    sudo pip install gdata

    This downloads and installs the latest version of gdata. Much easier to use apt-get and pip for package management if you are not installing into custom directories or with special options.

    GIVE IT A TRY.

    • GetOpenERP
      Reply

      Thanks for your feedback

  • Nick Ace
    Reply

    Hi, I have tried you instruction and it work prety well. as testing it.

    Install Project,

    The problem I encounter is that I cannot edit/add a description to a task.

    Please help

  • elmar
    Reply

    Awesome !
    Thank you for this tutorial

  • Adam
    Reply

    Hi,
    Thanks for good toutorial.
    Almost everythink is ok, but I can’t receive email’s. Logs tells:
    ####
    File “/opt/odoo/odoo-10.0/addons/mail/models/mail_thread.py”, line 943, in message_route_verify
    self._routing_warn(_(‘model %s does not accept document creation’) % model, _(‘skipping’), message_id, route, assert_model)
    ###

    I don’t know what I should even check, please help.

  • Nitin Kantak
    Reply

    This is really helpful . Thanks a lot .

  • Naseer
    Reply

    Hello I got following error on my install.

    ———
    HTTP/1.1″ 500 –
    2016-11-28 13:06:50,505 8319 ERROR ? werkzeug: Error on request:
    Traceback (most recent call last):
    File “/usr/lib/python2.7/dist-packages/werkzeug/serving.py”, line 180, in run_wsgi
    execute(self.server.app)
    File “/usr/lib/python2.7/dist-packages/werkzeug/serving.py”, line 168, in execute
    application_iter = app(environ, start_response)
    File “/opt/odoo/odoo-10.0/odoo/service/server.py”, line 246, in app
    return self.app(e, s)
    File “/opt/odoo/odoo-10.0/odoo/service/wsgi_server.py”, line 184, in application
    return application_unproxied(environ, start_response)
    File “/opt/odoo/odoo-10.0/odoo/service/wsgi_server.py”, line 170, in application_unproxied
    result = handler(environ, start_response)
    File “/opt/odoo/odoo-10.0/odoo/http.py”, line 1306, in __call__
    return self.dispatch(environ, start_response)
    File “/opt/odoo/odoo-10.0/odoo/http.py”, line 1280, in __call__
    return self.app(environ, start_wrapped)
    File “/usr/lib/python2.7/dist-packages/werkzeug/wsgi.py”, line 591, in __call__
    return self.app(environ, start_response)
    File “/opt/odoo/odoo-10.0/odoo/http.py”, line 1436, in dispatch
    self.setup_db(httprequest)
    File “/opt/odoo/odoo-10.0/odoo/http.py”, line 1366, in setup_db
    httprequest.session.db = db_monodb(httprequest)
    File “/opt/odoo/odoo-10.0/odoo/http.py”, line 1514, in db_monodb
    dbs = db_list(True, httprequest)
    File “/opt/odoo/odoo-10.0/odoo/http.py”, line 1488, in db_list
    dbs = odoo.service.db.list_dbs(force)
    File “/opt/odoo/odoo-10.0/odoo/service/db.py”, line 325, in list_dbs
    with closing(db.cursor()) as cr:
    File “/opt/odoo/odoo-10.0/odoo/sql_db.py”, line 622, in cursor
    return Cursor(self.__pool, self.dbname, self.dsn, serialized=serialized)
    File “/opt/odoo/odoo-10.0/odoo/sql_db.py”, line 164, in __init__
    self._cnx = pool.borrow(dsn)
    File “/opt/odoo/odoo-10.0/odoo/sql_db.py”, line 505, in _locked
    return fun(self, *args, **kwargs)
    File “/opt/odoo/odoo-10.0/odoo/sql_db.py”, line 573, in borrow
    **connection_info)
    File “/usr/lib/python2.7/dist-packages/psycopg2/__init__.py”, line 164, in connect
    conn = _connect(dsn, connection_factory=connection_factory, async=async)
    OperationalError: FATAL: role “root” does not exist
    ———

  • sarath
    Reply

    #!/bin/sh
    ### BEGIN INIT INFO
    # Provides: odoo-server
    # Required-Start: $remote_fs $syslog
    # Required-Stop: $remote_fs $syslog
    # Should-Start: $network
    # Should-Stop: $network
    # Default-Start: 2 3 4 5
    # Default-Stop: 0 1 6
    # Short-Description: Odoo ERP
    # Description: Odoo is a complete ERP business solution.
    ### END INIT INFO

    PATH=/bin:/sbin:/usr/bin
    # Change the Odoo source files location according your needs.
    DAEMON=/opt/odoo/odoo-0.0/odoo-bin
    # Use the name convention of your choice
    NAME=odoo-server
    DESC=odoo-server

    # Specify the user name (Default: odoo).
    USER=odoo

    # Specify an alternate config file (Default: /etc/odoo-server.conf).
    CONFIGFILE=”/etc/odoo.conf”

    # pidfile
    PIDFILE=/var/run/$NAME.pid

    # Additional options that are passed to the Daemon.
    DAEMON_OPTS=”-c $CONFIGFILE”

    [ -x $DAEMON ] || exit 0
    [ -f $CONFIGFILE ] || exit 0

    checkpid() {
    [ -f $PIDFILE ] || return 1
    pid=`cat $PIDFILE`
    [ -d /proc/$pid ] && return 0
    return 1
    }

    case “${1}” in
    start)
    echo -n “Starting ${DESC}: ”

    start-stop-daemon –start –quiet –pidfile ${PIDFILE} \
    –chuid ${USER} –background –make-pidfile \
    –exec ${DAEMON} — ${DAEMON_OPTS}

    echo “${NAME}.”
    ;;

    stop)
    echo -n “Stopping ${DESC}: ”

    start-stop-daemon –stop –quiet –pidfile ${PIDFILE} \
    –oknodo

    echo “${NAME}.”
    ;;

    restart|force-reload)
    echo -n “Restarting ${DESC}: ”

    start-stop-daemon –stop –quiet –pidfile ${PIDFILE} \
    –oknodo

    sleep 1

    start-stop-daemon –start –quiet –pidfile ${PIDFILE} \
    –chuid ${USER} –background –make-pidfile \
    –exec ${DAEMON} — ${DAEMON_OPTS}

    echo “${NAME}.”
    ;;

    *)
    N=/etc/init.d/${NAME}
    echo “Usage: ${NAME} {start|stop|restart|force-reload}” >&2
    exit 1
    ;;
    esac

    exit 0

  • Alvaro
    Reply

    Perfect. Thank you

  • nada
    Reply

    sudo apt-get upgrade
    when i did it :
    E: Could not get lock /var/lib/dpkg/lock – open (11: Resource temporarily unavailable)
    E: Unable to lock the administration directory (/var/lib/dpkg/), is another process using it?
    i got those

  • ALI
    Reply

    Hi

    Thanks alot for helpful article. Could we apply this on VPS (ex. digitalocean droplet)

    Thanks,
    Ali

  • Sidhi Tejomoyo
    Reply

    here’s the log :

    myadmin@ubserver:/opt/odoo/odoo-10.0$ ./odoo-bin
    2017-01-08 23:45:28,253 3429 INFO ? odoo: Odoo version 10.0
    2017-01-08 23:45:28,253 3429 INFO ? odoo: addons paths: [‘/home/all/.local/share/Odoo/addons/10.0′, u’/opt/odoo/odoo-10.0/odoo/addons’, u’/opt/odoo/odoo-10.0/addons’]
    2017-01-08 23:45:28,253 3429 INFO ? odoo: database: default@default:default
    2017-01-08 23:45:28,272 3429 INFO ? odoo.service.server: HTTP service (werkzeug) running on 0.0.0.0:8069
    2017-01-08 23:45:31,097 3429 INFO ? odoo.addons.bus.models.bus: Bus.loop listen imbus on db postgres
    2017-01-08 23:45:31,124 3429 INFO ? odoo.sql_db: Connection to the database failed
    2017-01-08 23:45:31,125 3429 ERROR ? odoo.addons.bus.models.bus: Bus.loop error, sleep and retry
    Traceback (most recent call last):
    File “/opt/odoo/odoo-10.0/addons/bus/models/bus.py”, line 170, in run
    self.loop()
    File “/opt/odoo/odoo-10.0/addons/bus/models/bus.py”, line 148, in loop
    with odoo.sql_db.db_connect(‘postgres’).cursor() as cr:
    File “/opt/odoo/odoo-10.0/odoo/sql_db.py”, line 622, in cursor
    return Cursor(self.__pool, self.dbname, self.dsn, serialized=serialized)
    File “/opt/odoo/odoo-10.0/odoo/sql_db.py”, line 164, in __init__
    self._cnx = pool.borrow(dsn)
    File “/opt/odoo/odoo-10.0/odoo/sql_db.py”, line 505, in _locked
    return fun(self, *args, **kwargs)
    File “/opt/odoo/odoo-10.0/odoo/sql_db.py”, line 573, in borrow
    **connection_info)
    File “/usr/lib/python2.7/dist-packages/psycopg2/__init__.py”, line 164, in connect
    conn = _connect(dsn, connection_factory=connection_factory, async=async)
    OperationalError: FATAL: role “all” does not exist

    2017-01-08 23:45:31,717 3429 INFO ? odoo.addons.report.models.report: Will use the Wkhtmltopdf binary at /usr/local/bin/wkhtmltopdf
    2017-01-08 23:45:32,048 3429 INFO ? odoo.http: HTTP Configuring static files
    2017-01-08 23:45:32,052 3429 INFO ? odoo.sql_db: Connection to the database failed
    2017-01-08 23:45:32,055 3429 INFO ? werkzeug: 192.168.1.42 – – [08/Jan/2017 23:45:32] “GET / HTTP/1.1″ 500 –
    2017-01-08 23:45:32,061 3429 ERROR ? werkzeug: Error on request:
    Traceback (most recent call last):
    File “/usr/lib/python2.7/dist-packages/werkzeug/serving.py”, line 180, in run_wsgi
    execute(self.server.app)
    File “/usr/lib/python2.7/dist-packages/werkzeug/serving.py”, line 168, in execute
    application_iter = app(environ, start_response)
    File “/opt/odoo/odoo-10.0/odoo/service/server.py”, line 246, in app
    return self.app(e, s)
    File “/opt/odoo/odoo-10.0/odoo/service/wsgi_server.py”, line 184, in application
    return application_unproxied(environ, start_response)
    File “/opt/odoo/odoo-10.0/odoo/service/wsgi_server.py”, line 170, in application_unproxied
    result = handler(environ, start_response)
    File “/opt/odoo/odoo-10.0/odoo/http.py”, line 1306, in __call__
    return self.dispatch(environ, start_response)
    File “/opt/odoo/odoo-10.0/odoo/http.py”, line 1280, in __call__
    return self.app(environ, start_wrapped)
    File “/usr/lib/python2.7/dist-packages/werkzeug/wsgi.py”, line 591, in __call__
    return self.app(environ, start_response)
    File “/opt/odoo/odoo-10.0/odoo/http.py”, line 1436, in dispatch
    self.setup_db(httprequest)
    File “/opt/odoo/odoo-10.0/odoo/http.py”, line 1366, in setup_db
    httprequest.session.db = db_monodb(httprequest)
    File “/opt/odoo/odoo-10.0/odoo/http.py”, line 1514, in db_monodb
    dbs = db_list(True, httprequest)
    File “/opt/odoo/odoo-10.0/odoo/http.py”, line 1488, in db_list
    dbs = odoo.service.db.list_dbs(force)
    File “/opt/odoo/odoo-10.0/odoo/service/db.py”, line 325, in list_dbs
    with closing(db.cursor()) as cr:
    File “/opt/odoo/odoo-10.0/odoo/sql_db.py”, line 622, in cursor
    return Cursor(self.__pool, self.dbname, self.dsn, serialized=serialized)
    File “/opt/odoo/odoo-10.0/odoo/sql_db.py”, line 164, in __init__
    self._cnx = pool.borrow(dsn)
    File “/opt/odoo/odoo-10.0/odoo/sql_db.py”, line 505, in _locked
    return fun(self, *args, **kwargs)
    File “/opt/odoo/odoo-10.0/odoo/sql_db.py”, line 573, in borrow
    **connection_info)
    File “/usr/lib/python2.7/dist-packages/psycopg2/__init__.py”, line 164, in connect
    conn = _connect(dsn, connection_factory=connection_factory, async=async)
    OperationalError: FATAL: role “all” does not exist
    2017-01-08 23:45:32,127 3429 INFO ? odoo.sql_db: Connection to the database failed
    2017-01-08 23:45:32,129 3429 INFO ? werkzeug: 192.168.1.42 – – [08/Jan/2017 23:45:32] “GET /favicon.ico HTTP/1.1″ 500 –
    2017-01-08 23:45:32,138 3429 ERROR ? werkzeug: Error on request:
    Traceback (most recent call last):
    File “/usr/lib/python2.7/dist-packages/werkzeug/serving.py”, line 180, in run_wsgi
    execute(self.server.app)
    File “/usr/lib/python2.7/dist-packages/werkzeug/serving.py”, line 168, in execute
    application_iter = app(environ, start_response)
    File “/opt/odoo/odoo-10.0/odoo/service/server.py”, line 246, in app
    return self.app(e, s)
    File “/opt/odoo/odoo-10.0/odoo/service/wsgi_server.py”, line 184, in application
    return application_unproxied(environ, start_response)
    File “/opt/odoo/odoo-10.0/odoo/service/wsgi_server.py”, line 170, in application_unproxied
    result = handler(environ, start_response)
    File “/opt/odoo/odoo-10.0/odoo/http.py”, line 1306, in __call__
    return self.dispatch(environ, start_response)
    File “/opt/odoo/odoo-10.0/odoo/http.py”, line 1280, in __call__
    return self.app(environ, start_wrapped)
    File “/usr/lib/python2.7/dist-packages/werkzeug/wsgi.py”, line 591, in __call__
    return self.app(environ, start_response)
    File “/opt/odoo/odoo-10.0/odoo/http.py”, line 1436, in dispatch
    self.setup_db(httprequest)
    File “/opt/odoo/odoo-10.0/odoo/http.py”, line 1366, in setup_db
    httprequest.session.db = db_monodb(httprequest)
    File “/opt/odoo/odoo-10.0/odoo/http.py”, line 1514, in db_monodb
    dbs = db_list(True, httprequest)
    File “/opt/odoo/odoo-10.0/odoo/http.py”, line 1488, in db_list
    dbs = odoo.service.db.list_dbs(force)
    File “/opt/odoo/odoo-10.0/odoo/service/db.py”, line 325, in list_dbs
    with closing(db.cursor()) as cr:
    File “/opt/odoo/odoo-10.0/odoo/sql_db.py”, line 622, in cursor
    return Cursor(self.__pool, self.dbname, self.dsn, serialized=serialized)
    File “/opt/odoo/odoo-10.0/odoo/sql_db.py”, line 164, in __init__
    self._cnx = pool.borrow(dsn)
    File “/opt/odoo/odoo-10.0/odoo/sql_db.py”, line 505, in _locked
    return fun(self, *args, **kwargs)
    File “/opt/odoo/odoo-10.0/odoo/sql_db.py”, line 573, in borrow
    **connection_info)
    File “/usr/lib/python2.7/dist-packages/psycopg2/__init__.py”, line 164, in connect
    conn = _connect(dsn, connection_factory=connection_factory, async=async)
    OperationalError: FATAL: role “all” does not exist
    all@ubserver:~$ ./odoo-bin
    -bash: ./odoo-bin: No such file or directory
    all@ubserver:~$ clear
    all@ubserver:~$ cd /opt/odoo/odoo-10.0
    all@ubserver:/opt/odoo/odoo-10.0$ ./odoo-bin
    2017-01-08 23:45:28,253 3429 INFO ? odoo: Odoo version 10.0
    2017-01-08 23:45:28,253 3429 INFO ? odoo: addons paths: [‘/home/all/.local/share/Odoo/addons/10.0′, u’/opt/odoo/odoo-10.0/odoo/addons’, u’/opt/odoo/odoo-10.0/addons’]
    2017-01-08 23:45:28,253 3429 INFO ? odoo: database: default@default:default
    2017-01-08 23:45:28,272 3429 INFO ? odoo.service.server: HTTP service (werkzeug) running on 0.0.0.0:8069
    2017-01-08 23:45:31,097 3429 INFO ? odoo.addons.bus.models.bus: Bus.loop listen imbus on db postgres
    2017-01-08 23:45:31,124 3429 INFO ? odoo.sql_db: Connection to the database failed
    2017-01-08 23:45:31,125 3429 ERROR ? odoo.addons.bus.models.bus: Bus.loop error, sleep and retry
    Traceback (most recent call last):
    File “/opt/odoo/odoo-10.0/addons/bus/models/bus.py”, line 170, in run
    self.loop()
    File “/opt/odoo/odoo-10.0/addons/bus/models/bus.py”, line 148, in loop
    with odoo.sql_db.db_connect(‘postgres’).cursor() as cr:
    File “/opt/odoo/odoo-10.0/odoo/sql_db.py”, line 622, in cursor
    return Cursor(self.__pool, self.dbname, self.dsn, serialized=serialized)
    File “/opt/odoo/odoo-10.0/odoo/sql_db.py”, line 164, in __init__
    self._cnx = pool.borrow(dsn)
    File “/opt/odoo/odoo-10.0/odoo/sql_db.py”, line 505, in _locked
    return fun(self, *args, **kwargs)
    File “/opt/odoo/odoo-10.0/odoo/sql_db.py”, line 573, in borrow
    **connection_info)
    File “/usr/lib/python2.7/dist-packages/psycopg2/__init__.py”, line 164, in connect
    conn = _connect(dsn, connection_factory=connection_factory, async=async)
    OperationalError: FATAL: role “all” does not exist

    2017-01-08 23:45:31,717 3429 INFO ? odoo.addons.report.models.report: Will use the Wkhtmltopdf binary at /usr/local/bin/wkhtmltopdf
    2017-01-08 23:45:32,048 3429 INFO ? odoo.http: HTTP Configuring static files
    2017-01-08 23:45:32,052 3429 INFO ? odoo.sql_db: Connection to the database failed
    2017-01-08 23:45:32,055 3429 INFO ? werkzeug: 192.168.1.42 – – [08/Jan/2017 23:45:32] “GET / HTTP/1.1″ 500 –
    2017-01-08 23:45:32,061 3429 ERROR ? werkzeug: Error on request:
    Traceback (most recent call last):
    File “/usr/lib/python2.7/dist-packages/werkzeug/serving.py”, line 180, in run_wsgi
    execute(self.server.app)
    File “/usr/lib/python2.7/dist-packages/werkzeug/serving.py”, line 168, in execute
    application_iter = app(environ, start_response)
    File “/opt/odoo/odoo-10.0/odoo/service/server.py”, line 246, in app
    return self.app(e, s)
    File “/opt/odoo/odoo-10.0/odoo/service/wsgi_server.py”, line 184, in application
    return application_unproxied(environ, start_response)
    File “/opt/odoo/odoo-10.0/odoo/service/wsgi_server.py”, line 170, in application_unproxied
    result = handler(environ, start_response)
    File “/opt/odoo/odoo-10.0/odoo/http.py”, line 1306, in __call__
    return self.dispatch(environ, start_response)
    File “/opt/odoo/odoo-10.0/odoo/http.py”, line 1280, in __call__
    return self.app(environ, start_wrapped)
    File “/usr/lib/python2.7/dist-packages/werkzeug/wsgi.py”, line 591, in __call__
    return self.app(environ, start_response)
    File “/opt/odoo/odoo-10.0/odoo/http.py”, line 1436, in dispatch
    self.setup_db(httprequest)
    File “/opt/odoo/odoo-10.0/odoo/http.py”, line 1366, in setup_db
    httprequest.session.db = db_monodb(httprequest)
    File “/opt/odoo/odoo-10.0/odoo/http.py”, line 1514, in db_monodb
    dbs = db_list(True, httprequest)
    File “/opt/odoo/odoo-10.0/odoo/http.py”, line 1488, in db_list
    dbs = odoo.service.db.list_dbs(force)
    File “/opt/odoo/odoo-10.0/odoo/service/db.py”, line 325, in list_dbs
    with closing(db.cursor()) as cr:
    File “/opt/odoo/odoo-10.0/odoo/sql_db.py”, line 622, in cursor
    return Cursor(self.__pool, self.dbname, self.dsn, serialized=serialized)
    File “/opt/odoo/odoo-10.0/odoo/sql_db.py”, line 164, in __init__
    self._cnx = pool.borrow(dsn)
    File “/opt/odoo/odoo-10.0/odoo/sql_db.py”, line 505, in _locked

  • Sidhi Tejomoyo
    Reply

    ah… found it… its at : createuser -s ubuntu_user_name
    Suggest to add a notes like : ubuntu_user_name = your server login ID

  • sarath
    Reply

    s o you have to mention the configuration file to run like cd /odoo/odoo-10.0 -c ‘/etc/odoo-server.conf here the odoo-server.conf is your configuration file name which you have given

  • mohand arezki lahlou
    Reply

    Hi,
    Thanks for the tutorial. it works pretty well. very useful.

  • JustAGuy
    Reply

    Great tutorial ! Thanks! Just one remark, at the last step when running odoo-bin, it didnt work running as root, error: root role not found. Had to run as odoo user.

  • Gunjan
    Reply

    Great Tutorial, worked for me.

    Awesome! and Thanks :)

  • Omar
    Reply

    Internal Server Error

    The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there is an error in the application.

    • GetOpenERP
      Reply

      Check the terminal error why its showing Internal Error.

  • ebi
    Reply

    i can’t seem to get odoo started, i get this error when i try
    error: [Errno 98] Address already in use

    • GetOpenERP
      Reply

      run command ‘ps aux|grep odoo’ to check the process id on which odoo server already running then kill it by command ‘kill -9 process id’and then restart the server.

  • nilam patel
    Reply

    I am stuck at step 5 the second command… it shows couldn’t find “vim” command. anybody can help me out of it.

    • GetOpenERP
      Reply

      sudo apt-get install vim

  • Caroline
    Reply

    Hello, thank you for the tutorial, he’s great!
    I’ve just a problem (don’t laugh I’m THE newbie) after running ./odoo-bin, how can I return to the command line? (I tried exit but it isn’t it :D)

    Thanks in advance.

  • magJan
    Reply

    Great tutorial !

    But in STEP 3 I recive two errors:

    – Package ‘python-pybabel’ has no installation candidate
    – Package ‘python-pypdf’ has no installation candidate

    How can I solve this problem?
    Ubuntu 17.04
    Python 2.7.13
    Python3.6 3.6.1

  • Sabeer ali
    Reply

    WoW…….. Thanks..
    Its helps A Lots…..

  • kaluis90
    Reply

    Step 12

    sudo apt-get install -y wkhtmltopdf

  • Christian Pulgar
    Reply

    The tutorial worked like charm. Started as a service using the systemd suggestion of Ian Thompson on ubuntu server 16.04 cloud virtual server… Excellent.

    Saved for future reference.

  • Sidhi
    Reply

    Thanks for it, wish the update the STEP 12 with yours :)

    • GetOpenERP
      Reply

      Thanks for your feedback. We have updated the same.

  • raj
    Reply

    hai i had some problem in step 3
    Note, selecting ‘libpython2.7-stdlib’ instead of ‘python-argparse’
    Package python-pybabel is not available, but is referred to by another package.
    This may mean that the package is missing, has been obsoleted, or
    is only available from another source

    Package python-pypdf is not available, but is referred to by another package.
    This may mean that the package is missing, has been obsoleted, or
    is only available from another source

    E: Package ‘python-pybabel’ has no installation candidate
    E: Package ‘python-pypdf’ has no installation candidate

    • GetOpenERP
      Reply

      sudo apt-get install python-psutil python-pybabel

Leave a Comment

Contact Us

We're not around right now. But you can send us an email and we'll get back to you, asap.

Not readable? Change text. captcha txt
#getodoo10odooexp16