[Xorp-users] error with XRLs
Pavlin Radoslavov
pavlin@icir.org
Thu, 03 Feb 2005 16:45:17 -0800
> > In your first email you said that you have declared inside your
> > bgp_beacon.hh file the variable
> >
> > EventLoop _eventloop;
> >
> > One thing that comes to mind is that you may have end-up with more
> > than one eventloop. Inside your program you cannot have more than
> > one. Hence, I'd recommend that you declare the eventloop inside the
> > main program, and then pass it as a reference to the BgpBeacon
> > constructor.
>
> I was only creating one instance of bgp_beacon, but I made the variable
> static just to be safe.
>
> > In your case it may be sufficient to add
> > a config statement like:
> >
> > protocols {
> > bgp_beacon {
> > }
> > }
>
> I did this and my program gets started right after the bgp module.
>
> I still get the error "XrlRouter failed. No Finder?" and then my module
> abnormally exits. Here is how I declare my XrlRouter:
>
> HEADER FILE:
> ------------
> XrlStdRouter *_xrl_router;
>
> SOURCE FILE:
> ------------
> in my ctor() I have the following two lines:
>
> _xrl_router = new XrlStdRouter(_eventloop, "bgp_beacon");
> wait_until_xrl_router_is_ready(_eventloop, *_xrl_router);
>
> I am under the impression that I am using the default finder host and
> finder port. Should I try specifying them?
You could, but I don't know whether it will make a difference.
In general, please have a look in
static_routes/xorp_static_routes.cc how it is done. It is relatively
short and simple, so comparing it against your code may show you
where the problem is. E.g., in the static_routes code, there is
another declaration right before wait_until_xrl_router_is_ready(),
and this declaration _has_ to be before
wait_until_xrl_router_is_ready(). See the code for details, and how
this declaration is related to the XrlStdRouter.
Regards,
Pavlin