on 07-12-2018 10:48 AM
Hi Team,
I've created PostgreSQL instance on SAP cloud Platform and created access key for it.
The access key provides me the login information (DB Name, Hostname, username and etc..) but when I'm trying connect from my PgAdmin or form my web app in SCP VM (Python Django app) I'm facing to errors.
I'd like to know whether if I can use Pgadmin to connect postgres or I can only us Node.js app, Java app and BYOL app.
Thanks beforehand.
Regards,
Arman
Hi Arman,
I am a bit confused. You say you have postgreSQL installed on SCP - but this database is only available on the CF environment.
On the other hand you are using SAP Linux VM to host your applications which sits on Neo environment.
With that said, are you trying to use a local installation of pgAdmin to connect to your CF database? If so, you could open an ssh tunnel to it using cf cli. However, I don't suppose you can connect your python application running on a Linux VM to a database running on CF.
If this is the case, it would be wiser to have your database sitting near to your application. The way you are trying to do, it might not even be possible, but if it did your application would suffer from poor performance.
Choose between either options below:
1) Install both postgreSQL DB and pgAdmin locally on the Linux VM - this will allow you to connect your application easily to the database.
2) Deploy your application on CF directly using a Python Buildpack and read the environment VCAP_SERVICES to connect. The tunnel approach should be valid if you want to connect a local installation of pgAdmin to your database backing service in CF - but I've never tried it before.
To install software on Linux VM, you have to open an ssh terminal to your VM first. There is an excellent blog on VM (neo) and on step 3 the author shows how to connect to it remotely using Neo SDK to open a tunnel.
To install pgAdmin use the second part of the blog that will help you to install software in the linux VM using zypper.
From the second blog: "By default, outbound communication from the virtual machines to the Internet and other systems is allowed, but inbound communication has to be enabled.". This means outbound connectivity is allowed. However, direct inbound on the CF is not!
According to this wiki item 2.3.2, you cannot connect pgAdmin to a database running on SCP.
Best Regards,
Ivan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.