On 2024-06-05 We 09:00, Alexander Lakhin wrote:
Another case (with psql using the port):
testrun/ssl/001_ssltests_47/log/regress_log_001_ssltests_47:# Checking
port 49448
testrun/ssl/001_ssltests_47/log/regress_log_001_ssltests_47:# Found
port 49448
testrun/ssl/001_ssltests_47/log/001_ssltests_47_primary.log:2024-06-05
12:20:50.178 UTC [976826] LOG: listening on Unix socket
"/tmp/GePu6gmouP/.s.PGSQL.49448"
testrun/ssl/001_ssltests_47/log/001_ssltests_47_primary.log:2024-06-05
12:20:50.491 UTC [976927] HINT: Is another postmaster already running
on port 49448? If not, wait a few seconds and retry.
...
testrun/ssl/001_ssltests_48/log/001_ssltests_48_primary.log:2024-06-05
12:20:50.491 UTC [976943] [unknown] LOG: connection received:
host=localhost port=49448
The broader excerpt:
2024-06-05 12:20:50.415 UTC [976918] [unknown] LOG: connection
received: host=localhost port=50326
2024-06-05 12:20:50.418 UTC [976918] [unknown] LOG: could not accept
SSL connection: EOF detected
2024-06-05 12:20:50.433 UTC [976920] [unknown] LOG: connection
received: host=localhost port=49420
2024-06-05 12:20:50.435 UTC [976920] [unknown] LOG: could not accept
SSL connection: EOF detected
2024-06-05 12:20:50.447 UTC [976922] [unknown] LOG: connection
received: host=localhost port=49430
2024-06-05 12:20:50.452 UTC [976922] [unknown] LOG: could not accept
SSL connection: tlsv1 alert unknown ca
2024-06-05 12:20:50.466 UTC [976933] [unknown] LOG: connection
received: host=localhost port=49440
2024-06-05 12:20:50.472 UTC [976933] [unknown] LOG: could not accept
SSL connection: tlsv1 alert unknown ca
2024-06-05 12:20:50.491 UTC [976943] [unknown] LOG: connection
received: host=localhost port=49448
2024-06-05 12:20:50.497 UTC [976943] [unknown] LOG: could not accept
SSL connection: tlsv1 alert unknown ca
2024-06-05 12:20:50.513 UTC [976969] [unknown] LOG: connection
received: host=localhost port=49464
2024-06-05 12:20:50.517 UTC [976969] [unknown] LOG: could not accept
SSL connection: tlsv1 alert unknown ca
2024-06-05 12:20:50.532 UTC [976971] [unknown] LOG: connection
received: host=localhost port=49468
I think I see what's going on here. It looks like it's because we start
the server in unix socket mode, and then switch to using TCP as well.
Can you try your test with this patch applied and see if the problem
persists? If we start in TCP mode the framework should test for a port
clash.
cheers
andrew
--
Andrew Dunstan
EDB: https://www.enterprisedb.com
diff --git a/src/test/ssl/t/001_ssltests.pl b/src/test/ssl/t/001_ssltests.pl
index b877327023..20ec7cb5fb 100644
--- a/src/test/ssl/t/001_ssltests.pl
+++ b/src/test/ssl/t/001_ssltests.pl
@@ -4,8 +4,9 @@
use strict;
use warnings FATAL => 'all';
use Config qw ( %Config );
-use PostgreSQL::Test::Cluster;
use PostgreSQL::Test::Utils;
+BEGIN { $PostgreSQL::Test::Utils::use_unix_sockets = 0; }
+use PostgreSQL::Test::Cluster;
use Test::More;
use FindBin;