[syslog-ng] logging to PostgreSQL database

Gergely Nagy algernon at balabit.hu
Wed Jan 5 22:34:52 CET 2011


On Wed, 2011-01-05 at 22:24 +0100, Janez Barbič wrote:
> Hi,
> I am a student of Computer Science at University of Ljubljana.
> Recently I started working on some project which includes logging into
> PostgreSQL database.
> I came across some problem which I can't resolve myself. No matter
> what I do, syslog-ng refuses to log into local PostgreSQL database.
> Here is my current configuration:


> This is the error I get, logged by syslog-ng:
> Jan  5 22:00:38 computerName syslog-ng[11080]: Error establishing SQL
> connection; type='pgsql', host='localhost', port='',
> username='eneraptor', database='eneraptordb', error='could not connect
> to server: Connection refused\x0a\x09Is the server running on host
> "localhost" and accepting\x0a\x09TCP/IP connections on port 0?\x0a'


Just a quick guess, before I check my own PostgreSQL setup: judging by
the error message you received, would it help if you explicitly
specified which port Postgre is listening on? 
-- 
|8]





More information about the syslog-ng mailing list