You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
i have a java application which takes in value of DB spring.datasource.url=jdbc:postgresql://:/dSTK for the connection with the database.
We wanted the toxiproxy in middle between the application and the DB,which will receive the request from microservice and then forward that to the database.
for this I created the proxy with below command: toxiproxy-cli create http-to-http -l 127.0.0.1:9080 -u <IP-of-DB>:<port>DBIpProxy
(i tried putting the port directly, but it din't work with 'connection reset' error coming. so, i had to do nslookup and find its IP and replace here).
So for the above command of connection with the DB, i replaced the url with the below code: spring.datasource.url=jdbc:postgresql://localhost:5431/dstk , where the localhost:5431 is where my proxy running.
but i am getting the below errror : org.postgresql.util.PSQLException: Connection to localhost:5431 refused. Check that the hostname and port are correct and that the postmaster is accepting TCP/IP connections.
is there any way to resolve this TCP/IP connection that will happen from our application for connecting with the DB.
or is there any other way i can do this connection between proxy and my microservice.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
i have a java application which takes in value of DB spring.datasource.url=jdbc:postgresql://:/dSTK for the connection with the database.
We wanted the toxiproxy in middle between the application and the DB,which will receive the request from microservice and then forward that to the database.
for this I created the proxy with below command:
toxiproxy-cli create http-to-http -l 127.0.0.1:9080 -u <IP-of-DB>:<port>DBIpProxy
(i tried putting the port directly, but it din't work with 'connection reset' error coming. so, i had to do nslookup and find its IP and replace here).
So for the above command of connection with the DB, i replaced the url with the below code:
spring.datasource.url=jdbc:postgresql://localhost:5431/dstk
, where the localhost:5431 is where my proxy running.but i am getting the below errror :
org.postgresql.util.PSQLException: Connection to localhost:5431 refused. Check that the hostname and port are correct and that the postmaster is accepting TCP/IP connections.
is there any way to resolve this TCP/IP connection that will happen from our application for connecting with the DB.
or is there any other way i can do this connection between proxy and my microservice.
Beta Was this translation helpful? Give feedback.
All reactions