El miércoles, 16 de abril de 2014 03:28:35 UTC+2, [email protected] 
escribió:
>
>  I tried to create a database and user login via File>Database>New Database
>  It created the database but I am unable to login Connection Error! Bad 
> username or password
>  So what do I need to do to correct this.
>  Do I createuser in postgres or is it a connection problem
>


I think that databases are created from the tryton client, in the 
postgresql side you only have to create a user who has permission to create 
new databases, and put those credentials in trytond.conf:

 

>  
>  apt-cache policy tryton-server
> tryton-server:
>   Installed: 3.0.3-1
>   Candidate: 3.0.3-1
>
>  
> tail -f /var/log/tryton/trytond.log
>
> INFO:server:using /etc/trytond.conf as configuration file
> [Tue Apr 15 19:47:41 2014] INFO:server:initialising distributed objects 
> services
> [Tue Apr 15 19:47:41 2014] INFO:server:starting JSON-RPC protocol on 
> localhost:8000
> [Tue Apr 15 19:48:55 2014] INFO:database:connect to "cheryl"
> [Tue Apr 15 19:48:55 2014] INFO:database:connect to "template1"
> [Tue Apr 15 19:48:57 2014] INFO:database:connect to "cheryl"
> <snip>
> [Tue Apr 15 19:49:24 2014] INFO:database:CREATE DB: cheryl
> [Tue Apr 15 19:49:58 2014] INFO:dispatcher:bad login or password 'cheryl' 
> from 127.0.0.1:41964 using JSON-RPC on database 'cheryl'
>
> [Tue Apr 15 20:02:57 2014] INFO:server:using /etc/trytond.conf as 
> configuration file
> [Tue Apr 15 20:02:57 2014] INFO:server:initialising distributed objects 
> services
> [Tue Apr 15 20:02:57 2014] INFO:server:starting JSON-RPC protocol on 
> localhost:8000
> [Tue Apr 15 20:03:37 2014] INFO:database:connect to "cheryl"
>
> tail -f /var/log/postgresql/postgresql-9.3-main.log
> LOG:  incomplete startup packet
> 2014-04-15 21:02:57 EDT LOG:  could not receive data from client: 
> Connection reset by peer
> 2014-04-15 21:03:37 EDT LOG:  could not receive data from client: 
> Connection reset by peer
>
> /etc/trytond.conf
> # Activate the json-rpc protocol
> jsonrpc = localhost: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 = tryton
> #db_password = tryton
>


I think that you should uncomment these last  two lines, and put the 
username and password of the user you created in postgresql.

 

> db_minconn = 1
> db_maxconn = 64
>
> # Configure the postgresql path for the executable
> #pg_path = None
>
> # Configure the Tryton server password
> admin_passwd = tryton
>
> /etc/postgresql/9.3/main/postgresql.conf 
> - Connection Settings -
>
> listen_addresses = 'localhost'          # what IP address(es) to listen on;
>                                         # comma-separated list of 
> addresses;
>                                         # defaults to 'localhost'; use '*' 
> for all
>                                         # (change requires restart)
> port = 5432                             # (change requires restart)
> max_connections = 100                   # (change requires restart)
> # Note:  Increasing max_connections costs ~400 bytes of shared memory per
> # connection slot, plus lock space (see max_locks_per_transaction).
> #superuser_reserved_connections = 3     # (change requires restart)
> unix_socket_directories = '/var/run/postgresql' # comma-separated list of 
> directories
>
>
> /etc/postgresql/9.3/main/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
> # IPv4 local connections:
> host    all             all             127.0.0.1/32            md5
>
> su - postgres
> createuser --createdb --no-createrole --no-superuser --pwprompt tryton
> createdb --encoding=UNICODE --owner=tryton tryton
>


Since as far as I know databases are created from the tryton client, you do 
no need the last line that creates a database in postress.

Reply via email to