Hi Matthew,
On Wed, Jan 05, 2011 at 10:24:17PM +0100, Janez Barbič wrote:Welcome to the list.
> 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.
Are you setting the port right? Here it seems to be zeroed out, which is
> 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'
probably bad, there have also been some bugs in syslog-ng and libdbi
which led to zeroed out or ignored port values before. Try using tcpdump
or Wireshark or tshark on the lo interface to monitor the connection
attempt to see if something looks wrong there. You can compare with what
happens on a successful connect from the CLI client to spot the
difference.
What happens when you try to query and add values to the table with the
> Database has also been created, properly named and has the right user.
CLI client?
We can probably help you figure it out but you'll have to do some
> From what I could gather is that syslog-ng probably can't connect to
> database, but I am running out of options on how to resolve this issue. I
> would be very grateful if you could help me resolve this issue.
debugging work as well to figure out the specifics.
> Best regards,
> Janez Barbic
Good Luck,
Matthew Hall.
______________________________________________________________________________
Member info: https://lists.balabit.hu/mailman/listinfo/syslog-ng
Documentation: http://www.balabit.com/support/documentation/?product=syslog-ng
FAQ: http://www.campin.net/syslog-ng/faq.html