diff options
author | shenjiatong <yshxxsjt715@gmail.com> | 2020-06-30 08:56:26 +0800 |
---|---|---|
committer | ushen <yshxxsjt715@gmail.com> | 2020-07-19 07:41:17 +0800 |
commit | 26e8bb4cc9097fddf3c2e34599b131e3f5d73867 (patch) | |
tree | 3adb6aeb68d1220fec4a0eeda512e4aae38926c2 /oslo_messaging | |
parent | c2074e47604199e9802520dbc4dfb54da778e090 (diff) | |
download | oslo-messaging-26e8bb4cc9097fddf3c2e34599b131e3f5d73867.tar.gz |
Catch ConnectionForced Exception
Occasionally I saw large number of connectionforced exceptions.
such exceptions cannot be healed automatically and requires a reboot.
catch it and ensure connection established.
Change-Id: I5c468d10230f05438df780e045f1e92662edf070
Closes-Bug: #1883038
Diffstat (limited to 'oslo_messaging')
-rw-r--r-- | oslo_messaging/_drivers/impl_rabbit.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/oslo_messaging/_drivers/impl_rabbit.py b/oslo_messaging/_drivers/impl_rabbit.py index c5c3970..161c37e 100644 --- a/oslo_messaging/_drivers/impl_rabbit.py +++ b/oslo_messaging/_drivers/impl_rabbit.py @@ -27,6 +27,7 @@ import time from urllib import parse import uuid +from amqp import exceptions as amqp_exec import kombu import kombu.connection import kombu.entity @@ -1010,7 +1011,8 @@ class Connection(object): except (socket.timeout, ConnectRefuseError, OSError, - kombu.exceptions.OperationalError) as exc: + kombu.exceptions.OperationalError, + amqp_exec.ConnectionForced) as exc: LOG.info("A recoverable connection/channel error " "occurred, trying to reconnect: %s", exc) self.ensure_connection() |