Skip to content

barnyard2 configured for postgres database connect failed

Featured Replies

After checking and double-checking the Barnyard2.conf file which is including the line

'output database: log, postgresql, user=snort password=l0gg3r dbname=snort host=winids sensor_name=WinIDS-Home'

The Barnyard2 configuration test fails with the following result-

ERROR: database Connection to database 'snort' failed

Fatal Error, exiting database: Closing connection to database "snort"

Any suggestions for resolving would be appreciated.

Looks like there was an error configuring the database. You could uninstall it and confgure it again?

  • Author

Good thought.  However, I took your advice and did DROP DATABASE snort successfully and then created it again. Same result-

The Barnyard2 configuration test fails with the following result-

ERROR: database Connection to database 'snort' failed

Fatal Error, exiting database: Closing connection to database "snort"

Note also:  I can connect to the snort database as user postgres via '\connect snort;'

Any further suggestions for resolving would be appreciated.

Edited by scowles

Looks like a user authentication problem. Try logging into the database manually using user snort . That is the authentication Barnyard2 uses. If that fails the drop the user snort and create it again.

  • Author

This has NOT been resolved by correcting configuration errors. Barnyard2 fails with "ERROR: database connection to database 'snort' failed

Barnyard2 exiting

database: Closing connection to database "snort"

Postresql Error Msg.docx

Edited by scowles
Attached error msg from Creating Postgresql password

  • Author

Update:  I've successfully completed the Barnyard2 testing with a good result.  Thanks.

This has NOT been resolved by correcting configuration errors. Barnyard2 fails with "ERROR: database connection to database 'snort' failed

Barnyard2 exiting

database: Closing connection to database "snort"

Postresql Error Msg.docx

​Just saw this, sorry for the miss...

  • 10 months later...
On 2015/5/19 at 2:19 AM, scowles said:

Update:  I've successfully completed the Barnyard2 testing with a good result.  Thanks.

Hi 

same problem,how did you solve this?

I'm not real sure, but you could try opening a CMD window and typing cmd.exe /c chcp 1252

Let us know if this works...

  • 1 year later...

hi,
how to solve this problem???

 

It appears the snort database has a problem or authentication.

Go into the task manager and kill the Barnyard2 process.

Go into the uninstall programs and remove postgresql.

Go into the d:\winids folder and delete the postgresql folder.

Return to the tutorial section labeled Installing the PostgreSQL Database Server and complete.

Go to the tutorial section labeled Configuring the PostgreSQL Database Server and complete.

Go to the tutorial section labeled Confirming PostgreSQL and Snort are operational and complete.

Go to the tutorial section labeled Testing the Barnyard2 configuration file and complete.

This should fix the problem.

Create an account or sign in to comment

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.