Could not connect to Azure cloud hyperscale citus - postgresql

i tried connecting my local postgresql to azure via hyperscale citus but got this error.
psql: error: could not connect to server: could not connect to server:
Connection timed out (0x0000274C/10060)
Is the server running on host "mydemo-c.postgres.database.azure.com" (20.42.29.217) and accepting
TCP/IP connections on port 5432?
I tried the steps asked earlier like re-configuring conf files and making available all listening ports but it didn't worked out. Any help?

Related

The database cluster initialization failed - error while installing PostgreSQL

While installing PostgreSQL on Windows 11 I get the error:
the database cluster initialization failed
then SQL Shell gives me an error
psql: error: could not connect to server: Connection refused
(0x0000274D/10061)
Is the server running on host "localhost" (::1) and accepting
TCP/IP connections on port 5432? could not connect to server: Connection refused (0x0000274D/10061)
Is the server running on host "localhost" (127.0.0.1) and accepting
TCP/IP connections on port 5432? Press any key to continue . . .
There's even no Postgres in Services and the data folder is empty. So I uninstalled it and got this error while doing so:
error stopping service PostgreSQL-x64-13
After this, I've tried many different ways of reinstalling Postgres, including running it as Admin, creating a separate user named postgres with Admin rights, etc. In fact, this comprehensive article offers a lot of different ways to deal with this issue: https://forums.holdemmanager.com/general-support/150771-solved-postgresql-database-cluster-initialisation-failed.html
However, none of them worked for me. It seems that I exhausted all possible solutions. Any ideas on what I can try now?

Postgres FDW connectivity issue from Azure RDS to AWS RDS

I was using FDW extension in PostgreSQL from 2 years to load data from one database to another database. Now, one of my RDS has been moved from AWS to Azure. Now, when I tries to make connection from Azure to AWS it says the host is invalid. So, in this case FDW doesn't works if the RDS are from different service?
Error:
Detail: could not connect to server: Network is down (0x00002742/10050)
Is the server running on host "xxxxx" (10.xx.xx.xx) and accepting
TCP/IP connections on port 5432?
could not connect to server: Network is down (0x00002742/10050)
Is the server running on host "xxxxx" (10.xx.xx.xx) and accepting
TCP/IP connections on port 5432?
could not connect to server: Network is down (0x00002742/10050)
Is the server running on host "xx" (10.xx.xx.xxx) and accepting
TCP/IP connections on port 5432?
could not connect to server: Network is down (0x00002742/10050)
Is the server running on host "xx" (10.xx.xx.xx) and accepting
TCP/IP connections on port 5432?```

PostgreSQL server Connection error: could not connect to server

I am using pgAdmin4 and developing a node.js app.I had an abrupt shutdown of the computer and I can no longer connect to the postgresql server.
The error I get when trying to connect is :
psql: could not connect to server: Connection refused (0x0000274D/10061)
Is the server running on host "localhost" (::1) and
accepting TCP/IP connections on port 5432?
could not connect to server: Connection refused (0x0000274D/10061)
Is the server running on host "localhost" (127.0.0.1) and
accepting TCP/IP connections on port 5432?
I tried to run postgres -D /usr/local/var/postgres/ as suggested in this SO answer. However it gave me the following error :
postgres: could not access directory "usr/loval/var/postgres": No such file or directory
Run initdb or pg_basebackup to initialize a PostgreSQL data directory.
So I just manually deleted the postmaster.pid file inside the PostgreSQL/.../data folder. But I still cannot connect to the database server.
I have checked the postgresql.conf file, and
the listen addresses is already set as listen_addresses = '*', and the port is set to 5432.
I also tried deleting the pgAdmin file in the AppData/Roaming folder.But it gave me an error:
The application server could not be contacted
and then afterwards the same problem of not being able to connect to the server happens.
Funny enough, it was a matter of just deleting the pdAdmin file in AppData/Roaming folder, and then restarting the computer and restarting the pgAdmin4. That solved it for me.
Meet the same challenge while settings up PostgreSQL to work with a Python/Django project.And i resolved the issue here, after reading the official PostgreSQL-9.6.16 documentation.

Can't connect to the default server of pgAdmin 4

I have just installed the pgAdmin-4, and trying to connect to the default server installed with it (PostgreSQL 9.5). It asks for the password (Which I assume by default it's "postgres"), however, I keep receiving the following message:
could not connect to server: Connection refused (0x0000274D/10061) Is the server running on host "localhost" (::1) and accepting TCP/IP connections on port 5432? could not connect to server: Connection refused (0x0000274D/10061) Is the server running on host "localhost" (127.0.0.1) and accepting TCP/IP connections on port 5432?
I am working on Windows 7.
Any ideas on how to fix this problem?
The first thing is to remove pgadmin from the problem. Try to connect with the command line using psql - if you get the same message you know that the problem is not with pgadmin. If the problem continues with psql then probably your configuration of postgresql is not complete. The issue might be in the file pg_hba.conf - this file controls who is allowed to connect to the backend. You might also check that the server application is running, using an appropriate Windows utility.

connecting to PgAdmin locally from amazon EC2 postgres

I have created an amazon ec2 ubuntu instance and installed postgres in it but unable to connect it. I have enabled security group HTTP(80), Postgres(5432) and ssh(22).
While connect in pgadmin following errors are thrown
Server doesn't listen
The server doesn't accept connections: the connection library reports
could not connect to server: Connection refused (0x0000274D/10061) Is the server running on host "54.172.***.***" and accepting TCP/IP connections on port 5432?