Configure Gossip Listener Port


#1

We are having an issue with sidecar deployments, because both applications are trying to start the gossip listener on the same port.

How can I configure the port that the gossip listener starts on, or disable the gossip listener in the plan.sh?


#2

@nealajpatel - I’m not sure if you are trying to load a supervisor service with it but typically the habitat supervisor service handles the gossip protocols. The individual packages/service do control the gossip for the supervisors… However from the supervisor side you can either set an environment variable for HAB_LISTEN_GOSSIP in this format 0.0.0.0:9638 or pass—listen-gossip` in the hab sup run with the same format as the environment variable.


#3

y_me_y is correct. Services don’t control the gossip listener, we don’t suggest running multiple supervisors on the same compute. The supervisor was designed to have multiple services running underneath it so there shouldn’t be a need to do anything like that.

Can you share what you’re trying to do that you’re running into this?


#4

Above is a diagram of our use case. We have a sidecar proxy and our existing application running in the same Openshift pod. Since the ports are shared between the apps in the pod, an “Address already in use” error occurs when one of the apps tries to deploy after the other already has.

Where can I configure the HAB_LISTEN_GOSSIP environment variable, or disable the supervisor from starting up on the sidecar proxy application?


#5

I think you should be able to use Env in the operator yaml to pass that value through (https://github.com/habitat-sh/habitat-operator/blob/master/pkg/apis/habitat/v1beta1/types.go#L68).


#6

I was able to configure the HAB_LISTEN_GOSSIP at runtime to be on a different port, and the issue was resolved.

Thanks for all the help!