Eu tenho a imagem Boot2Docker em execução em VirtualBox
no meu mac. Eu uso o Kitematic para executar docker
no meu Mac.
Eu tenho activemq
docker em execução na porta 32769
in boot2docker
vm. Eu tenho o aplicativo em execução que se conecta a activemq
na porta 32769
.
Meu aplicativo aleatoriamente dá erro como abaixo.
[INFO] stompest.async.listener: Disconnected: Connection to the other side was lost in a non-clean fashion.
[ERROR] stompest.async.listener: Disconnect failure: Unexpected connection loss [Connection to the other side was lost in a non-clean fashion.]
[INFO] stompest.async.protocol: Connecting to 10.4.252.37:61613 ...
[-] Starting factory <stompest.async.protocol.StompFactory instance at 0x231afc8>
[WARNING] stompest.async.protocol: Could not connect to 10.4.252.37:61613 [Connection was refused by other side: 111: Connection refused.]
[INFO] stompest.async.protocol: Delaying connect attempt for 10 ms
[Uninitialized] Stopping factory <stompest.async.protocol.StompFactory instance at 0x117e6c8>
[INFO] stompest.async.protocol: Connecting to 192.168.99.100:32769 ...
[-] Starting factory <stompest.async.protocol.StompFactory instance at 0x7f8ca428ec68>
[-] Unhandled error in Deferred:
2016-05-31 10:12:20+0000 [-] Unhandled Error
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/twisted/internet/defer.py", line 1128, in _inlineCallbacks
File "/usr/local/lib/python2.7/dist-packages/stompest-2.1.2-py2.7.egg/stompest/util/__init__.py", line 16, in __checkattr
File "/usr/local/lib/python2.7/dist-packages/twisted/internet/defer.py", line 1274, in unwindGenerator
--- <exception caught here> ---
File "/usr/local/lib/python2.7/dist-packages/twisted/internet/defer.py", line 1128, in _inlineCallbacks
File "/usr/local/lib/python2.7/dist-packages/stompest.async-2.1.1-py2.7.egg/stompest/async/client.py", line 275, in subscribe
File "/usr/local/lib/python2.7/dist-packages/stompest-2.1.2-py2.7.egg/stompest/protocol/session.py", line 125, in subscribe
stompest.error.StompProtocolError: Already subscribed [id=test]
Para reproduzir isso, eu tenho que bloquear a porta 32769
e desbloquear novamente, então stompest
tentará se conectar novamente e crie o mesmo erro.
Eu verifico ifconfig
em boot2docker
vm, mas cria aleatoriamente a porta.
Existe alguma maneira de bloquear a porta e desbloquear novamente?
Tags networking python docker