Unable To Connect PostgreSQL DB

Status
Not open for further replies.

TechJimF

Forum User
Joined
May 11, 2017
Messages
23
Reaction score
3
I am unable to connect to the Postgre DB. I am using pgAdmin 4. I keep getting the error:

"Unable to connect to server:

could not connect to server: Connection timed out (0x0000274C/10060)
Is the server running on host "my3cxserver" (x.x.x.x) and accepting
TCP/IP connections on port 5432?"

I have tried what I found in /usr/share/3cxpbx/skel/Bin/3CXPhoneSystem.ini (Using Debian version) under these headings:

[CfgServerProfile]
[QMDatabase]

We are just in testing phase with an 4 SC enterprise license.

Any guidance would be appreciated.

Thanks,

Jim
 
Jim,

If you're getting connection errors, you need to do something with the 'listen_addresses' value in postgresql config file. I think it's the same kind of thing on Linux (not sure).

It permits by default ONLY 'localhost'. The port on Windows is 5480, again the postgresql config file will tell you what port to use.

Might also be worth checking any firewalls on the machine to see if it is a restricted port. I had to open it on Windows.

Simon
 
Was able to get access.

Had to change 3 files.

pg_hba.conf - added IPv4 connection, entire subnet
postgresql.conf - listening addresses, removed comment and allowed all
rules.v4 - firewall settings to allow port 5432

Thanks for your guidance.

Jim
 
Please keep in mind that exposing a database server may lead to unwanted situations.

You should do that only if its absolutely necessary.
 
Please keep in mind that exposing a database server may lead to unwanted situations.

You should do that only if its absolutely necessary.

We are in the evaluation process of 3CX and need to see what data points are available for historical and realtime reporting in regards to the call center compared to our current platform.

What would be the supported method to replicate the databases to an MS SQL server?

Also, is there any documentation on the databases, fields, etc?

Thanks,

Jim
 
@TechJimF Did you just use the connection details from 3CXPhoneSystem.ini to connect? I could connect to the database "postgres" but not to "phonesystem" (does not exist). What DB are you connecting to? The documentation is obviously near non-existent and though I've very familiar with SQL Server, I've never touched PostgreSQL.
 
nvm, I got in.
 
giwm how did you get in? I am trying to get access to postgres using pgAdmin 4 without luck. Getting fatal errors, my postgresql.conf says port 5480 not the typical postgres 5432, and change in my pg_hba.conf from password to trust on IPv4 local connections.
Is there any documentation on what tables I going to find in there and any schema description? I thought that during 3CX installation I could get asked if there is any MS SQL server instance running to install there...
 
Status
Not open for further replies.