Installation guide

219 views
Skip to first unread message

Mark van Deursen

unread,
Dec 16, 2013, 7:51:24 AM12/16/13
to try...@googlegroups.com
Hello everybody,

Can someone point me to up-to-date documentation about installing trytond on ubuntu or debian?
When possible with the right steps to take to create a DB with a user with the right privileges and so on.

Many thanks in advance!

Mark van Deursen

unread,
Dec 16, 2013, 1:27:08 PM12/16/13
to Axel Braun, try...@googlegroups.com
Thanks Axel but I still can't get it working. Maybe you or someone else can help me?

I have the following setup:
- Client : Tryton 3.0.1 OSX
- Server : Ubuntu 13.04 on a virtual machine (Virtualbox setup with vagrant)
- Postgres 9.1

pg_hba.conf:
#
# Database administrative login by Unix domain socket
local   all             postgres                                peer

# TYPE  DATABASE        USER            ADDRESS                 METHOD

# "local" is for Unix domain socket connections only
#local   all             all                                     peer
local   all             all                                     md5
# IPv4 local connections:
#host    all             all             127.0.0.1/32            md5
host    all             all             0.0.0.0/0            md5
# IPv6 local connections:
host    all             all             ::1/128                 md5
# Allow replication connections from localhost, by a user with the
# replication privilege.
#local   replication     postgres                                peer
#host    replication     postgres        127.0.0.1/32            md5
#host    replication     postgres        ::1/128                 md5

...


postgres=# \du
                             List of roles
 Role name |                   Attributes                   | Member of
-----------+------------------------------------------------+-----------
 postgres  | Superuser, Create role, Create DB, Replication | {}
 vagrant   | Create role, Create DB                         | {}


...


This file is part of Tryton.  The COPYRIGHT file at the top level of
#this repository contains the full copyright notices and license terms.
[options]

# Activate the json-rpc protocol
jsonrpc = *:8000
#ssl_jsonrpc = False

# This is the hostname used when generating tryton URI
#hostname_jsonrpc =

# Configure the path of json-rpc data
#jsondata_path = /var/www/localhost/tryton

# Activate the xml-rpc protocol
#xmlrpc = *:8069
#ssl_xmlrpc = False

# Activate the webdav protocol
#webdav = *:8080
#ssl_webdav = False

# This is the hostname used when generating WebDAV URI
#hostname_webdav =

# Configure the database type
# allowed values are postgresql, sqlite, mysql
db_type = postgresql

# Configure the database connection
## Note: Only databases owned by db_user will be displayed in the connection dialog
## of the Tryton client. db_user must have create permission for new databases
## to be able to use automatic database creation with the Tryton client.
db_host = localhost
db_port = 5432
db_user = vagrant
db_password = vagrant
#db_minconn = 1
#db_maxconn = 64

# Configure the postgresql path for the executable
#pg_path = None

#Configure the Tryton server password
admin_passwd = admin

# Configure the path of the files for the pid and the logs
#pidfile = False
#logfile = False

#privatekey = server.pem
#certificate = server.pem

# Configure the SMTP connection
#smtp_server = localhost
#smtp_port = 25
#smtp_ssl = False
#smtp_tls = False
#smtp_password = False
#smtp_user = False
#smtp_default_from_email = False

# Configure the path to store attachments and sqlite database
#data_path = /var/lib/trytond

# Allow to run more than one instance of trytond
#multi_server = False

# Configure the session timeout (inactivity of the client in sec)
#session_timeout = 600

# Enable auto-reload of modules if changed
#auto_reload = True

# Prevent database listing
#prevent_dblist = False

# Enable cron
# cron = True

# unoconv connection
#unoconv = pipe,name=trytond;urp;StarOffice.ComponentContext

# Number of retries on database operational error
# retry = 5

# Default language code
# language = en_US


... 


Server gets started by: 

sudo su vagrant -c "bin/trytond"

When I try to connect to the running server I get "Could not connect to server"  message. Does anyone know where to start to find the problem?






On Mon, Dec 16, 2013 at 1:59 PM, Axel Braun <axel....@gmx.de> wrote:
Am Montag, 16. Dezember 2013, 13:51:24 schrieb Mark van Deursen:
> Hello everybody,
>
> Can someone point me to up-to-date documentation about installing trytond
> on ubuntu or debian?

no :-)
Check with Mathias Behrle, he maintains the debian packages


> When possible with the right steps to take to create a DB with a user with
> the right privileges and so on.


Cédric Krier

unread,
Dec 16, 2013, 1:44:42 PM12/16/13
to try...@googlegroups.com
On 16/12/13 19:27 +0100, Mark van Deursen wrote:
> Thanks Axel but I still can't get it working. Maybe you or someone else can
> help me?
>
> I have the following setup:
> - Client : Tryton 3.0.1 OSX
> - Server : Ubuntu 13.04 on a virtual machine (Virtualbox setup with vagrant)
>
> This file is part of Tryton. The COPYRIGHT file at the top level of
> #this repository contains the full copyright notices and license terms.
> [options]
>
> # Activate the json-rpc protocol
> jsonrpc = *:8000
> #ssl_jsonrpc = False

