Sign in to follow this  
Followers 0
scowles

barnyard2 configured for postgres database connect failed

11 posts in this topic

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.

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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...

Share this post


Link to post
Share on other sites
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?

Share this post


Link to post
Share on other sites

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...

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0