Here we are listing the troubleshooting steps in a order, such that if the first set doesn't resolves the issue, then check the next one.
If it resolves, you are good to proceed, no need to follow further steps.
- There are several factors in the environment, which comes into the postgres database connectivity exception.
- Firewall / Windows Defender / Antivirus Service / Anti Malware Scanning Interface / Other Scanning Services :
- Ensure, these services doesn't affects / intercepts with the processes running inside <product_installation_directory>. We recommend you to exclude this location from the antivirus scanning process. If the issue recreates, try disabling the antivirus and other scanning services before invoking the upgrade and reenable it after the completion of upgrade.
- By default, our applications runs in port 65432 & 65433. Make sure such ports are available and doesn't get intercepted by firewall too often. In case of external postgres database, Firewalls or network security configurations may block incoming connections to the PostgreSQL server.
- In some of the Windows operating system, windows defender is scanning all processes. Make an exclusion in that list, such that windows defender doesn't intercepts.
- Make sure, other application processes doesn't affect our product running processes. and apart from our processes, no processes should run inside the <product_installation_directory>.
- Data Execution Policy \ Group policy of File or Port Restriction:
- This segment is applicable only to Windows. Refer here for more details about this policy.
- We need to exclude the <product_installation_folder> from restricting due to this policy. Configure in such a way, that the executables inside <product_installation_folder> can be executed successfully.
- Network issues :
- This segment is applicable only for the instance, which has it's database hosted in different servers and accessed externally
- After ensuring firewall configuration, High network traffic or network congestion can significantly delay or interrupt the connection process. Ensure the network is seamless and robust in nature.
- Ephemeral Ports :
- In some of the environment, ephemeral ports are enabled by default. To clarify this better Ephemeral ports are temporary, short-lived ports assigned by the operating system for the duration of a communication session. For more details refer : Ephemeral Ports
- They are typically used for making new postgres connections from application to database.
- Kindly make a firewall rule, such that it allows all inbound connections for all ports from our product (or) allows all inbound connections for all ports in the ephermal ports range.
- Since we create this rule for inbound connections from internal processes, this will not be ease to security vulnerability. Apart from this, you can employ intrusion detection systems (IDS), and access control lists (ACLs) without affecting our product operations.
- This block troubleshoots the issue with respect to the version and configuration of Application which acts as the client here.
- Database Driver :
- If your build version is under 13005, Kindly follow this article.
- Check whether only one jar is present with the pattern postgresql-4x.x.x.jar inside the <product_installation_location> \ lib directory. If you find any other jars, Kindly preserve the latest version jar and move other jars to any other directory out of <product_installation_location>.
- JDBC URL Configuration :
- If your build version is under 14610, We can increase the timeout limit for a connection by modifying the configuration of JDBC. For versions above 14610, this parameters are already modified to this recommended values by default. Refer to the below instructions on how to configure this.
- Navigate to <product_installation_location> \ conf \ database_params.conf .
- Make a backup copy of this file and place it a different location.
- Find the property "url" and modify the values of below parameters.
- Set
- loginTimeout=30
- socketTimeout=1200,
- connectTimeout=20,
- add the below param at the end of URL similar to other params,
- sslmode=disable,
For Example,
Before Modification :
- url=jdbc\:postgresql\://localhost\:65432/servicedesk?charSet\=UTF-8&loginTimeout\=5&socketTimeout\=1200&connectTimeout\=5
After Modification :
- url=jdbc\:postgresql\://localhost\:65432/servicedesk?charSet\=UTF-8&loginTimeout\=30&socketTimeout\=1200&connectTimeout\=20&sslmode\=disable
After this modification, save the file and restart the application server. If the application fails to start, then the configuration change is incorrect. Kindly check and reach our support team for more assistance.