IRC logs of #tryton for Monday, 2013-07-15

chat.freenode.net #tryton log beginning Mon Jul 15 00:00:04 CEST 2013
2013-07-15 04:40 -!- plantian(~ian@cpe-98-150-22-229.bak.res.rr.com) has left #tryton
2013-07-15 13:42 -!- testfoo(~m@chello080109051236.3.14.vie.surfer.at) has left #tryton
2013-07-15 15:10 <_UsUrPeR_> ACTION tips his hat
2013-07-15 15:11 <_UsUrPeR_> hey all. I am having problems connecting to my tryton server post-installation with apt-get on Ubuntu
2013-07-15 15:11 <_UsUrPeR_> The error I am seeing is "Could nto connect to the server"
2013-07-15 15:12 <_UsUrPeR_> I see trytond is running on the server, along with postgresql
2013-07-15 15:12 <_UsUrPeR_> unsure about how to proceed
2013-07-15 15:12 <_UsUrPeR_> the installation is "default" right now
2013-07-15 15:14 <_UsUrPeR_> any help would be appreciated
2013-07-15 15:18 <_UsUrPeR_> laurent_pvz: hey. Sorry to target you directly with a question, but I am having some problems with tryton.
2013-07-15 15:18 <_UsUrPeR_> I assume that you are a current user?
2013-07-15 15:18 <laurent_pvz> in fact I'm quite a Tryton noob
2013-07-15 15:21 <_UsUrPeR_> I am probably more noob than you
2013-07-15 15:21 <_UsUrPeR_> I just tried to install it on ubuntu with apt-get and am getting nowhere
2013-07-15 15:22 <_UsUrPeR_> I am seeing the trytond server and postgres are running on my server, but cannot get connected to it via a client
2013-07-15 15:22 <_UsUrPeR_> I have a firewall open for port 8000, and am not sure if I am missing some ports or something else
2013-07-15 15:22 <_UsUrPeR_> but right now, the client is saying that it cannot connect to the server
2013-07-15 15:23 <_UsUrPeR_> I am seeing traffic come to the server via port 8000
2013-07-15 15:23 <_UsUrPeR_> (using tcpdump)
2013-07-15 15:24 <bechamel> _UsUrPeR_: when I do: echo 'test' | nc 127.0.0.1 8000
2013-07-15 15:24 <bechamel> I recive an xml-formated error message
2013-07-15 15:24 <bechamel> *receive
2013-07-15 15:25 <bechamel> if you have the same (with the correct ip instead of 127.0.0.1), then your client tries to connect to the wrong server
2013-07-15 15:25 <_UsUrPeR_> huh. I get "error code 400" when I run that
2013-07-15 15:25 <bechamel> _UsUrPeR_: so it work :)
2013-07-15 15:26 <bechamel> _UsUrPeR_: the server answer you that he does not know 'test'
2013-07-15 15:26 <_UsUrPeR_> How am I doing better than you?!? :)
2013-07-15 15:26 <_UsUrPeR_> what OS are you using?
2013-07-15 15:27 <bechamel> _UsUrPeR_: you have a 400 answer, so it means the server is answering
2013-07-15 15:27 <bechamel> _UsUrPeR_: ArchLinux
2013-07-15 15:28 <_UsUrPeR_> aah. I just used ububtu apt-get package
2013-07-15 15:46 <katr> _UsUrPeR_: Have you read the FAQ entry http://code.google.com/p/tryton/wiki/UserFAQ#I%27m_getting_%22Could_not_connect_to_server%22 ?
2013-07-15 15:48 <_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_user
2013-07-15 15:48 <_UsUrPeR_> I was never asked to instantiate a password for anything during installation
2013-07-15 15:48 <_UsUrPeR_> katr: ^^
2013-07-15 15:51 <_UsUrPeR_> besides port 8000, is there another port which must be opened on the server?
2013-07-15 15:54 <_UsUrPeR_> this appears to be helping: http://www.tryton.org/~irclog/2012-10-19.log.html
2013-07-15 15:54 <_UsUrPeR_> looks like the default apt-get installation of tryton is a little wonky
2013-07-15 15:55 -!- dfr(~damienfra@01012313.cism.ucl.ac.be) has left #tryton
2013-07-15 16:42 <katr> _UsUrPeR_: What version of Tryton are you using?
2013-07-15 16:52 <sisalp> katr:_UsUrPeR_: have you checked you run the same version on client and server ?
2013-07-15 16:53 <katr> _UsUrPeR_: I'm quite sure this is an db authentication problem as described under 5. in the FAQ entry
2013-07-15 16:53 <sisalp> _UsUrPeR_: have you tried to connect to a demo server ?
2013-07-15 16:53 <katr> sisalp, _UsUrPeR_: I don't think so. There is another error message for that kind of error.
2013-07-15 16:55 <katr> _UsUrPeR_: https://bugs.tryton.org/issue2842 this is really a PITA
2013-07-15 16:57 <katr> _UsUrPeR_: And no, there is not other port you have to open AFAIK.
2013-07-15 17:38 <_UsUrPeR_> katr: sorry. grabbed some lunch. I am using tryton-server version 2.2.1-1 installed on ubuntu 12.04 with apt-get
2013-07-15 17:44 <_UsUrPeR_> running netstat -anpl shows port 8000 open
2013-07-15 17:45 <katr> _UsUrPeR_: O.K.
2013-07-15 17:46 <_UsUrPeR_> katr: trying to use tryton on localhost
2013-07-15 17:46 <_UsUrPeR_> command: sudo -u tryton psql -h 127.0.0.1 template1 demo
2013-07-15 17:46 <_UsUrPeR_> result: it's asking for a password that, to my knowledge, was never instantiated
2013-07-15 17:46 <katr> _UsUrPeR_: The trytond.conf of the Ubuntu (=Debian) default package does not configure the db_user.
2013-07-15 17:47 <katr> _UsUrPeR_: So Tryton doesn't provide a user when connecting to the database.
2013-07-15 17:47 <_UsUrPeR_> it does, however, instantiate an admin_passwd
2013-07-15 17:47 <_UsUrPeR_> which also does not appear to be working
2013-07-15 17:48 <katr> _UsUrPeR_: What do you mean by " instantiate an admin_passwd"?
2013-07-15 17:49 <_UsUrPeR_> in /etc/trytond.conf, line --> admin_passwd = admin
2013-07-15 17:50 <_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" )
2013-07-15 17:51 <_UsUrPeR_> according to the log, which I am tailing, tryton appears to be waiting for a connection
2013-07-15 17:51 <katr> _UsUrPeR_: "admin_passwd" -> That's the admin password of Tryton not the database password to use for the connection to postgresql
2013-07-15 17:51 <_UsUrPeR_> katr: oh. never mind then. :|
2013-07-15 17:52 <_UsUrPeR_> so what is the default password for this package? Should I use psql to just make the changes manually?
2013-07-15 17:52 <_UsUrPeR_> err, to put in a new password
2013-07-15 17:52 <katr> _UsUrPeR_: You have to mind, because I suppose this is the source of your problem :).
2013-07-15 17:52 <_UsUrPeR_> I'm minding! I'm minding! :)
2013-07-15 17:55 <_UsUrPeR_> ok, so default passwords then.
2013-07-15 17:55 <katr> _UsUrPeR_: You have to configure postgresql such that it allows Tryton to access the database you have created.
2013-07-15 17:56 <_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 process
2013-07-15 17:57 <_UsUrPeR_> so it doesn't have a tryton user/pass in postgres yet
2013-07-15 17:57 <_UsUrPeR_> got it
2013-07-15 17:57 <_UsUrPeR_> lemme check that
2013-07-15 17:57 <katr> katr: Exactly, you got it. :)
2013-07-15 17:59 <_UsUrPeR_> katr: a little confused about the trytond.conf file
2013-07-15 18:00 <_UsUrPeR_> in there, it has things listed with "false" options when it appears that it needs a string in there
2013-07-15 18:00 <_UsUrPeR_> I.e. db_host = false, db_port = false
2013-07-15 18:00 <_UsUrPeR_> I'm guessing those aren't actually true/false strings?
2013-07-15 18:02 <_UsUrPeR_> ok, now that I have changed the tryton password to something, this command connects to the postgresql server: sudo -u tryton psql -h 127.0.0.1 template1 tryton
2013-07-15 18:02 <_UsUrPeR_> that's a good step in the correct direction
2013-07-15 18:03 <_UsUrPeR_> now another question, running netstat -anpl shows the following: tcp 0 0 127.0.0.1:8000 0.0.0.0:* LISTEN 15196/python
2013-07-15 18:03 <_UsUrPeR_> I'm guessing the local address should be my server's external IP, not the localhost
2013-07-15 18:04 <_UsUrPeR_> where can I tell tryton to open a second listening port on my external IP (it's a Class-C 192.168.1.xxx IP)
2013-07-15 18:04 <katr> _UsUrPeR_: There are multiple authentication methods for PostgreSQL
2013-07-15 18:06 <katr> _UsUrPeR_: You can set "jsonrpc = 0.0.0.0:8000" to listen to all interfaces.
2013-07-15 18:06 <_UsUrPeR_> yeah, got it
2013-07-15 18:06 <_UsUrPeR_> awesome
2013-07-15 18:06 <_UsUrPeR_> that was it.
2013-07-15 18:06 <_UsUrPeR_> wasn't listening on external IP
2013-07-15 18:07 <_UsUrPeR_> katr: gentleman, scholar: you are both of these things combined in a corporeal being.
2013-07-15 18:08 <katr> katr: Regarding PostgreSQL, that's what I did:
2013-07-15 18:08 <katr> _UsUrPeR_: Put something like "host all tryton 10.8.2.1/24 md5" in your pg_hba.conf
2013-07-15 18:09 <katr> _UsUrPeR_: Create a user database user and set its password.
2013-07-15 18:10 <katr> _UsUrPeR_: Configure the user and password you have just created in trytond.conf.
2013-07-15 18:10 <_UsUrPeR_> katr: interesting. I have a button to create a database for tryton, but cannot.
2013-07-15 18:10 <_UsUrPeR_> clicking it has no effect
2013-07-15 18:12 <katr> _UsUrPeR_: Yes, I suppose this once again has to do with your PostgreSQL configuration. You can turn on verbose logging in PostgreSQL.
2013-07-15 18:14 <katr> _UsUrPeR_: The user must be able to create databases, see http://www.postgresql.org/docs/9.1/static/sql-alteruser.html
2013-07-15 18:15 <_UsUrPeR_> in psql, \du shows as follows:
2013-07-15 18:15 <_UsUrPeR_> tryton | Create role, Create DB | {}
2013-07-15 18:15 <_UsUrPeR_> looks like it has that ability already
2013-07-15 18:16 <_UsUrPeR_> unsure if the user has to be a member
2013-07-15 18:16 <_UsUrPeR_> but that shouldn't be required if I am attempting to create a new DB
2013-07-15 18:24 <katr> _UsUrPeR_: Does the db you are trying to connect to already exist?
2013-07-15 18:24 <_UsUrPeR_> no. I have not specified a db name to connect with
2013-07-15 18:25 <_UsUrPeR_> there are two DBs that exist, but they appear to have been defaults. template0 and template1, as well as postgres
2013-07-15 18:26 <katr> _UsUrPeR_: Have you configured the db_user and db_password in trytond.conf?
2013-07-15 18:26 <_UsUrPeR_> yes. db_user = tryton, db_password = [obscured]
2013-07-15 18:27 <katr> _UsUrPeR_: Do you have something like "host all tryton 10.8.2.1/24 md5" in your pg_hba.conf?
2013-07-15 18:29 <_UsUrPeR_> in /etc/postgresql/9.1/main/pg_hba.conf - I added the following and restarted postgresql after you mentioned that the first time
2013-07-15 18:29 <_UsUrPeR_> host all tryton 10.18.80.1/24 md5
2013-07-15 18:29 <katr> _UsUrPeR_: And Tryton is running on 10.18.80.1?
2013-07-15 18:30 <_UsUrPeR_> no, that's where the clients are coming from - on the 10.18.80.1 subnet
2013-07-15 18:32 <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.
2013-07-15 18:32 <_UsUrPeR_> guh. oh, my bad.
2013-07-15 18:36 <_UsUrPeR_> added the following to the server: http://pastebin.com/LhUcY28x
2013-07-15 18:36 <_UsUrPeR_> katr: ^^ added that, restarted psql server
2013-07-15 18:36 <_UsUrPeR_> still nothing
2013-07-15 18:36 <_UsUrPeR_> and 192.168.81.1/24 should refer to .1-255
2013-07-15 18:37 <_UsUrPeR_> ...if I recall that is...
2013-07-15 18:38 <katr> _UsUrPeR_: Yes, i refers to .1-255
2013-07-15 18:41 <katr> _UsUrPeR_: Could you connect with "sudo -u tryton psql -h db_host template1 tryton"?
2013-07-15 18:41 <_UsUrPeR_> katr: yes. I can connect with that
2013-07-15 18:42 <_UsUrPeR_> from the localhost
2013-07-15 18:43 <katr> _UsUrPeR_: And with psql -h db_host template1 tryton
2013-07-15 18:43 <katr> _UsUrPeR_: ?
2013-07-15 18:44 <_UsUrPeR_> katr: results - http://pastebin.com/ASJQT4FD
2013-07-15 18:47 <katr> _UsUrPeR_: Is Tryton and the db running on the same machine?
2013-07-15 18:48 <_UsUrPeR_> katr: yes. on the same machine
2013-07-15 18:50 <katr> _UsUrPeR_: Try to set "db_host = 127.0.0.1" in your trytond.conf.
2013-07-15 18:51 <_UsUrPeR_> it's already set to 127.0.0.1
2013-07-15 18:52 <_UsUrPeR_> here's that section: http://pastebin.com/u8qb9TUw
2013-07-15 18:53 <_UsUrPeR_> shoot, here's my whole conf: http://pastebin.com/SW9pVJhF
2013-07-15 18:53 <katr> _UsUrPeR_: And you're sure you have set the correct password in your trytond.conf?
2013-07-15 18:53 <_UsUrPeR_> that password is for the psql tryton user, correct?
2013-07-15 18:54 <_UsUrPeR_> if so, yes. It's not stored in md5
2013-07-15 18:54 <_UsUrPeR_> but yes
2013-07-15 18:54 <_UsUrPeR_> it's cleartext
2013-07-15 18:54 <_UsUrPeR_> actually, does that matter?
2013-07-15 18:55 <_UsUrPeR_> postgres is only listening on 127.0.0.1:5432 -- does THAT matter?
2013-07-15 18:55 <katr> _UsUrPeR_: 127.0.0.1 should be O.K.
2013-07-15 18:57 <katr> _UsUrPeR_: Try adding "host all tryton 127.0.0.1 md5" to your pg_hba.conf.
2013-07-15 18:58 <_UsUrPeR_> taht's added by default already: host all all 127.0.0.1/32 md5
2013-07-15 18:59 <_UsUrPeR_> though again, if it's labeled as md5, shouldn't I encode the pass in /etc/trytond.conf as md5?
2013-07-15 19:03 <_UsUrPeR_> nope, that's not it
2013-07-15 19:03 <_UsUrPeR_> used md5sum to create
2013-07-15 19:03 <_UsUrPeR_> did not work correctly :)
2013-07-15 19:04 <_UsUrPeR_> reset back to non-md5
2013-07-15 19:14 <_UsUrPeR_> katr: no other ideas?
2013-07-15 19:14 <_UsUrPeR_> that's coo
2013-07-15 19:27 <katr> _UsUrPeR_: Sorry, back again. Does it work?
2013-07-15 19:27 <_UsUrPeR_> negative
2013-07-15 19:28 <_UsUrPeR_> katr: still cannot create a database with the tryton client
2013-07-15 19:28 <_UsUrPeR_> a caveat: I am attempting to create this database from another subnet
2013-07-15 19:28 <katr> _UsUrPeR_: My last idea is to set the password again with "ALTER USER ..."
2013-07-15 19:28 <_UsUrPeR_> however, everything seems to be working
2013-07-15 19:29 <_UsUrPeR_> katr: ok, so set the tryton db user password?
2013-07-15 19:29 <_UsUrPeR_> I.e. reset the tryton password?
2013-07-15 19:29 <katr> _UsUrPeR_: Yes
2013-07-15 19:31 <_UsUrPeR_> postgres=# ALTER USER tryton WITH ENCRYPTED PASSWORD '[OBSCURED]';
2013-07-15 19:31 <_UsUrPeR_> ALTER ROLE
2013-07-15 19:31 <_UsUrPeR_> restarting postgresql now
2013-07-15 19:31 <_UsUrPeR_> nothing :(
2013-07-15 19:31 <_UsUrPeR_> clicking create does nothing
2013-07-15 19:32 <_UsUrPeR_> is port 8000 the correct port to be connecting to, or does it need to be connecting to 5432, the psql port?
2013-07-15 19:32 <_UsUrPeR_> katr: ^^
2013-07-15 19:33 <katr> _UsUrPeR_: [Tryton Client] <-> [server_host:8000 Tryton Server] <-> [db_host:5432 PostgreSQL]
2013-07-15 19:34 <katr> _UsUrPeR_: So the client never connects to the database server.
2013-07-15 19:34 <_UsUrPeR_> k, that makes sense
2013-07-15 19:36 <_UsUrPeR_> ok, so netstat -anpl shows as follows: http://pastebin.com/eKN9L1Lf
2013-07-15 19:37 <_UsUrPeR_> ps aux |grep tryton - http://pastebin.com/XRNpwhGK
2013-07-15 19:37 <_UsUrPeR_> ps aux |grep postgres - http://pastebin.com/SgBYFfQu
2013-07-15 19:37 <_UsUrPeR_> all that lokos ok
2013-07-15 19:37 <_UsUrPeR_> err hold on
2013-07-15 19:38 <_UsUrPeR_> checking in here: /etc/postgresql/9.1/main/postgresql.conf
2013-07-15 19:39 <katr> _UsUrPeR_: Try telnet 127.0.0.1 8000
2013-07-15 19:40 <_UsUrPeR_> results: http://pastebin.com/gTFdAPeU
2013-07-15 19:41 <_UsUrPeR_> though I am seeing that ssl is set to "true" in postgresql.conf and "false" for json_ssl in trytond.conf
2013-07-15 19:41 <katr> _UsUrPeR_: So Tryton is running and accepting connections.
2013-07-15 19:41 <katr> _UsUrPeR_: This is strange. I'm really running out of ideas.
2013-07-15 19:42 <_UsUrPeR_> It does seem like it should be working
2013-07-15 19:42 <_UsUrPeR_> is there some sort of verbose tryton client output I could view?
2013-07-15 19:42 <katr> _UsUrPeR_: You can try to start PostgreSQL with verbose logging turned on.
2013-07-15 19:43 <_UsUrPeR_> I'd seen that mentioned someplace else, but never nailed down where to do that at
2013-07-15 19:43 <katr> _UsUrPeR_: Yes "--verbose"
2013-07-15 19:44 <katr> _UsUrPeR_: /etc/postgresql # fgrep -Ri verbose *
2013-07-15 19:44 <katr> _UsUrPeR_: 9.1/main/postgresql.conf:#log_error_verbosity = default# terse, default, or verbose messages
2013-07-15 19:45 <_UsUrPeR_> katr: yeah, I found it in postgresql.cond
2013-07-15 19:45 <_UsUrPeR_> err conf
2013-07-15 19:45 <_UsUrPeR_> changed it
2013-07-15 19:45 <_UsUrPeR_> hmm
2013-07-15 19:45 <_UsUrPeR_> wait
2013-07-15 19:46 <_UsUrPeR_> here's the results when starting: http://pastebin.com/y466RVZS
2013-07-15 19:46 <_UsUrPeR_> "incomplete startup packet"
2013-07-15 19:46 <_UsUrPeR_> is that normal?
2013-07-15 19:46 <_UsUrPeR_> further, I never see anything make any changes to the log file, even when attempting to log on using the client
2013-07-15 19:47 <_UsUrPeR_> it's like I am not actually accessing postgres at all
2013-07-15 19:47 <katr> _UsUrPeR_: I'm not sure, you should consult the PostgreSQL manual.
2013-07-15 19:48 <_UsUrPeR_> woah
2013-07-15 19:48 <_UsUrPeR_> wait
2013-07-15 19:48 <_UsUrPeR_> when I try to use the profile editor
2013-07-15 19:48 <_UsUrPeR_> I'm tailing /var/log/tryton/tryton.log
2013-07-15 19:48 <_UsUrPeR_> [Mon Jul 15 08:48:49 2013] INFO:database:connect to "template1
2013-07-15 19:48 <_UsUrPeR_> Where is it getting "template1" from?
2013-07-15 19:48 <_UsUrPeR_> I never put that in any of the conf files...
2013-07-15 19:50 <katr> _UsUrPeR_: Have a look at postgresql/database.py
2013-07-15 19:51 <_UsUrPeR_> doing a grep template1 * in /etc results in something interesting
2013-07-15 19:51 <_UsUrPeR_> it looks like it's included in the tryton package: http://pastebin.com/9JA0ejZX
2013-07-15 19:54 <katr> _UsUrPeR_: I'm not sure, but I don't think that's the root of your problem.
2013-07-15 19:55 <katr> _UsUrPeR_: I really have to go now.
2013-07-15 19:55 <_UsUrPeR_> ok, well thanks for all your time
2013-07-15 19:56 <katr> _UsUrPeR_: One more advice: You can put some print statements in postgresql/database.py for debugging.
2013-07-15 19:56 <katr> _UsUrPeR_: You're welcome.
2013-07-15 19:56 <katr> _UsUrPeR_: Good luck.
2013-07-15 19:56 <_UsUrPeR_> again, I appreciate it
2013-07-15 19:57 -!- katr(~m@chello080109051236.3.14.vie.surfer.at) has left #tryton

Generated by irclog2html.py 2.17.3 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!