Re: ssl tests fail due to TCP port conflict - Mailing list pgsql-hackers

From Andrew Dunstan
Subject Re: ssl tests fail due to TCP port conflict
Date
Msg-id 6756fb60-aa5f-442c-90fb-5f29cd1658f0@dunslane.net
Whole thread Raw
In response to ssl tests fail due to TCP port conflict  (Alexander Lakhin <exclusion@gmail.com>)
Responses Re: ssl tests fail due to TCP port conflict
Re: ssl tests fail due to TCP port conflict
List pgsql-hackers
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

Attachment

pgsql-hackers by date:

Previous
From: Joe Conway
Date:
Subject: question regarding policy for patches to out-of-support branches
Next
From: Noah Misch
Date:
Subject: Re: race condition in pg_class