Re: ssl tests fail due to TCP port conflict

Поиск
Список
Период
Сортировка
От Andrew Dunstan
Тема Re: ssl tests fail due to TCP port conflict
Дата
Msg-id 26d30bcc-87fa-4c00-9d88-056132bfb6eb@dunslane.net
обсуждение исходный текст
Ответ на Re: ssl tests fail due to TCP port conflict  (Andrew Dunstan <andrew@dunslane.net>)
Список pgsql-hackers
On 2024-06-05 We 14:10, Andrew Dunstan wrote:
>
> 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.
>
>
>

Hmm, on closer inspection we should have reserved the port anyway.  But 
why is the port "already used" on restart? We haven't previously opened 
a TCP connection on that port (except when checking if we can bind it), 
and instances should be locked against using that port.


  ... wanders away muttering and scratching head ...


cheers


andrew

--
Andrew Dunstan
EDB: https://www.enterprisedb.com




В списке pgsql-hackers по дате отправления:

Предыдущее
От: Greg Sabino Mullane
Дата:
Сообщение: Better error message when --single is not the first arg to postgres executable
Следующее
От: Nathan Bossart
Дата:
Сообщение: Re: Optimizing COPY with SIMD