Unable to Connect to Server Error Help

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Unable to Connect to Server Error Help

Michael J. Cosentino
Hello,

I am on a MacOS, (10.15.3), I am new to SQL in general, and I've downloaded both the Postgres.app and pgadmin 4 for the first time - trying to learn from a book from the library.
When I initially tried to open pgadmin, I got the error "The application server could not be contacted."

I closed Postgres.app, and restarted pgadmin, and got past that initial error, and got pgadmin to load in my browser (Chrome), but there were no Servers in the object browser of pgadmin (the pane on the left).

I tried to connect a new server, and got the following error message:
"unable to connect to server. timeout expired"

I tried inputting the server name for the server from Postgres.app, but that didn't seem to do anything. It looks like pgadmin is connecting to the correct port (5432), but I basically have no clue what i'm doing wrong.

attaching some screenshots of what i'm seeing in pg admin.

thanks!
mike

Screenshot 2020-02-24 22.14.07.png (69K) Download Attachment
Screenshot 2020-02-24 22.13.50.png (745K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Unable to Connect to Server Error Help

Laurenz Albe
On Mon, 2020-02-24 at 22:25 -0500, Michael J. Cosentino wrote:

> I am on a MacOS, (10.15.3), I am new to SQL in general, and I've downloaded both the Postgres.app and pgadmin 4 for the first time - trying to learn from a book from the library.
> When I initially tried to open pgadmin, I got the error "The application server could not be contacted."
>
> I closed Postgres.app, and restarted pgadmin, and got past that initial error, and got pgadmin to load in my browser (Chrome), but there were no Servers in the object browser of pgadmin (the pane on
> the left).
>
> I tried to connect a new server, and got the following error message:
> "unable to connect to server. timeout expired"
>
> I tried inputting the server name for the server from Postgres.app, but that didn't seem to do anything. It looks like pgadmin is connecting to the correct port (5432), but I basically have no clue
> what i'm doing wrong.
>
> attaching some screenshots of what i'm seeing in pg admin.

According to your screen shot, you used "PostgreSQL 12"
as "host name/address", but that is not the name of the server.

Try with "localhost" or "127.0.0.1" instead.

Yours,
Laurenz Albe
--
Cybertec | https://www.cybertec-postgresql.com



Reply | Threaded
Open this post in threaded view
|

Re: Unable to Connect to Server Error Help

Michael J. Cosentino
Thanks for the feedback!

I tried inputting “localhost” and “127.0.0.1” into pgadmin’s name field for setting up a new server, but got an error message that read “connection to the local server has been lost.”

Any help on what I should try next would be appreciated.

mike

On Tue, Feb 25, 2020 at 4:44 AM Laurenz Albe <[hidden email]> wrote:
On Mon, 2020-02-24 at 22:25 -0500, Michael J. Cosentino wrote:
> I am on a MacOS, (10.15.3), I am new to SQL in general, and I've downloaded both the Postgres.app and pgadmin 4 for the first time - trying to learn from a book from the library.
> When I initially tried to open pgadmin, I got the error "The application server could not be contacted."
>
> I closed Postgres.app, and restarted pgadmin, and got past that initial error, and got pgadmin to load in my browser (Chrome), but there were no Servers in the object browser of pgadmin (the pane on
> the left).
>
> I tried to connect a new server, and got the following error message:
> "unable to connect to server. timeout expired"
>
> I tried inputting the server name for the server from Postgres.app, but that didn't seem to do anything. It looks like pgadmin is connecting to the correct port (5432), but I basically have no clue
> what i'm doing wrong.
>
> attaching some screenshots of what i'm seeing in pg admin.

According to your screen shot, you used "PostgreSQL 12"
as "host name/address", but that is not the name of the server.

Try with "localhost" or "127.0.0.1" instead.

Yours,
Laurenz Albe
--
Cybertec | https://www.cybertec-postgresql.com

Reply | Threaded
Open this post in threaded view
|

Re: Unable to Connect to Server Error Help

Justin-2
publish the pg_hba.conf file  see if there is a bad configuration going on in there, and lets see what the SSL setting are for the connection..

https://www.postgresql.org/docs/current/auth-pg-hba-conf.html

On Tue, Feb 25, 2020 at 7:32 AM Michael J. Cosentino <[hidden email]> wrote:
Thanks for the feedback!

I tried inputting “localhost” and “127.0.0.1” into pgadmin’s name field for setting up a new server, but got an error message that read “connection to the local server has been lost.”

Any help on what I should try next would be appreciated.

mike

On Tue, Feb 25, 2020 at 4:44 AM Laurenz Albe <[hidden email]> wrote:
On Mon, 2020-02-24 at 22:25 -0500, Michael J. Cosentino wrote:
> I am on a MacOS, (10.15.3), I am new to SQL in general, and I've downloaded both the Postgres.app and pgadmin 4 for the first time - trying to learn from a book from the library.
> When I initially tried to open pgadmin, I got the error "The application server could not be contacted."
>
> I closed Postgres.app, and restarted pgadmin, and got past that initial error, and got pgadmin to load in my browser (Chrome), but there were no Servers in the object browser of pgadmin (the pane on
> the left).
>
> I tried to connect a new server, and got the following error message:
> "unable to connect to server. timeout expired"
>
> I tried inputting the server name for the server from Postgres.app, but that didn't seem to do anything. It looks like pgadmin is connecting to the correct port (5432), but I basically have no clue
> what i'm doing wrong.
>
> attaching some screenshots of what i'm seeing in pg admin.

According to your screen shot, you used "PostgreSQL 12"
as "host name/address", but that is not the name of the server.

Try with "localhost" or "127.0.0.1" instead.

Yours,
Laurenz Albe
--
Cybertec | https://www.cybertec-postgresql.com

Reply | Threaded
Open this post in threaded view
|

Re: Unable to Connect to Server Error Help

Gerald Cheves
On 2/25/2020 9:07 AM, Justin wrote:
publish the pg_hba.conf file  see if there is a bad configuration going on in there, and lets see what the SSL setting are for the connection..

https://www.postgresql.org/docs/current/auth-pg-hba-conf.html

On Tue, Feb 25, 2020 at 7:32 AM Michael J. Cosentino <[hidden email]> wrote:
Thanks for the feedback!

I tried inputting “localhost” and “127.0.0.1” into pgadmin’s name field for setting up a new server, but got an error message that read “connection to the local server has been lost.”

Any help on what I should try next would be appreciated.

mike

On Tue, Feb 25, 2020 at 4:44 AM Laurenz Albe <[hidden email]> wrote:
On Mon, 2020-02-24 at 22:25 -0500, Michael J. Cosentino wrote:
> I am on a MacOS, (10.15.3), I am new to SQL in general, and I've downloaded both the Postgres.app and pgadmin 4 for the first time - trying to learn from a book from the library.
> When I initially tried to open pgadmin, I got the error "The application server could not be contacted."
>
> I closed Postgres.app, and restarted pgadmin, and got past that initial error, and got pgadmin to load in my browser (Chrome), but there were no Servers in the object browser of pgadmin (the pane on
> the left).
>
> I tried to connect a new server, and got the following error message:
> "unable to connect to server. timeout expired"
>
> I tried inputting the server name for the server from Postgres.app, but that didn't seem to do anything. It looks like pgadmin is connecting to the correct port (5432), but I basically have no clue
> what i'm doing wrong.
>
> attaching some screenshots of what i'm seeing in pg admin.

According to your screen shot, you used "PostgreSQL 12"
as "host name/address", but that is not the name of the server.

Try with "localhost" or "127.0.0.1" instead.

Yours,
Laurenz Albe
--
Cybertec | https://www.cybertec-postgresql.com

I configured a Mac about seven years ago and I remember that I had to edit the .bash_profile with the proper PATH where Postgres was installed because the Mac's had a partial installation.

open ~/.bash_profile - to edit in text wrangler

export PATH="/Library/PostgreSQL/9.3/bin:$PATH"

source ~/.bash_profile - to take effect

echo ~/.bash_profile -to see PATH


-- 
siamo arrivati sani e salvi
Reply | Threaded
Open this post in threaded view
|

Re: Unable to Connect to Server Error Help

Michael J. Cosentino
Gerald, this worked!

thank you so much :) and thank you to everyone who responded, i really appreciate it!

