New connections to staging rabbitmq fail if /etc/fedora-messaging/stg-cacert.pem is used as the CA cert as it seems to only use the first cert in the file #13422

Closed
opened 2026-06-20 10:17:45 +00:00 by adamwill · 2 comments
Member

Description of request

I woke up today and found all my consumers that listen on the staging bus were failing to connect to the server after a cron job that ran at 04:00 restarted them.

On further investigation, it seems like the /etc/fedora-messaging/stg-cacert.pem file, which I use as the ca_cert file in the messaging config (it's used for this in other configs as well, not just mine) contains both the "old" CA cert and the "new" CA cert (in relation to some kinda cert refresh @abompard is doing). rabbitmq seems to have been flipped over to using certs signed by the new CA cert yesterday(?). /etc/fedora-messaging/stg-cacert.pem comes from the fedora-messaging package.

If I create a /etc/fedora-messaging/stg-cacert-newonly.pem with only the new CA cert in it, change my consumer config to specify that file as the ca_cert, and restart the consumer, it works. So it seems like possibly fedora-messaging (or whatever exactly is implementing the connection from the client to the rabbitmq server) is only considering the first CA cert in the file? This kinda defeats the purpose of the 'combined' file unfortunately :(

### Description of request I woke up today and found all my consumers that listen on the staging bus were failing to connect to the server after a cron job that ran at 04:00 restarted them. On further investigation, it *seems* like the `/etc/fedora-messaging/stg-cacert.pem` file, which I use as the `ca_cert` file in the messaging config (it's used for this in other configs as well, not just mine) contains both the "old" CA cert and the "new" CA cert (in relation to some kinda cert refresh @abompard is doing). rabbitmq seems to have been flipped over to using certs signed by the new CA cert yesterday(?). `/etc/fedora-messaging/stg-cacert.pem` comes from the fedora-messaging package. If I create a `/etc/fedora-messaging/stg-cacert-newonly.pem` with *only* the new CA cert in it, change my consumer config to specify *that* file as the `ca_cert`, and restart the consumer, it works. So it seems like possibly fedora-messaging (or whatever exactly is implementing the connection from the client to the rabbitmq server) is only considering the *first* CA cert in the file? This kinda defeats the purpose of the 'combined' file unfortunately :(
Author
Member

It looks like resultsdb staging is running into this too now:

[Mon Jun 22 08:32:55.319564 2026] [wsgi:error] [pid 4:tid 50] [2026-06-22 08:32:55] [4] [ERROR] pika.adapters.twisted_connection: connection_lost: Error([('SSL routines', '', 'certificate verify failed')])

and it's constantly failing to publish messages:

[Mon Jun 22 08:45:55.552606 2026] [wsgi:error] [pid 4:tid 36] [remote 10.128.2.2:52016] [2026-06-22 08:45:55,552] DEBUG in common: Preparing to publish message for result id 7190812
[Mon Jun 22 08:46:25.554024 2026] [wsgi:error] [pid 4:tid 36] [remote 10.128.2.2:52016] [2026-06-22 08:46:25,553] ERROR in messaging: Timeout publishing message a154b0a6-c826-4fe0-b2e3-f57a141d4d60
[Mon Jun 22 08:46:25.554054 2026] [wsgi:error] [pid 4:tid 36] [remote 10.128.2.2:52016] [2026-06-22 08:46:25] [4] [ERROR] resultsdb.messaging: Timeout publishing message a154b0a6-c826-4fe0-b2e3-f57a141d4d60
[Mon Jun 22 08:46:25.557238 2026] [wsgi:error] [pid 4:tid 38] [remote 10.131.0.2:39756] [2026-06-22 08:46:25,557] DEBUG in common: Preparing to publish message for result id 7190813
[Mon Jun 22 08:46:55.558749 2026] [wsgi:error] [pid 4:tid 38] [remote 10.131.0.2:39756] [2026-06-22 08:46:55,558] ERROR in messaging: Timeout publishing message 097805b3-a077-4082-9154-de97ebc2de25
[Mon Jun 22 08:46:55.558831 2026] [wsgi:error] [pid 4:tid 38] [remote 10.131.0.2:39756] [2026-06-22 08:46:55] [4] [ERROR] resultsdb.messaging: Timeout publishing message 097805b3-a077-4082-9154-de97ebc2de25

etc etc. I rsh'ed into the pod and sure enough the configured fedora-messaging CA cert is the combined one. Should I twiddle it to use the single CA cert or shall I leave it to you @abompard ?

It looks like resultsdb staging is running into this too now: ``` [Mon Jun 22 08:32:55.319564 2026] [wsgi:error] [pid 4:tid 50] [2026-06-22 08:32:55] [4] [ERROR] pika.adapters.twisted_connection: connection_lost: Error([('SSL routines', '', 'certificate verify failed')]) ``` and it's constantly failing to publish messages: ``` [Mon Jun 22 08:45:55.552606 2026] [wsgi:error] [pid 4:tid 36] [remote 10.128.2.2:52016] [2026-06-22 08:45:55,552] DEBUG in common: Preparing to publish message for result id 7190812 [Mon Jun 22 08:46:25.554024 2026] [wsgi:error] [pid 4:tid 36] [remote 10.128.2.2:52016] [2026-06-22 08:46:25,553] ERROR in messaging: Timeout publishing message a154b0a6-c826-4fe0-b2e3-f57a141d4d60 [Mon Jun 22 08:46:25.554054 2026] [wsgi:error] [pid 4:tid 36] [remote 10.128.2.2:52016] [2026-06-22 08:46:25] [4] [ERROR] resultsdb.messaging: Timeout publishing message a154b0a6-c826-4fe0-b2e3-f57a141d4d60 [Mon Jun 22 08:46:25.557238 2026] [wsgi:error] [pid 4:tid 38] [remote 10.131.0.2:39756] [2026-06-22 08:46:25,557] DEBUG in common: Preparing to publish message for result id 7190813 [Mon Jun 22 08:46:55.558749 2026] [wsgi:error] [pid 4:tid 38] [remote 10.131.0.2:39756] [2026-06-22 08:46:55,558] ERROR in messaging: Timeout publishing message 097805b3-a077-4082-9154-de97ebc2de25 [Mon Jun 22 08:46:55.558831 2026] [wsgi:error] [pid 4:tid 38] [remote 10.131.0.2:39756] [2026-06-22 08:46:55] [4] [ERROR] resultsdb.messaging: Timeout publishing message 097805b3-a077-4082-9154-de97ebc2de25 ``` etc etc. I rsh'ed into the pod and sure enough the configured fedora-messaging CA cert is the combined one. Should I twiddle it to use the single CA cert or shall I leave it to you @abompard ?
Member

I've fixed the issue in the fedora-messaging library, released a new version and built RPMs. I've restored the old RabbitMQ server certficates until the fedora-messaging update is wildly adopted and we can switch the server certs again.

Thanks a lot for the detailed report, it helped a great deal.

I've fixed the issue in the fedora-messaging library, released a new version and built RPMs. I've restored the old RabbitMQ server certficates until the fedora-messaging update is wildly adopted and we can switch the server certs again. Thanks a lot for the detailed report, it helped a great deal.
Sign in to join this conversation.
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
infra/tickets#13422
No description provided.