gnue
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Problems with the inventory sample


From: Jason Cater
Subject: Re: Problems with the inventory sample
Date: Fri, 20 Sep 2002 17:06:51 -0500

This could be one of a few things.  Firstly, though, I'm not sure how
well supported the Pygresql driver is.  I'd recommend you grab psycopg. 

Is your postgresql set up to listen on TCP/IP. 

There should be a file on your system called postgresql.conf. On my
Debian system, this is in /etc/postgresql.  It's been a few years since
I've been on RedHat, so I'm not sure where they place it. It should have
an entry that reads: 

  tcpip_socket = 1 


After verifying that, I'd try to log into Postgres via the command
prompt.  Try: 

  psql -h localhost inventory

Notice the addition of "-h localhost". This forces pgsql to use TCP/IP
to communicate (just like GNUe does) instead of a sockets file. If this
works (and you are using the same username/password each time) then it
is probably a GNUe problem.  Otherwise, your setup still needs tweaking
somehow. 

Also take note of the pg_hba.conf file.  It defines permissions based on
the communication method.  Generally, the default setup is to be more
permissive with local sockets-based communications and more strict with
inbound network connections (even if "inbound" is from localhost.)

-- Jason


On Fri, 20 Sep 2002 20:21:49 +0200
Alesandro Bottoni <address@hidden> wrote:

> I'm trying to run the "inventory " sample on my RH7.3 (with wxWindows
> 2.3.2, wxPython 2.3.2, PostgreSQL 7.X and so on...).
> 
> I modified the connection.conf to reflect my local configuration:
> 
> [excerpt from the connections.conf file]
> 
> [inventory]
> comment = GNUe Sample Inventory Database
> aliases = inventory
> provider = postgresql
> host = localhost
> dbname = inventory
> 
> And I changed my inv_maintenance.gfd (and any other) file accordingly:
> 
> [excerpt from inv_maintenance.gfd]
> .......
>   <datasource table="inventory" name="inventory"
>   database="inventory"/><datasource table="unit_description"
>   name="available_units" 
> database="inventory"
>               prequery=""/>
> .......
>   <database provider="postgresql" dbname="inventory" host="localhost" 
> name="inventory"
>             comment=""/>
> 
> My PosgreSQL is configured as follows:
> 
> --------------------------
> 
> inventory=# \d
>                List of relations
>           Name           |   Type   |   Owner
> -------------------------+----------+-----------
>  company                 | table    | developer
>  inventory               | table    | developer
>  seq_company_id          | sequence | developer
>  seq_unit_description_id | sequence | developer
>  unit_description        | table    | developer
> (5 rows)
> 
> ----------------------
> 
> inventory=# \dp
>                      Access privileges for database "inventory"
>           Table          |                     Access privileges
> -------------------------+-------------------------------------------
> ----------------
>  company                 | {=,developer=arwdRxt,"group
>  inventory=arwd"} inventory               |
>  {=,alex=arwdRxt,developer=arwdRxt,"group 
> inventory=arwd"}
>  seq_company_id          |
>  seq_unit_description_id |
>  unit_description        | {=r,developer=arwdRxt,"group
>  inventory=arwd"}
> (5 rows)
> 
> inventory=#
> 
> -----------------------------
> 
> I tried any possible login but I'm still getting this error message:
> 
> -------------------------------
> 
> Error: Unable to log in after 4 attempts.
> 
> Error: could not connect to server: Connection refused.
>         Is the server running on host localhost and accepting
>         TCP/IP connections on port 5432?
> 
> -----------------------------------
> 
> Of course, PostgreSQL IS working and listening...(see the shell output
> 
> included above)
> 
> How can I spot what is not working? Is there any way to see if the
> PyPreSQL driver is working? What else can be? Any suggestion?
> 
> Thanks in advance.
> ----------------------
> Alessandro bottoni
> 
> 
> _______________________________________________
> Gnue mailing list
> address@hidden
> http://mail.gnu.org/mailman/listinfo/gnue




reply via email to

[Prev in Thread] Current Thread [Next in Thread]