[prev in list] [next in list] [prev in thread] [next in thread] 

List:       syslog-ng
Subject:    Re: [syslog-ng] PostgreSQL destination - connection refused
From:       victorsugo <victorsugo () protonmail ! com>
Date:       2021-02-06 12:01:13
Message-ID: 542A514QtfnM6T6xkJxt3aY6OB6usGWhtJ7Np2-6fnAcGc9I6jdvKdlDFOx-8Nzj-kBpMarIFVtJfSPX7pfagB-DH0ixaj_6NeCDbRK9OhQ= () protonmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]

[Attachment #4 (text/plain)]

Sorry, forget it please!
It was my fault.

Because the database was empty after starting all containers, and I've found that \
error message in /var/log/messages, I thought the syslog-ng stopped writing to the \
database. Actually, the other containers started before the logger, so they can't \
send startup logs to it.

Sorry...

Sent with [ProtonMail](https://protonmail.com) Secure Email.

------- Original Message -------
On Saturday, February 6, 2021 11:16 AM, victorsugo <victorsugo@protonmail.com> wrote:

> Hi,
> 
> I'd like to store incoming log messages in a postgres db.
> Both db server and syslog-ng run in a docker container.
> I'm using docker-compose to manage containers. The syslog-ng is depending on the pg \
> container, but... every time I start containers with docker-compose up -d, the \
> syslog-ng starts, but can't connect to database. 
> I found this in the /var/log/messages on the syslog-ng's container:
> err syslog-ng[1]: Error establishing SQL connection; type='pgsql', \
> host='pgsrv.infra-net', port='', username='syslog', database='postgres', \
> error='could not connect to server: Connection refused ... 
> Is there any way to reconnect automatically or abort syslog-ng if it can't connect \
> to the db? It is important if I don't want to lose some logs...
> (or do I need to forget the SQL backend if I want to operate a log server without \
> loss of data??) 
> Regards,
> 
> Sent with [ProtonMail](https://protonmail.com) Secure Email.


[Attachment #5 (text/html)]

<div>Sorry, forget it please!<br></div><div>It was my \
fault.<br></div><div><br></div><div>Because the database was empty after starting all \
containers, and I've found that error message in /var/log/messages, I thought the \
syslog-ng stopped writing to the database.<br></div><div>Actually, the other \
containers started before the logger, so they can't send startup logs to \
it.<br></div><div><br></div><div>Sorry...<br></div><div><br></div><div \
class="protonmail_signature_block"><div class="protonmail_signature_block-user \
protonmail_signature_block-empty"><br></div><div \
class="protonmail_signature_block-proton">Sent with <a href="https://protonmail.com" \
target="_blank">ProtonMail</a> Secure \
Email.<br></div></div><div><br></div><div>------- Original Message \
-------<br></div><div> On Saturday, February 6, 2021 11:16 AM, victorsugo \
&lt;victorsugo@protonmail.com&gt; wrote:<br></div><div> <br></div><blockquote \
class="protonmail_quote" type="cite"><div>Hi,<br></div><div><br></div><div>I'd like \
to store incoming log messages in a postgres db.<br></div><div>Both db server and \
syslog-ng run in a docker container.<br></div><div>I'm using docker-compose to manage \
containers. The syslog-ng is depending on the pg container, but... every time I start \
containers with docker-compose up -d, the syslog-ng starts, but can't connect to \
database.<br></div><div><br></div><div>I found this in the /var/log/messages on the \
syslog-ng's container:<br></div><div>err syslog-ng[1]: Error establishing SQL \
connection; type='pgsql', host='pgsrv.infra-net', port='', username='syslog', \
database='postgres', error='could not connect to server: Connection refused \
...<br></div><div><br></div><div>Is there any way to reconnect automatically or abort \
syslog-ng if it can't connect to the db?<br></div><div>It is important if I don't \
want to lose some logs...<br></div><div>(or do I need to forget the SQL backend if I \
want to operate a log server without loss of \
data??)<br></div><div><br></div><div><br></div><div>Regards,<br></div><div><br></div><div><br></div><div><br></div><div \
class="protonmail_signature_block"><div class="protonmail_signature_block-user \
protonmail_signature_block-empty"><br></div><div \
class="protonmail_signature_block-proton">Sent with <a href="https://protonmail.com" \
target="_blank">ProtonMail</a> Secure \
Email.<br></div></div><div><br></div></blockquote><div><br></div>


[Attachment #6 (text/plain)]

______________________________________________________________________________
Member info: https://lists.balabit.hu/mailman/listinfo/syslog-ng
Documentation: http://www.balabit.com/support/documentation/?product=syslog-ng
FAQ: http://www.balabit.com/wiki/syslog-ng-faq



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic