IRC logs of #tryton for Monday, 2013-07-15 #tryton log beginning Mon Jul 15 00:00:04 CEST 2013
-!- plantian( has left #tryton04:40
-!- testfoo( has left #tryton13:42
_UsUrPeR_ACTION tips his hat15:10
_UsUrPeR_hey all. I am having problems connecting to my tryton server post-installation with apt-get on Ubuntu15:11
_UsUrPeR_The error I am seeing is "Could nto connect to the server"15:11
_UsUrPeR_I see trytond is running on the server, along with postgresql15:12
_UsUrPeR_unsure about how to proceed15:12
_UsUrPeR_the installation is "default" right now15:12
_UsUrPeR_any help would be appreciated15:14
_UsUrPeR_laurent_pvz: hey. Sorry to target you directly with a question, but I am having some problems with tryton.15:18
_UsUrPeR_I assume that you are a current user?15:18
laurent_pvzin fact I'm quite a Tryton noob15:18
_UsUrPeR_I am probably more noob than you15:21
_UsUrPeR_I just tried to install it on ubuntu with apt-get and am getting nowhere15:21
_UsUrPeR_I am seeing the trytond server and postgres are running on my server, but cannot get connected to it via a client15:22
_UsUrPeR_I have a firewall open for port 8000, and am not sure if I am missing some ports or something else15:22
_UsUrPeR_but right now, the client is saying that it cannot connect to the server15:22
_UsUrPeR_I am seeing traffic come to the server via port 800015:23
_UsUrPeR_(using tcpdump)15:23
bechamel_UsUrPeR_: when I do: echo 'test' | nc 800015:24
bechamelI recive an xml-formated error message15:24
bechamelif you have the same (with the correct ip instead of, then your client tries to connect to the wrong server15:25
_UsUrPeR_huh. I get "error code 400" when I run that15:25
bechamel_UsUrPeR_: so it work :)15:25
bechamel_UsUrPeR_: the server answer you that he does not know 'test'15:26
_UsUrPeR_How am I doing better than you?!? :)15:26
_UsUrPeR_what OS are you using?15:26
bechamel_UsUrPeR_: you have a 400 answer, so it means the server is answering15:27
bechamel_UsUrPeR_: ArchLinux15:27
_UsUrPeR_aah. I just used ububtu apt-get package15:28
katr_UsUrPeR_: Have you read the FAQ entry ?15:46
_UsUrPeR_I did try that, actually. This command seems to work locally, except I am unsure what the "db_user" password is supposed to be by default in the ubuntu apt-get installation. sudo -u system_user psql -h db_host template1 db_user15:48
_UsUrPeR_I was never asked to instantiate a password for anything during installation15:48
_UsUrPeR_katr: ^^15:48
_UsUrPeR_besides port 8000, is there another port which must be opened on the server?15:51
_UsUrPeR_this appears to be helping:
_UsUrPeR_looks like the default apt-get installation of tryton is a little wonky15:54
-!- dfr( has left #tryton15:55
katr_UsUrPeR_: What version of Tryton are you using?16:42
sisalpkatr:_UsUrPeR_: have you checked you run the same version on client and server ?16:52
katr_UsUrPeR_: I'm quite sure this is an db authentication problem as described under 5. in the FAQ entry16:53
sisalp_UsUrPeR_: have you tried to connect to a demo server ?16:53
katrsisalp, _UsUrPeR_: I don't think so. There is another error message for that kind of error.16:53
katr_UsUrPeR_: this is really a PITA16:55
katr_UsUrPeR_: And no, there is not other port you have to open AFAIK.16:57
_UsUrPeR_katr: sorry. grabbed some lunch. I am using tryton-server version 2.2.1-1 installed on ubuntu 12.04 with apt-get17:38
_UsUrPeR_running netstat -anpl shows port 8000 open17:44
katr_UsUrPeR_: O.K.17:45
_UsUrPeR_katr: trying to use tryton on localhost17:46
_UsUrPeR_command: sudo -u tryton psql -h template1 demo17:46
_UsUrPeR_result: it's asking for a password that, to my knowledge, was never instantiated17:46
katr_UsUrPeR_: The trytond.conf of the Ubuntu (=Debian) default package does not configure the db_user.17:46
katr_UsUrPeR_: So Tryton doesn't provide a user when connecting to the database.17:47
_UsUrPeR_it does, however, instantiate an admin_passwd17:47
_UsUrPeR_which also does not appear to be working17:47
katr_UsUrPeR_: What do you mean by " instantiate an admin_passwd"?17:48
_UsUrPeR_in /etc/trytond.conf, line --> admin_passwd = admin17:49
_UsUrPeR_it does appear to be using the config file (ps uax |grep tryton - results - "/usr/bin/python /usr/bin/trytond --config=/etc/trytond.conf --logfile=/var/log/tryton/trytond.log" )17:50
_UsUrPeR_according to the log, which I am tailing, tryton appears to be waiting for a connection17:51
katr_UsUrPeR_: "admin_passwd" -> That's the admin password of Tryton not the database password to use for the connection to postgresql17:51
_UsUrPeR_katr: oh. never mind then. :|17:51
_UsUrPeR_so what is the default password for this package? Should I use psql to just make the changes manually?17:52
_UsUrPeR_err, to put in a new password17:52
katr_UsUrPeR_: You have to mind, because I suppose this is the source of your problem :).17:52
_UsUrPeR_I'm minding! I'm minding! :)17:52
_UsUrPeR_ok, so default passwords then.17:55
katr_UsUrPeR_: You have to configure postgresql such that it allows Tryton to access the database you have created.17:55
_UsUrPeR_ok, so postgres seems to be open to the possibility that it could be connected to by something. Still, postgres was configured by the apt-get installation process17:56
_UsUrPeR_so it doesn't have a tryton user/pass in postgres yet17:57
_UsUrPeR_got it17:57
_UsUrPeR_lemme check that17:57
katrkatr: Exactly, you got it. :)17:57
_UsUrPeR_katr: a little confused about the trytond.conf file17:59
_UsUrPeR_in there, it has things listed with "false" options when it appears that it needs a string in there18:00
_UsUrPeR_I.e. db_host = false, db_port = false18:00
_UsUrPeR_I'm guessing those aren't actually true/false strings?18:00
_UsUrPeR_ok, now that I have changed the tryton password to something, this command connects to the postgresql server: sudo -u tryton psql -h template1 tryton18:02
_UsUrPeR_that's a good step in the correct direction18:02
_UsUrPeR_now another question, running netstat -anpl shows the following: tcp        0      0*               LISTEN      15196/python18:03
_UsUrPeR_I'm guessing the local address should be my server's external IP, not the localhost18:03
_UsUrPeR_where can I tell tryton to open a second listening port on my external IP (it's a Class-C IP)18:04
katr_UsUrPeR_: There are multiple authentication methods for PostgreSQL18:04
katr_UsUrPeR_: You can set "jsonrpc =" to listen to all interfaces.18:06
_UsUrPeR_yeah, got it18:06
_UsUrPeR_that was it.18:06
_UsUrPeR_wasn't listening on external IP18:06
_UsUrPeR_katr: gentleman, scholar: you are both of these things combined in a corporeal being.18:07
katrkatr: Regarding PostgreSQL, that's what I did:18:08
katr_UsUrPeR_: Put something like "host    all         tryton           md5" in your pg_hba.conf18:08
katr_UsUrPeR_: Create a user database user and set its password.18:09
katr_UsUrPeR_: Configure the user and password you have just created in trytond.conf.18:10
_UsUrPeR_katr: interesting. I have a button to create a database for tryton, but cannot.18:10
_UsUrPeR_clicking it has no effect18:10
katr_UsUrPeR_: Yes, I suppose this once again has to do with your PostgreSQL configuration. You can turn on verbose logging in PostgreSQL.18:12
katr_UsUrPeR_: The user must be able to create databases, see
_UsUrPeR_in psql, \du shows as follows:18:15
_UsUrPeR_tryton    | Create role, Create DB                         | {}18:15
_UsUrPeR_looks like it has that ability already18:15
_UsUrPeR_unsure if the user has to be a member18:16
_UsUrPeR_but that shouldn't be required if I am attempting to create a new DB18:16
katr_UsUrPeR_: Does the db you are trying to connect to already exist?18:24
_UsUrPeR_no. I have not specified a db name to connect with18:24
_UsUrPeR_there are two DBs that exist, but they appear to have been defaults. template0 and template1, as well as postgres18:25
katr_UsUrPeR_: Have you configured the db_user and db_password in trytond.conf?18:26
_UsUrPeR_yes. db_user = tryton, db_password = [obscured]18:26
katr_UsUrPeR_: Do you have something like "host    all         tryton           md5" in your pg_hba.conf?18:27
_UsUrPeR_in /etc/postgresql/9.1/main/pg_hba.conf - I added the following and restarted postgresql after you mentioned that the first time18:29
_UsUrPeR_ host    all     tryton                   md518:29
katr_UsUrPeR_: And Tryton is running on
_UsUrPeR_no, that's where the clients are coming from - on the subnet18:30
katr_UsUrPeR_: Your clients don't directly connect to the database, but the Tryton server does. So you have to set the host where Tryton is running.18:32
_UsUrPeR_guh. oh, my bad.18:32
_UsUrPeR_added the following to the server:
_UsUrPeR_katr: ^^ added that, restarted psql server18:36
_UsUrPeR_still nothing18:36
_UsUrPeR_and should refer to .1-25518:36
_UsUrPeR_...if I recall that is...18:37
katr_UsUrPeR_: Yes, i refers to .1-25518:38
katr_UsUrPeR_: Could you connect with "sudo -u tryton psql -h db_host template1 tryton"?18:41
_UsUrPeR_katr: yes. I can connect with that18:41
_UsUrPeR_from the localhost18:42
katr_UsUrPeR_: And with psql -h db_host template1 tryton18:43
katr_UsUrPeR_: ?18:43
_UsUrPeR_katr: results -
katr_UsUrPeR_: Is Tryton and the db running on the same machine?18:47
_UsUrPeR_katr: yes. on the same machine18:48
katr_UsUrPeR_: Try to set "db_host =" in your trytond.conf.18:50
_UsUrPeR_it's already set to
_UsUrPeR_here's that section:
_UsUrPeR_shoot, here's my whole conf:
katr_UsUrPeR_: And you're sure you have set the correct password in your trytond.conf?18:53
_UsUrPeR_that password is for the psql tryton user, correct?18:53
_UsUrPeR_if so, yes. It's not stored in md518:54
_UsUrPeR_but yes18:54
_UsUrPeR_it's cleartext18:54
_UsUrPeR_actually, does that matter?18:54
_UsUrPeR_postgres is only listening on -- does THAT matter?18:55
katr_UsUrPeR_: should be O.K.18:55
katr_UsUrPeR_: Try adding "host    all     tryton                   md5" to your pg_hba.conf.18:57
_UsUrPeR_taht's added by default already: host    all             all               md518:58
_UsUrPeR_though again, if it's labeled as md5, shouldn't I encode the pass in /etc/trytond.conf as md5?18:59
_UsUrPeR_nope, that's not it19:03
_UsUrPeR_used md5sum to create19:03
_UsUrPeR_did not work correctly :)19:03
_UsUrPeR_reset back to non-md519:04
_UsUrPeR_katr: no other ideas?19:14
_UsUrPeR_that's coo19:14
katr_UsUrPeR_: Sorry, back again. Does it work?19:27
_UsUrPeR_katr: still cannot create a database with the tryton client19:28
_UsUrPeR_a caveat: I am attempting to create this database from another subnet19:28
katr_UsUrPeR_: My last idea is to set the password again with "ALTER USER ..."19:28
_UsUrPeR_however, everything seems to be working19:28
_UsUrPeR_katr: ok, so set the tryton db user password?19:29
_UsUrPeR_I.e. reset the tryton password?19:29
katr_UsUrPeR_: Yes19:29
_UsUrPeR_restarting postgresql now19:31
_UsUrPeR_nothing :(19:31
_UsUrPeR_clicking create does nothing19:31
_UsUrPeR_is port 8000 the correct port to be connecting to, or does it need to be connecting to 5432, the psql port?19:32
_UsUrPeR_katr: ^^19:32
katr_UsUrPeR_: [Tryton Client] <-> [server_host:8000 Tryton Server] <-> [db_host:5432 PostgreSQL]19:33
katr_UsUrPeR_: So the client never connects to the database server.19:34
_UsUrPeR_k, that makes sense19:34
_UsUrPeR_ok, so netstat -anpl shows as follows:
_UsUrPeR_ps aux |grep tryton -
_UsUrPeR_ps aux |grep postgres -
_UsUrPeR_all that lokos ok19:37
_UsUrPeR_err hold on19:37
_UsUrPeR_checking in here: /etc/postgresql/9.1/main/postgresql.conf19:38
katr_UsUrPeR_: Try telnet 800019:39
_UsUrPeR_though I am seeing that ssl is set to "true" in postgresql.conf and "false" for json_ssl in trytond.conf19:41
katr_UsUrPeR_: So Tryton is running and accepting connections.19:41
katr_UsUrPeR_: This is strange. I'm really running out of ideas.19:41
_UsUrPeR_It does seem like it should be working19:42
_UsUrPeR_is there some sort of verbose tryton client output I could view?19:42
katr_UsUrPeR_: You can try to start PostgreSQL with verbose logging turned on.19:42
_UsUrPeR_I'd seen that mentioned someplace else, but never nailed down where to do that at19:43
katr_UsUrPeR_: Yes "--verbose"19:43
katr_UsUrPeR_: /etc/postgresql # fgrep -Ri verbose *19:44
katr_UsUrPeR_: 9.1/main/postgresql.conf:#log_error_verbosity = default# terse, default, or verbose messages19:44
_UsUrPeR_katr: yeah, I found it in postgresql.cond19:45
_UsUrPeR_err conf19:45
_UsUrPeR_changed it19:45
_UsUrPeR_here's the results when starting:
_UsUrPeR_"incomplete startup packet"19:46
_UsUrPeR_is that normal?19:46
_UsUrPeR_further, I never see anything make any changes to the log file, even when attempting to log on using the client19:46
_UsUrPeR_it's like I am not actually accessing postgres at all19:47
katr_UsUrPeR_: I'm not sure, you should consult the PostgreSQL manual.19:47
_UsUrPeR_when I try to use the profile editor19:48
_UsUrPeR_I'm tailing /var/log/tryton/tryton.log19:48
_UsUrPeR_[Mon Jul 15 08:48:49 2013] INFO:database:connect to "template119:48
_UsUrPeR_Where is it getting "template1" from?19:48
_UsUrPeR_I never put that in any of the conf files...19:48
katr_UsUrPeR_: Have a look at postgresql/database.py19:50
_UsUrPeR_doing a grep template1 * in /etc results in something interesting19:51
_UsUrPeR_it looks like it's included in the tryton package:
katr_UsUrPeR_: I'm not sure, but I don't think that's the root of your problem.19:54
katr_UsUrPeR_: I really have to go now.19:55
_UsUrPeR_ok, well thanks for all your time19:55
katr_UsUrPeR_: One more advice: You can put some print statements in postgresql/ for debugging.19:56
katr_UsUrPeR_: You're welcome.19:56
katr_UsUrPeR_: Good luck.19:56
_UsUrPeR_again, I appreciate it19:56
-!- katr( has left #tryton19:57

Generated by 2.11.0 by Marius Gedminas - find it at!