This makes probably the server listening only on IPv6 and probably that
the connection between the client and the server is not IPv6 aware.
You must use:

jsonrpc = *:8000,0.0.0.0:8000

If you want the server to listen on both versions.


PS: Please don't top-post on this mailing list and follow the netiquette
see http://groups.tryton.org/netiquette
--
Cédric Krier - B2CK SPRL
Email/Jabber: cedric...@b2ck.com
Tel: +32 472 54 46 59
Website: http://www.b2ck.com/

Mark van Deursen

unread,
Dec 16, 2013, 2:10:50 PM12/16/13
to try...@googlegroups.com
On Mon, Dec 16, 2013 at 7:44 PM, Cédric Krier <cedric...@b2ck.com> wrote:
On 16/12/13 19:27 +0100, Mark van Deursen wrote:
> Thanks Axel but I still can't get it working. Maybe you or someone else can
> help me?
>
> I have the following setup:
> - Client : Tryton 3.0.1 OSX
> - Server : Ubuntu 13.04 on a virtual machine (Virtualbox setup with vagrant)
>
> This file is part of Tryton.  The COPYRIGHT file at the top level of
> #this repository contains the full copyright notices and license terms.
> [options]
>
> # Activate the json-rpc protocol
> jsonrpc = *:8000
> #ssl_jsonrpc = False

This makes probably the server listening only on IPv6 and probably that
the connection between the client and the server is not IPv6 aware.
You must use:

    jsonrpc = *:8000,0.0.0.0:8000

Thanks but that doesn't seem to work.
When changing the line to what you wrote I got the following error:
Traceback (most recent call last):
  File "bin/trytond", line 111, in <module>
    trytond.server.TrytonServer(options).run()
  File "/home/vagrant/trytond/trytond/server.py", line 96, in run
    self.start_servers()
  File "/home/vagrant/trytond/trytond/server.py", line 204, in start_servers
    CONFIG['ssl_jsonrpc']))
  File "/home/vagrant/trytond/trytond/protocols/jsonrpc.py", line 372, in __init__
    self.server = server_class((interface, port), handler_class, 0)
  File "/home/vagrant/trytond/trytond/protocols/jsonrpc.py", line 294, in __init__
    bind_and_activate)
  File "/usr/lib/python2.7/SocketServer.py", line 419, in __init__
    self.server_bind()
  File "/home/vagrant/trytond/trytond/protocols/jsonrpc.py", line 336, in server_bind
    SimpleJSONRPCServer.server_bind(self)
  File "/usr/lib/python2.7/SocketServer.py", line 430, in server_bind
    self.socket.bind(self.server_address)
  File "/usr/lib/python2.7/socket.py", line 224, in meth
    return getattr(self._sock,name)(*args)
socket.error: [Errno 98] Address already in use 

I changed it to:
jsonrpc = 0.0.0.0:8000

Now the server starts OK but I get the same error when I want to connect with the client.


If you want the server to listen on both versions.


PS: Please don't top-post on this mailing list and follow the netiquette 
see http://groups.tryton.org/netiquette

Sorry! Will not happen again. 

Cédric Krier

unread,
Dec 16, 2013, 3:22:23 PM12/16/13
to try...@googlegroups.com
This means that the server host is IPv4 only.
So the problem is probably due to connection being blocked somewhere.
You should try first to connect to the server from the same host.

Mark van Deursen

unread,
Dec 16, 2013, 3:32:19 PM12/16/13
to try...@googlegroups.com
OK. Thanks. I'll have to see how I'm going to that. It's the server version of ubuntu so the GUI client isn't option. 

Axel Braun

unread,
Dec 17, 2013, 2:33:44 AM12/17/13
to try...@googlegroups.com
Am Montag, 16. Dezember 2013, 21:32:19 schrieb Mark van Deursen:
> This means that the server host is IPv4 only.
> So the problem is probably due to connection being blocked somewhere.
> You should try first to connect to the server from the same host.
>
> OK. Thanks. I'll have to see how I'm going to that. It's the server version
> of ubuntu so the GUI client isn't option.

Check the network settings of you VM, if it can be accessed from outside
(Bridged vs. NAT network)

HTH
Axel
signature.asc

Mark van Deursen

unread,
Dec 17, 2013, 5:04:40 AM12/17/13
to try...@googlegroups.com
Thanks Axal.
I made a mess of the installation and decided to do it all over.
These are my notes on installing trytond on ubuntu13.04. Maybe in can help someone else. 
BTW: I did not concern about security issues during the installation! It's just for testing purposes!

