# BROKER enable fails

**URL:** <https://community.zeek.org/t/broker-enable-fails/4708>\
**Category:** Zeek\
**Created:** [March 7, 2017, 11:20am UTC](https://community.zeek.org/t/broker-enable-fails/4708 "2017-03-07T11:20:14Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![william\_de\_ping](https://avatars.discourse-cdn.com/v4/letter/w/b19c9b/32.png) [@william\_de\_ping](https://community.zeek.org/u/william_de_ping)\
**Post date:** [March 7, 2017, 11:20am UTC](https://community.zeek.org/t/broker-enable-fails/4708/1 "2017-03-07T11:20:14Z")

</div>

Hi all,

I’m trying to send my bro cluster some messages via pybroker.

On the bro side I run the a.bro script and I get the following error :

line 12: value used but not set (Broker::enable)  
line 13: value used but not set (Broker::listen)

Is there anything else I should load to get this script working ?

Any ideas about the source of the problem ?

here is a.bro :

@load base/frameworks/broker

module test;

```auto
const broker_port: port = 9999/tcp &redef;
redef exit_only_after_terminate = T;
redef Broker::endpoint_name = "listener";

event bro_init()
	{
	Broker::enable();
	Broker::listen(broker_port, "127.0.0.1");
	}

event Broker::incoming_connection_established(peer_name: string)
	{
	print "Broker::incoming_connection_established", peer_name;
	}

event Broker::incoming_connection_broken(peer_name: string)
	{
	print "Broker::incoming_connection_broken", peer_name;
	terminate();
	}

```

```auto
Thanks,

```

```auto
B

```

```auto

```

```auto

```

```auto

```

---

<div class="post-metadata">

**Author:** ![Jan](https://avatars.discourse-cdn.com/v4/letter/j/ce7236/32.png) [@Jan](https://community.zeek.org/u/Jan)\
**Post date:** [March 7, 2017, 1:13pm UTC](https://community.zeek.org/t/broker-enable-fails/4708/2 "2017-03-07T13:13:38Z")

</div>

> Hi all,
> 
> I'm trying to send my bro cluster some messages via pybroker.
> 
> On the bro side I run the a.bro script and I get the following error :  
> line 12: value used but not set (Broker::enable)  
> line 13: value used but not set (Broker::listen)
> 
> Is there anything else I should load to get this script working ?  
> Any ideas about the source of the problem ?
> 
> here is a.bro :
> 
> @load base/frameworks/broker
> 
> module test;
> 
> const broker\_port: port = 9999/tcp &redef;redef  
> exit\_only\_after\_terminate = T;redef Broker::endpoint\_name =  
> "listener";  
> event bro\_init()  
> &nbsp;&nbsp;{  
> &nbsp;&nbsp;Broker::enable();  
> &nbsp;&nbsp;Broker::listen(broker\_port, "127.0.0.1");  
> &nbsp;&nbsp;}  
> event Broker::incoming\_connection\_established(peer\_name: string)  
> &nbsp;&nbsp;{  
> &nbsp;&nbsp;print "Broker::incoming\_connection\_established", peer\_name;  
> &nbsp;&nbsp;}  
> event Broker::incoming\_connection\_broken(peer\_name: string)  
> &nbsp;&nbsp;{  
> &nbsp;&nbsp;print "Broker::incoming\_connection\_broken", peer\_name;  
> &nbsp;&nbsp;terminate();  
> &nbsp;&nbsp;}
> 
> Thanks,
> 
> B

Sounds like yesterday:  
[http://mailman.icsi.berkeley.edu/pipermail/bro/2017-March/011652.html](http://mailman.icsi.berkeley.edu/pipermail/bro/2017-March/011652.html)

---

<div class="post-metadata">

**Author:** ![william\_de\_ping](https://avatars.discourse-cdn.com/v4/letter/w/b19c9b/32.png) [@william\_de\_ping](https://community.zeek.org/u/william_de_ping)\
**Post date:** [March 7, 2017, 3:38pm UTC](https://community.zeek.org/t/broker-enable-fails/4708/3 "2017-03-07T15:38:00Z")

</div>

OK I can now send messages and it works 🙂 thanks

How do you implement it in a clustered environment ?

Every instance of bro (manager and workers) will try to listen to the same port I assume (because broctl will not start while a single bro instance does work)

Is there a way of updating a table in a cluster environment for only one bro instance (manager) and make sure it will be synchronized for instances in the cluster ?

Thanks

B

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/zeek/original/1X/f09d732bc2cc7c7cc7e35db67cf4e1d5233ce7a7.png) [@system](https://community.zeek.org/u/system)\
**Post date:** [May 6, 2022, 3:44pm UTC](https://community.zeek.org/t/broker-enable-fails/4708/4 "2022-05-06T15:44:42Z")

</div>


