After upgrading to postgresql 13.8 getting error the server does not support SSL

We have upgraded the postgresql version from 9.6 to 13.8 in our lab. Post upgrade and initialization our application is keep restarting due to the below error in the log

Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name ‘migration’: Unsatisfied dependency expressed through field ‘dataSource’; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘credentialedDataSource’: Invocation of init method failed; nested exception is org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection; nested exception is org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (The server does not support SSL.)

What does the above error mean? How to fix it? Do we need to do anything with the server.crt and server.key files? Meaning, reimport or regenerate.

Pls let me know if you need any other detail from me.

Did you install postgresql from AlmaLinux AppStream or added PGDG repositories and from there?