Collector error - Unable to connect to database action "Primary Database" due to error "OdbcError[08001] could not conne

0 votes
asked Jul 10 in EventSentry by msimmons13 (310 points)
Unable to connect to database action "Primary Database" due to error "OdbcError[08001] could not connect to server: Connection refused (0x0000274D/10061) Is the server running on host "myServerName" (::1) and accepting TCP/IP connections on port 5432?
could not connect to server: Connection refused (0x0000274D/10061) Is the server running on host "myServerName" (123.456.789.200) and accepting TCP/IP connections on port 5432?
could not connect to server: Connection refused (0x0000274D/10061) Is the server running on host "myServerName" (987.654.321.160) and accepting TCP/IP connections on port 5432?
(101) (ret=-1)" (4294967295). Please verify that the database is accessible, and that the service is using a valid login.

 

I am running Event Sentry on two servers, one web server (in a dmz) and one database server, both windows. I am receiving this on the database server but not the web. My first assumption is that Event Sentry uses it's own database that did not install correctly since there was already a database there?

2 Answers

+2 votes
answered Jul 11 by Steven Flowers (1,340 points)
selected Jul 11 by msimmons13
 
Best answer
When you installed EventSentry, do you recall if you unselected the option to install the built-in PostgreSQL database? Could you locate your "Primary Database" action and tell us if the connection string has "driver={Postgre...." or "driver={SQL..."? If you open "Administrative Tools" and then "Services", is there an EventSentry Database service running? Have you attempted to restart the collector service to see if that corrects the error?
commented Jul 11 by msimmons13 (310 points)
1. I let EventSentry install the built-in PostgreSQL database because I wanted it separate from the MS SQL server
2. Yes, the connection string is driver={PostgreSQL Unicode};server=[my server name];port=5432;database=EventSentry;uid=[user id];pwd=[password];
3. I located the EventSentry database v9.6 service. It is set to automatic but was not running, so I started it. This corrected the issue!
+1 vote
answered Jul 10 by Ingmar (1,860 points)
To answer your question, yes, EventSentry does ship with a built-in PostgreSQL-based database which listens on port 5432 by default. What database was already installed on that host?

The database is a component however and can be unchecked during the installation. You can check whether the database is installed by navigating to Administrative Tools -> Services; if "EventSentry Database" exists, then the built-in database is installed.

Since the collector does appear to attempt to connect, it seems likely that the database was installed, or at least was attempted to be installed by the setup routine. I would normally have you check firewall settings, but since the collector is usually installed on the same host as the database, this would probably not be helpfu.

Can you give us a little more information?

1. On which of the two hosts did you install EventSentry with the setup?
2. Is there full connectivity between those two hosts?
3. What database do you already have running?
4. Where are you seeing the above error message?
commented Jul 11 by msimmons13 (310 points)
1. I installed EventSentry on both
2. No, other than the Web Server (iis) (or rather, the web apps) being able to talk to the MS SQL database
3. MS SQL 2014
4. I was receiving a LOT of emails, as well as a popup when I launched EventSentry. For now I have turned off the collector.

I think the problem may be that my MS SQL 2014 instance has the name that the " PostgreSQL-based database" wants to use? Is there a way to alter the " PostgreSQL-based database?"
Welcome to EventSentry Q&A, where you can ask questions and receive answers from other members of the community.
...