You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have been working on getting Fogify to work on an ubuntu virtual image running in Vagrant. When attempting to deploy a topology, I was getting the following error from the controller
controller_1 | During handling of the above exception, another exception occurred:
controller_1 |
controller_1 | Traceback (most recent call last):
controller_1 | File "/usr/local/lib/python3.7/site-packages/flask/app.py", line 1950, in full_dispatch_request
controller_1 | rv = self.dispatch_request()
controller_1 | File "/usr/local/lib/python3.7/site-packages/flask/app.py", line 1936, in dispatch_request
controller_1 | return self.view_functions[rule.endpoint](**req.view_args)
controller_1 | File "/usr/local/lib/python3.7/site-packages/flask/views.py", line 89, in view
controller_1 | return self.dispatch_request(*args, **kwargs)
controller_1 | File "/usr/local/lib/python3.7/site-packages/flask/views.py", line 163, in dispatch_request
controller_1 | return meth(*args, **kwargs)
controller_1 | File "/code/fogify/controller/views.py", line 277, in post
controller_1 | res.append(Communicator(get_connector()).agents__perform_action(commands, instance_type=instance_type))
controller_1 | File "/code/fogify/utils/inter_communication.py", line 50, in agents__perform_action
controller_1 | File "/usr/local/lib/python3.7/site-packages/requests/api.py", line 119, in post
controller_1 | return request('post', url, data=data, json=json, **kwargs)
controller_1 | File "/usr/local/lib/python3.7/site-packages/requests/api.py", line 61, in request
controller_1 | return session.request(method=method, url=url, **kwargs)
controller_1 | File "/usr/local/lib/python3.7/site-packages/requests/sessions.py", line 542, in request
controller_1 | resp = self.send(prep, **send_kwargs)
controller_1 | File "/usr/local/lib/python3.7/site-packages/requests/sessions.py", line 655, in send
controller_1 | r = adapter.send(request, **kwargs)
controller_1 | File "/usr/local/lib/python3.7/site-packages/requests/adapters.py", line 516, in send
controller_1 | raise ConnectionError(e, request=request)
controller_1 | requests.exceptions.ConnectionError: HTTPConnectionPool(host='0.0.0.0', port=5500): Max retries exceeded with url: /actions/ (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f51bc61f910>: Failed to establish a new connection: [Errno 111] Connection refused'))
I tracked it down to the utils/Communicator class. It looks like agents__perform_action defaults to 0.0.0.0 for the address of the agents if everything is hosted on one machine. I think this should be changed to agent so that the internal docker DNS can resolve the URL properly. In vagrant, 0.0.0.0 doesn't work as the virtual machine adopts a different host IP (not 100% sure how it works). Anyway, my fix was to check if socket.gethostbyname(i) returns 0.0.0.0. If so, the host name is changed to agent.
Let me know if there are any questions, this issue is probably more confusing than the others
--Tom Ebergen
The text was updated successfully, but these errors were encountered:
Hi,
I have been working on getting Fogify to work on an ubuntu virtual image running in Vagrant. When attempting to deploy a topology, I was getting the following error from the controller
I tracked it down to the utils/Communicator class. It looks like
agents__perform_action
defaults to0.0.0.0
for the address of the agents if everything is hosted on one machine. I think this should be changed toagent
so that the internal docker DNS can resolve the URL properly. In vagrant,0.0.0.0
doesn't work as the virtual machine adopts a different host IP (not 100% sure how it works). Anyway, my fix was to check ifsocket.gethostbyname(i)
returns0.0.0.0
. If so, the host name is changed toagent
.Let me know if there are any questions, this issue is probably more confusing than the others
--Tom Ebergen
The text was updated successfully, but these errors were encountered: