MD-Studio / MDStudio

A general framework for microservice based distributed applications
Apache License 2.0
12 stars 0 forks source link

Crossbar container can't communicate with redis #111

Closed felipeZ closed 6 years ago

felipeZ commented 6 years ago

I'm getting the following error in an non-determistic way:

2018-03-13T16:35:14+0000 [Router         21] Collecting logs on session "AuthComponent"
2018-03-13T16:35:14+0000 [Router         21] started component: lie_auth.application.AuthComponent id=313211996382929
2018-03-13T16:35:14+0000 [Router         21] AuthComponent is waiting for ['db', 'schema']
2018-03-13T16:35:14+0000 [Controller      8] Router "worker-001": component 'component-001' started
2018-03-13T16:35:15+0000 [Router         21] Component instantiation failed
Traceback (most recent call last):
..................................
  File "/root/.local/share/virtualenvs/app-4PlAip0Q/lib/python3.6/site-packages/redis/client.py", line 715, in config_get
    return self.execute_command('CONFIG GET', pattern)
  File "/root/.local/share/virtualenvs/app-4PlAip0Q/lib/python3.6/site-packages/redis/client.py", line 673, in execute_command
    connection.send_command(*args)
  File "/root/.local/share/virtualenvs/app-4PlAip0Q/lib/python3.6/site-packages/redis/connection.py", line 610, in send_command
    self.send_packed_command(self.pack_command(*args))
  File "/root/.local/share/virtualenvs/app-4PlAip0Q/lib/python3.6/site-packages/redis/connection.py", line 585, in send_packed_command
    self.connect()
  File "/root/.local/share/virtualenvs/app-4PlAip0Q/lib/python3.6/site-packages/redis/connection.py", line 489, in connect
    raise ConnectionError(self._error_message(e))
redis.exceptions.ConnectionError: Error 111 connecting to 127.0.0.1:7001. Connection refused.
2018-03-13T16:35:15+0000 [Controller      8] wamp.error.runtime_error: Error 111 connecting to 127.0.0.1:7001. Connection refused.
2018-03-13T16:35:15+0000 [Controller      8] sending TERM to subprocess 21
2018-03-13T16:35:15+0000 [Controller      8] waiting for 21 to exit...
felipeZ commented 6 years ago

With non-deterministic I mean that sometimes the service starts and others it just give the previous error

felipeZ commented 6 years ago

some other times I get:

2018-03-14T11:38:03+0100 Traceback (most recent call last):
Failure: autobahn.wamp.exception.ApplicationError: ApplicationError(error=<wamp.error.not_authorized>, args=["session is not authorized to register procedure 'mdgroup.lie_md.endpoint.liemd'"], kwargs={}, enc_algo=None)

Even though I have defined the env variable MD_CONFIG_ENVIRONMENTS=dev,docker and I have previously authenticated successfully in the same shell session

felipeZ commented 6 years ago

If I stop and restart the containers I get the same error, the application only starts normally from time to time

pevisscher commented 6 years ago

Due to a nasty little host binding bug https://github.com/Grokzen/redis-py-cluster/issues/241 we had to remove the redis cluster image and use the redis-local configuration.