Can duplicate pg_hba entries result in a connection error? I have received the following error when attempting to connect to an Arch Linux server:

Sequel::DatabaseConnectionErrorreplication#monitor
PG::Error: could not connect to server: Connection refused Is the server running on host "45.56.86.24" and accepting TCP/IP connections on port 5432?


but I have an entry in my pg_hba.conf file on that server:

hostssl replication replication 45.56.86.24/32 md5


Actually... there are two lines like this. Is presence of the second line be expected to result in this error?
No. Duplicate entries are basically ignored.

The documentation of pg_hba.conf describes how the rules work pretty well:


  The first record with a matching connection type, client
  address, requested database, and user name is used to perform
  authentication. There is no "fall-through" or "backup": if one record
  is chosen and the authentication fails, subsequent records are not
  considered. If no record matches, access is denied.


So the second and any subsequent duplicates will never be considered.
So duplicate entires can not be the cause of your error.