How to scale up connectors? Can there be multiple of them?


(Zain Hasib) #1

Once my connector used up all the ports from 6000 to 6050, I started getting
{“name”:“Error”,“message”:“Not able to open port on remote Connector. Gave up after
5 attempts.”,“stack”:“Error: Not able to open port on remote Connector. Gave up after 5
attempts.\n at Object.openPortOnRandomConnector
service.js:38:11)\n at process._tickCallback (internal/process/next_tick.js:68:7)”}

(Luboš Krčál) #3

yes it is possible to have multiple Connector instances registered to a Controller. The simplest way to do so is to use iofogctl and deploy two connectors. This is a sample yaml specification from ioFog 1.3.0-beta release to be used with iofogctl deploy -f /tmp/spec.yaml:

    name: John
    surname: Doe
    password: mystrongpassword
    - name: ctrl
      kubeconfig: ~/.kube/config
  - name: one
    kubeconfig: ~/.kube/config
  - name: two
    kubeconfig: ~/.kube/config

The full specification is available at It also shows example of the step for deployment over SSH instead of using Kubernetes.

Note that is is also possible to deploy an extra connector by using iofogctl -n test deploy connector --help and using a subset of the yaml spec:

name: one
kubeconfig: ~/.kube/config

Comprehensive tutorial is available at

Please let us know if anything is unclear of not working as expected.

(Zain Hasib) #4

Alright, thanks, just one more thing, how do i completely remove a connector from a vm? Running iofogctl delete connector <connector-name> removes the connector however doesn’t remove the lock on ports that it had opened therefore i get the above mentioned error

(Luboš Krčál) #5

Deleting a connector using iofogctl delete connector <connector-name> should deregister the Connector from the Controller, stop the Connector daemon, which should cleanup all the connections and therefore release all the ports.

It is likely that the Connector is removed and stopped, but the error message from Controller you are getting means there are no Connectors available.

We have acknowledged this as a bug, due to the error message being confusing.

If you believe the Connector daemon has not stopped or the ports are being used on the VM, we will need more information. In that case, please tell us exactly how you deployed your ioFog, including the Controller and Connectors and which version of iofoctl (or other tools) you used. Also please let us know the output of iofogctl legacy controller <controller-name> connector list and the yaml files used to deploy your instance.