Search code examples
volttron

Volttron platform not accepting IP address during set up


I'm trying to get the matlab agent in Linux connected to the standalone agent in Windows. I start by setting up a platform (using vcfg) on Volttron. However, I get this error when I try to define an IP address and port on the volttron instance:

What is the vip address? [tcp://127.0.0.1]: tcp://192.168.56.101 What is the port for the vip address? [22916]:

ERROR: That address has already been bound to. What is the vip address? [tcp://192.168.56.101]: tcp://192.168.56.155 What is the port for the vip address? [22916]: ERROR: That address has already been bound to.

No matter the address I give, it says it has already been bound to. I removed the .volttron directory that contains the known_hosts, etc. but to no avail. The only IP address that seems to work is 127.0.0.2. However with that the standalone agent does not connect to the Volttron platform. I added the authentication credentials of the standalone agent in volttron and made sure the keys were correctly configured. This is all that I get:

2019-08-08 10:24:16,059 volttron.platform.vip.agent.core DEBUG: identity: standalone_matlab
2019-08-08 10:24:16,059 volttron.platform.vip.agent.core DEBUG: agent_uuid: None
2019-08-08 10:24:16,059 volttron.platform.vip.agent.core DEBUG: serverkey: None
2019-08-08 10:24:16,069 volttron.platform.vip.agent.core DEBUG: AGENT RUNNING on ZMQ Core standalone_matlab
2019-08-08 10:24:16,072 volttron.platform.vip.zmq_connection DEBUG: ZMQ connection standalone_matlab

After a while, it times out:

2019-08-08 10:25:14,540 volttron.platform.vip.zmq_connection DEBUG: ********************************************************************
2019-08-08 10:25:14,542 volttron.platform.vip.zmq_connection DEBUG: Closing connection to ZMQ: standalone_matlab
2019-08-08 10:25:14,542 volttron.platform.vip.zmq_connection DEBUG: ********************************************************************

I am missing this line which indicates that a connection has been made.

volttron.platform.vip.agent.core INFO: Connected to platform: router: ebae9efa-5e8f-49e3-95a0-2020ddff9e8a version: 1.0 identity: standalone_matlab

Also, I already set my network adapter to host-only. Can someone please help me know what I'm doing wrong?


Solution

  • I finally figured out what the problem was. It was a ZMQ issue. ZMQ was refusing to bind to the address that I was giving to the wizard. It threw up this error:

    Traceback (most recent call last): File "", line 1, in File "zmq/backend/cython/socket.pyx", line 495, in zmq.backend.cython.socket.Socket.bind (zmq/backend/cython/socket.c:5327) File "zmq/backend/cython/checkrc.pxd", line 25, in zmq.backend.cython.checkrc._check_rc (zmq/backend/cython/socket.c:9542) zmq.error.ZMQError: Cannot assign requested address

    The fix was simply to do "ifconfig" and find the IP address that was assigned to my Linux system and provide that to the wizard.