[GENERAL] Error: absolute path not allowed

2013-01-08 Thread Wolf Schwurack
I am getting a repeating error and not sure what why.

2013-01-08 06:12:08 MSTERROR:  absolute path not allowed
2013-01-08 06:12:08 MSTSTATEMENT:  SELECT pg_read_file($1, 0, 1048576)
2013-01-08 06:42:10 MSTERROR:  absolute path not allowed
2013-01-08 06:42:10 MSTSTATEMENT:  SELECT pg_read_file($1, 0, 1048576)
2013-01-08 07:12:01 MSTERROR:  absolute path not allowed
2013-01-08 07:12:01 MSTSTATEMENT:  SELECT pg_read_file($1, 0, 1048576)
2013-01-08 07:42:02 MSTERROR:  absolute path not allowed
2013-01-08 07:42:02 MSTSTATEMENT:  SELECT pg_read_file($1, 0, 1048576)

Anyone know why I'm getting this?



  0___  Wolfgang Schwurack
 c/  /'_DBA/SA
(*)  \(*)   University of Utah/UEN
Tel: (801) 587-9444
email: w...@uen.org



Re: [Pgbouncer-general] [GENERAL] Again, problem with pgbouncer

2012-10-07 Thread Wolf Schwurack
Sorry but you are showing two different paths

Your first email showed this path
/var/log/pgbouncer.log 

And now you are stating this, which would be correct
/var/log/pgbouncer/pgbouncer.log

Wolf


-Original Message-
From: Phoenix Kiula [mailto:phoenix.ki...@gmail.com] 
Sent: Friday, October 05, 2012 8:01 PM
To: Wolf Schwurack
Cc: raghu ram; pgbouncer-gene...@pgfoundry.org; PG-General Mailing List
Subject: Re: [Pgbouncer-general] [GENERAL] Again, problem with pgbouncer

On Sat, Oct 6, 2012 at 12:01 AM, Wolf Schwurack  wrote:

> You need to have a pgbouner directory in /var/log and have the owner 
> pgbouncer. This is easy to test try creating a file in /var/log as the 
> user pgbouncer. It should fail because pgbouncer does not have writer 
> permissions to /var/log. As root create a directory 
> /var/log/pgbouncer, change owner to pgbouncer. Set your parameter for 
> pgbouncer.log to /var/log/pgbouncer. Then test by creating a file in 
> /var/log/pgbouncer as user pgbouncer



Wolf, I think you missed the earlier posts in this thread. The 
"/var/log/pgbouncer.log" already has those permissions.

Note this important fact: the same permissions have been working for nearly 2 
years.

Anyway, I created a directory:  /var/log/pgbouncer/, put the pgbouncer.log file 
in it.

   chown -R pgbouncer:postgres /var/log/pgbouncer
   chown pgbouncer:postgres /var/log/pgbouncer/pgbouncer.log
   chmod 777 /var/log/pgbouncer/pgbouncer.log

As was already happening, pgbouncer starts. No problem.

It's now that I cannot connect to PSQL via pgbouncer (of course I can connect 
to psql directly) because it fails with this error:

  psql: ERROR:  No such user: MYSITE_MYSITE


Which is weird, because that user does exist. Both inside the postgres database 
when I do "\du" as you suggested, and of course in the pgbouncer authfile too --


   >   chown pgbouncer:postgres /var/lib/pgsql/pgbouncer.txt

   > cat /var/lib/pgsql/pgbouncer.txt

   "MYSITE_MYSITE" "md5 pass"
   "MYSITE_MYSITE" "raw pass"
   "postgres" "md5fd6313191fec7887f88c31a85c43df21"


So now. What? Why is this otherwise very useful tool coded so poorly that 
there's reams of such permissions and all of these threads online? Would love 
to have some help or guidance.

Thanks.


-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


Re: [Pgbouncer-general] [GENERAL] Again, problem with pgbouncer

2012-10-05 Thread Wolf Schwurack
-- OK, but this is not a showstopper here. Right? 
Your right - just a thought

-- What settings do I need to give "/var/log" (currently root) so the pgbouncer 
process can write to it? Why are these special permissions needed
You need to have a pgbouner directory in /var/log and have the owner pgbouncer. 
This is easy to test try creating a file in /var/log as the user pgbouncer. It 
should fail because pgbouncer does not have writer permissions to /var/log. As 
root create a directory /var/log/pgbouncer, change owner to pgbouncer. Set your 
parameter for pgbouncer.log to /var/log/pgbouncer. Then test by creating a file 
in /var/log/pgbouncer as user pgbouncer

If the user exists in the postgres then I'm not sure why it fails.




Wolf


-Original Message-
From: Phoenix Kiula [mailto:phoenix.ki...@gmail.com] 
Sent: Friday, October 05, 2012 9:37 AM
To: Wolf Schwurack
Cc: raghu ram; pgbouncer-gene...@pgfoundry.org; PG-General Mailing List
Subject: Re: [Pgbouncer-general] [GENERAL] Again, problem with pgbouncer

On Thu, Oct 4, 2012 at 2:50 AM, Wolf Schwurack  wrote:
> I use pgpool but some of the problem you listed are same as I had with 
> pgpool


Thanks Wolf, for the thoughts.


> I would not run pgbouner in /var/run/pbbouner. Every time you reboot 
> the directory will get deleted. I set my parameter to another 
> directory the would not get deleted after a reboot.


OK, but this is not a showstopper here. Right?



> /var/log/pgbouncer.log:
> what is the permission on /var/log? If you don't have write permission on the 
> directory then you cannot write to the file.


Permissions:

/var/run/pgbouncer --
70058074 drwxr-xr-x  2 pgbouncer postgres 4.0K Oct  2 06:17 pgbouncer/

/var/log --
145686529 drwxr-xr-x 17 root root  4.0K Oct  5 04:29 log/

Please note that whatever the settings, they were working before a server 
reboot. What settings do I need to give "/var/log" (currently
root) so the pgbouncer process can write to it? Why are these special 
permissions needed-- I mean Apache, MysQL, Nginx etc...all of them can write to 
the logs in this log folder.



> Psql: ERROR: No such user:
>  You have to create the user in postgres, check you users
>
> postgres=# /du
>



Yes, this user exists in the postgres database.


  List of roles
Role name|Attributes | Member of
-+---+---
 postgres| Superuser, Create role, Create DB | {}
 rvadmin |   | {}
 MYSITE  |   | {}
 MYSITE_MYSITE   | Superuser, Create DB  | {}



And the authfile also has permissions for "pgbouncer:postgres".

What else?


-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


Re: [Pgbouncer-general] [GENERAL] Again, problem with pgbouncer

2012-10-03 Thread Wolf Schwurack
I use pgpool but some of the problem you listed are same as I had with pgpool

I would not run pgbouner in /var/run/pbbouner. Every time you reboot the 
directory will get deleted. I set my parameter to another directory the would 
not get deleted after a reboot. 

/var/log/pgbouncer.log:
what is the permission on /var/log? If you don't have write permission on the 
directory then you cannot write to the file.

Psql: ERROR: No such user: 
 You have to create the user in postgres, check you users 

postgres=# /du

Role name
--
testuser


Wolfgang Schwurack
DBA/SA
UEN


-Original Message-
From: pgbouncer-general-boun...@pgfoundry.org 
[mailto:pgbouncer-general-boun...@pgfoundry.org] On Behalf Of Phoenix Kiula
Sent: Wednesday, October 03, 2012 12:02 PM
To: raghu ram
Cc: pgbouncer-gene...@pgfoundry.org; PG-General Mailing List
Subject: Re: [Pgbouncer-general] [GENERAL] Again, problem with pgbouncer

On Tue, Oct 2, 2012 at 5:27 PM, Phoenix Kiula  wrote:
> On Tue, Oct 2, 2012 at 11:29 AM, Phoenix Kiula  
> wrote:
>> On Tue, Oct 2, 2012 at 12:59 AM, Phoenix Kiula  
>> wrote:
 Could you please check permission of /var/run/pgbouncer/ directory. 
 If pgbouncer directory does not have "postgres" user 
 permissions,please assign it and then start the pgbouncer.
>>>
>>>
>>> The /var/run/pgbouncer/ directory has
>>>
>>>chown -R postgres:postgres ..
>>>
>>> The port number everywhere is already 6789.
>>>
>>> What else?
>>
>>
>>
>> And just to be safe, I also added pgbouncer user to postgres group:
>>
>>
>> usermod -a -G postgres pgbouncer
>>
>>
>> Now when I restart the pgbouncess service, it fails. The log has this 
>> message:
>>
>>
>> 2012-10-01 23:25:24.004 21037 FATAL
>> Cannot open logfile: '/var/log/pgbouncer.log':
>> Permission denied
>>
>>
>> That file is owned by "postgres:postgres" as indicated in a gazillion 
>> threads and documentation online (none of which is comprehensive) but 
>> just to be sure I also did this:
>>
>>
>> chown :postgres /var/log/pgbouncer.log
>>
>>
>> Still the same permission error. Seriously, why can't the log message 
>> be a little more useful? Why can't it say clearly WHICH USER is 
>> looking for permission to the log file? Both "pgbouncer" and 
>> "postgres" have permissions (through the group "postgres") on that 
>> file. So which is it?
>
>
>
> I made the port number 6389 everywhere. I changed the permissions of 
> the pgbouncer.log to:
>
>chown pgbouncer:postgres /var/log/pgbouncer.log
>
> Now at least the service starts. But when I try and connect via the 
> pgbouncer ID:
>
>psql -p 6389 -U  snipurl_snipurl snipurl
>
> I get this error:
>
>psql: ERROR:  No such user: MYSITE_MYSITE
>
> And yet, the authfile has this:
>
> "MYSITE_MYSITE" ""
> "MYSITE_MYSITE" ""
> "postgres" ""
> "MYSITE_pgbouncer" ""
>
>
> The authfile permissions are:
>
>283377983 -rw-r--r-- 1 pgbouncer postgres 262 Apr 14 11:15 
> /var/lib/pgsql/pgbouncer.txt
>
>
> What else?




No response.

Is there anyone who can help me with pgbouncer?

What are the permissions for the authfile, etc?
___
Pgbouncer-general mailing list
pgbouncer-gene...@pgfoundry.org
http://pgfoundry.org/mailman/listinfo/pgbouncer-general


-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general