Re: Failed connection over SSH Tunnel

Lists: pgadmin-support
From: John Anwana <it-support(at)g6-global(dot)com>
To: "pgadmin-support(at)lists(dot)postgresql(dot)org" <pgadmin-support(at)lists(dot)postgresql(dot)org>
Subject: Failed connection over SSH Tunnel
Date: 2022-09-06 15:28:22
Message-ID: AM6PR0302MB3205028C9B8577D1FACE7E229D7E9@AM6PR0302MB3205.eurprd03.prod.outlook.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Lists: pgadmin-support

Hello,

I am having problem using PG Admin 4 to connect to my ubuntu server hosting a PostgreSQL database.

It appears to successfully connect over the ssh tunnel, because it shows a different ssh specific error if I use the wrong username or password

However, I get this error message:

Unable to connect to server: connection to server at 127.0.0.1, port 8761 failed: server closed the connection unexpectedly This probably means the server terminated abnormally before or while processing the request.

My question is thus, why is PG Admin trying to connect using port 8761 instead of 5432 as specified in the register server dialog box?

Each time I try again, I get another error with a different pot, almost as if PG admin is using random ports to connect with the DB.

Attached are screenshots of my config.

[cid:image005(dot)png(at)01D8C20D(dot)AC598160]

[cid:image006(dot)png(at)01D8C20D(dot)AC598160]

I would appreciate any assistance on this matter,

Regards,
John Anwana
IT Support
G6 Global | Delivering Critical Communications
[cid:image001(dot)png(at)01D8C20D(dot)8B769F00]
m. +44 (0)7755 2023717
|
t. +44 (0)1454 610050
e. it-support(at)g6-global(dot)com<mailto:it-support(at)g6-global(dot)com>
|
w. www.g6-global.com<http://www.g6-global.com/>
skype. Jayanwana
|
The Old Workshop, Hortham Farm, Bristol BS32 4JW UK
[cid:image002(dot)png(at)01D8C20D(dot)8B769F00]<https://www.linkedin.com/in/andy-clark-86618223/>
[cid:image003(dot)png(at)01D8C20D(dot)8B769F00]<https://twitter.com/andyclark_g6>
[cid:image004(dot)png(at)01D8C20D(dot)8B769F00]<https://www.facebook.com/profile.php?id=100000032137882>
This email and the information it contains may be privileged and/or confidential. It is for the intended addressee(s) only. The unauthorised use, disclosure or copying of this email or any information it contains; Is prohibited and could, in certain circumstances, be a criminal offence. If you are not an intended recipient, please notify the originator support(at)g6-global(dot)com<mailto:support(at)g6-global(dot)com> immediately.
Calcom Holdings Ltd (trading as G6 Global) is a company registered in the United Kingdom . Registered number: 3740662 . Registered office: The Old Workshop, Hortham Farm, Bristol, BS32 4JW.


From: Akshay Joshi <akshay(dot)joshi(at)enterprisedb(dot)com>
To: John Anwana <it-support(at)g6-global(dot)com>
Cc: "pgadmin-support(at)lists(dot)postgresql(dot)org" <pgadmin-support(at)lists(dot)postgresql(dot)org>
Subject: Re: Failed connection over SSH Tunnel
Date: 2022-09-07 10:51:37
Message-ID: CANxoLDf18rX-OsYWjLoRvTnzJ6EbhWSK4zUAsKBSTpCokFHHZA@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Lists: pgadmin-support

Hi John

According to the screenshot, the IP addresses of the Tunnel Host and
Database server are the same. I tested the SSH Tunnel with the following
setup:
On Machine 1 (Ubuntu), PostgreSQL 13 has been installed.
On machine 2 (Windows 10) pgAdmin 4 is running.
Base Machine: Mac OS X (Used for tunneling)

I am able to connect to the database server installed on Ubuntu. Take a
look at the screenshot below:
[image: Screenshot 2022-09-07 at 3.57.29 PM.png]
[image: Screenshot 2022-09-07 at 3.58.34 PM.png]

On Tue, Sep 6, 2022 at 11:53 PM John Anwana <it-support(at)g6-global(dot)com>
wrote:

> Hello,
>
>
>
> I am having problem using PG Admin 4 to connect to my ubuntu server
> hosting a PostgreSQL database.
>
>
>
> It appears to successfully connect over the ssh tunnel, because it shows a
> different ssh specific error if I use the wrong username or password
>
>
>
> However, I get this error message:
>
>
>
> Unable to connect to server: connection to server at 127.0.0.1, port 8761
> failed: server closed the connection unexpectedly This probably means the
> server terminated abnormally before or while processing the request.
>
>
>
> My question is thus, why is PG Admin trying to connect using port 8761
> instead of 5432 as specified in the register server dialog box?
>
>
>
> Each time I try again, I get another error with a different pot, almost as
> if PG admin is using random ports to connect with the DB.
>
>
>
> Attached are screenshots of my config.
>
>
>
>
>
>
>
> I would appreciate any assistance on this matter,
>
>
>
> Regards,
>
> *John Anwana*
>
> *IT Support*
>
> *G6 Global | Delivering Critical Communications*
>
> m. +44 (0)7755 2023717
>
> |
>
> t. +44 (0)1454 610050
>
> e. it-support(at)g6-global(dot)com
>
> |
>
> w. www.g6-global.com
>
> skype. Jayanwana
>
> |
>
> The Old Workshop, Hortham Farm, Bristol BS32 4JW UK
>
> <https://www.linkedin.com/in/andy-clark-86618223/>
>
> <https://twitter.com/andyclark_g6>
>
> <https://www.facebook.com/profile.php?id=100000032137882>
>
> This email and the information it contains may be privileged and/or
> confidential. It is for the intended addressee(s) only. The unauthorised
> use, disclosure or copying of this email or any information it contains; Is
> prohibited and could, in certain circumstances, be a criminal offence. If
> you are not an intended recipient, please notify the originator
> support(at)g6-global(dot)com immediately.
>
> Calcom Holdings Ltd (trading as G6 Global) is a company registered in the
> United Kingdom . Registered number: 3740662 . Registered office: The Old
> Workshop, Hortham Farm, Bristol, BS32 4JW.
>
>
>
>
>

--

<http://www.enterprisedb.com>

Akshay Joshi

Principal Software Architect

+91 9767888246

www.enterprisedb.com

<https://www.linkedin.com/company/edbpostgres>
<https://twitter.com/edbpostgres?lang=en>
<https://www.facebook.com/EDBpostgres>
<https://www.instagram.com/EDBpostgres/>