take care,
mike


On Tue, Feb 25, 2020 at 10:32 AM Gerald Cheves <[hidden email]> wrote:
On 2/25/2020 9:07 AM, Justin wrote:
publish the pg_hba.conf file  see if there is a bad configuration going on in there, and lets see what the SSL setting are for the connection..

https://www.postgresql.org/docs/current/auth-pg-hba-conf.html

On Tue, Feb 25, 2020 at 7:32 AM Michael J. Cosentino <[hidden email]> wrote:
Thanks for the feedback!

I tried inputting “localhost” and “127.0.0.1” into pgadmin’s name field for setting up a new server, but got an error message that read “connection to the local server has been lost.”

Any help on what I should try next would be appreciated.

mike

On Tue, Feb 25, 2020 at 4:44 AM Laurenz Albe <[hidden email]> wrote:
On Mon, 2020-02-24 at 22:25 -0500, Michael J. Cosentino wrote:
> I am on a MacOS, (10.15.3), I am new to SQL in general, and I've downloaded both the Postgres.app and pgadmin 4 for the first time - trying to learn from a book from the library.
> When I initially tried to open pgadmin, I got the error "The application server could not be contacted."
>
> I closed Postgres.app, and restarted pgadmin, and got past that initial error, and got pgadmin to load in my browser (Chrome), but there were no Servers in the object browser of pgadmin (the pane on
> the left).
>
> I tried to connect a new server, and got the following error message:
> "unable to connect to server. timeout expired"
>
> I tried inputting the server name for the server from Postgres.app, but that didn't seem to do anything. It looks like pgadmin is connecting to the correct port (5432), but I basically have no clue
> what i'm doing wrong.
>
> attaching some screenshots of what i'm seeing in pg admin.

According to your screen shot, you used "PostgreSQL 12"
as "host name/address", but that is not the name of the server.

Try with "localhost" or "127.0.0.1" instead.

Yours,
Laurenz Albe
--
Cybertec | https://www.cybertec-postgresql.com

I configured a Mac about seven years ago and I remember that I had to edit the .bash_profile with the proper PATH where Postgres was installed because the Mac's had a partial installation.

open ~/.bash_profile - to edit in text wrangler

export PATH="/Library/PostgreSQL/9.3/bin:$PATH"

source ~/.bash_profile - to take effect

echo ~/.bash_profile -to see PATH


-- 
siamo arrivati sani e salvi