= Install the following: =
 
 * vim
 * postgresql
 * python-dateutil
 * python-psycopg2
 * python-lxml
 * python-pip
 * sudo pip install relatorio
 * sudo pip install python-sql

 * mercurial

= Getting the sources =


= Creating DB and user and changing some settings on Postgresql=

$ sudo su postgres -c "createuser --createdb --no-adduser -P vagrant"

$ sudo vim /etc/postgresql/9.1/main/pg_hba.conf
And add the follwong line at the bottom of the file:
host    all             all             0.0.0.0/0            md5

$ sudo vim /etc/postgresql/9.1/main/postgresql.conf
And change the following value

listen_addresses = '*'

= Restarting Postgresql =
$ sudo /etc/init.d/postgresql restart

= Config Tryton server =

$ vim trytond/etc/trytond.conf
Change settings (or uncomment) to the following values:

jsonrpc = 0.0.0.0:8000

db_type = postgresql

db_host = localhost
db_port = 5432
db_user = vagrant
db_password = vagrant 

Now I can connect to the server with the OSX client. Well more or less... I'm getting a 'Version not compatible'. But that's OK. I know the reason so I should be able to get around that. (server is version 3.1.0, client is 3.0.1)

Thanks again for the input. 

Mathias Behrle

unread,
Dec 17, 2013, 5:37:25 AM12/17/13
to try...@googlegroups.com
* Mark van Deursen: " Re: [tryton] Installation guide" (Mon, 16 Dec 2013
20:10:50 +0100):
This means another process is already listening on the port (probably an old
stalled trytond process).

Look at the process table with e.g.

ps aux|grep tryton

to see which processes run. Stop all trytonds before restarting the server.

--

Mathias Behrle
MBSolutions
Gilgenmatten 10 A
D-79114 Freiburg

Tel: +49(761)471023
Fax: +49(761)4770816
http://m9s.biz
UStIdNr: DE 142009020
PGP/GnuPG key availabable from any keyserver, ID: 0x8405BBF6
signature.asc

Mathias Behrle

unread,
Dec 17, 2013, 5:42:12 AM12/17/13
to try...@googlegroups.com
* Mark van Deursen: " Re: [tryton] Installation guide" (Tue, 17 Dec 2013
11:04:40 +0100):
This should have been

hg clone http://hg.tryton.org/3.0/trytond
to get a server of the 3.0 series.

> = Creating DB and user and changing some settings on Postgresql=
>
> $ sudo su postgres -c "createuser --createdb --no-adduser -P vagrant"
>
> $ sudo vim /etc/postgresql/9.1/main/pg_hba.conf
> And add the follwong line at the bottom of the file:
> host all all 0.0.0.0/0 md5
>
> $ sudo vim /etc/postgresql/9.1/main/postgresql.conf
> And change the following value
>
> listen_addresses = '*'
>
> = Restarting Postgresql =
> $ sudo /etc/init.d/postgresql restart
>
> = Config Tryton server =
>
> $ vim trytond/etc/trytond.conf
> Change settings (or uncomment) to the following values:
>
> jsonrpc = 0.0.0.0:8000
>
> db_type = postgresql
>
> db_host = localhost
> db_port = 5432
> db_user = vagrant
> db_password = vagrant
>
> Now I can connect to the server with the OSX client. Well more or less...
> I'm getting a 'Version not compatible'. But that's OK. I know the reason so
> I should be able to get around that. (server is version 3.1.0, client is
> 3.0.1)
>
> Thanks again for the input.

Did you read
http://code.google.com/p/tryton/wiki/InstallationOnDebian
http://code.google.com/p/tryton/wiki/InstallationOnUbuntu

If they are unclear, you could help us improve the content.
signature.asc

Mark van Deursen

unread,
Dec 17, 2013, 6:11:42 AM12/17/13
to try...@googlegroups.com
They are clear enough in my opinion. But I didn't wanted to use the package manager.
So I used this one: http://code.google.com/p/tryton/wiki/InstallationMercurial and added some details in my notes like how to create the DB and the settings I needed to change to get it up 'n running. 
Other source of information I used is http://code.google.com/p/tryton/wiki/UserFAQ

Sharoon Thomas

unread,
Dec 17, 2013, 8:48:30 AM12/17/13
to try...@googlegroups.com
On Dec 17, 2013, at 3:34 PM, Mark van Deursen <vloer...@gmail.com> wrote:


= Install the following: =
 
...
 * postgresql
 * python-psycopg2
Above are required only if you want to use tryton with postgres as database.

 * python-dateutil
 * python-lxml
 * python-pip
 * sudo pip install relatorio
 * sudo pip install python-sql

These need not be installed manually. You could just run 
`python setup.py install` after you clone trytond (or any module)
and they would be installed automatically.

Remember that it would not install psycopg2 since its an optional
dependency (if you use postgres as DB).

Thanks & Regards

Sharoon Thomas
signature.asc
Reply all
Reply to author
Forward
0 new messages