Showing posts with label connection. Show all posts
Showing posts with label connection. Show all posts

Thursday, April 9, 2020

org.postgresql.util.PSQLException: Connection refused


You ran your application to connect to your Postgresql database and received the following exception.


org.postgresql.util.PSQLException: Connection to 129.178.32.11:5432 refused. Check that the hostname and port are correct and that the postmaster is accepting TCP/IP connections.                at org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:285)

After you have ensured that the hostname and port are correct and the exception remains you need to modify the postgresql.conf file.

         Uncomment and change listen_address='localhost' to listen_address='*'.

Then check the pg_hba.conf file to ensure your host is allowed to connect to the database by changing IPv4 and IPv6 local connections to:   host   all   all   all   trust

And restart your Postgresql database.


-----------------------------------------------------------------------------------------------------------------
Watch the blessing and loving online channel: SupremeMasterTV live




If you have ever asked yourself these questions, this is the book for you. What is the meaning of life? Why do people suffer? What is in control of my life? Why is life the way it is? How can I stop suffering and be happy? How can I have a successful life? How can I have a life I like to have? How can I be the person I like to be? How can I be wiser and smarter? How can I have good and harmonious relations with others? Why do people meditate to achieve enlightenment? What is the true meaning of spiritual practice? Why all beings are one? Read the book for free here.







Wednesday, February 7, 2018

Configure Windows firewall to allow a connection

When you need to connect your computer to a server through a network connection, both the firewalls on the server and your computer need to be configured to allow the connection to go through. Otherwise, it will throw a java.net.ConnectException.

To configure the firewall on your computer which has Windows 10 as its operating system:

1. Open the Windows Defender Firewall. Click on the Window icon in the left-bottom corner of your computer, type "firewall" and select the Windows Defender Firewall.

2. Click on the Advanced Settings on the left side of the window.

3. Click the Outbound Rules in the left pane. Then, click the New Rules in the right pane.

4. Select Custom and click the Next button.

5. Select the This program path if you know which program you are using. Otherwise select All programs. Click the Next button

6. Select UDP from the Protocol type drop-down list if you use DatagramSocket, otherwise select TCP if you use ServerSocket / Socket.

7. Select Specific Ports from the Remote port drop-down list and enter the port. Click the Next button.

8. Under Which remote IP addresses does this rule apply to, select These IP addresses.

9. Click the Add button and enter the IP address of your remote server and click the OK button. Click the Next button.

10. Select the Allow the connection and click the Next button. And click the Next button again.

11. Check all the check boxes: Domain, Private, and Public. Click the Next button.

12. Enter a name for this rule. Click the Finish button.

-----------------------------------------------------------------------------------------------------------------

                        
If you have ever asked yourself these questions, this is the book for you. What is the meaning of life? Why do people suffer? What is in control of my life? Why is life the way it is? How can I stop suffering and be happy? How can I have a successful life? How can I have a life I like to have? How can I be the person I like to be? How can I be wiser and smarter? How can I have good and harmonious relations with others? Why do people meditate to achieve enlightenment? What is the true meaning of spiritual practice? Why all beings are one? Read the book free here.