Run service -f debugging?

Installed mdns-repeater and according to the files it is possible to output a debug log:

	procd_set_param command $PROG -f $interfaces
	# -f generates a lot of debug output
	# no forwarding of stderr to logs
	procd_set_param file /etc/config/mdns_repeater

I tried stopping the service with service mdns-repeater stop and start with service mdns-repeater start -f but I get no output at all.

Is it meant to be started with the flag -f from the config file?

The config file looks like this:

config mdns_repeater 'main'
	list interface 'br-lan'
	list interface 'br-guest'

How do I debug this?
It is working for me most of the time, but sometimes it stops repeating the mdns for no reason?

Try this:

service mdns-repeater stop
/usr/sbin/mdns-repeater -f br-lan br-guest 2>/tmp/mdns.log &

The debug info should be collected in /tmp/mdns.log

This does seem to work, and it starts logging live in Putty/SSH, but it did only create these two entries in the log:

mdns-repeater: dev br-lan addr 192.168.1.1 mask 255.255.255.0 net 192.168.1.0
mdns-repeater: dev br-guest addr 192.168.3.1 mask 255.255.255.0 net 192.168.3.0

From Putty it is logging live, and looks like this:

data from=192.168.1.34 size=370
repeating data to br-guest
data from=192.168.1.34 size=369
repeating data to br-guest
data from=192.168.1.34 size=80
repeating data to br-guest
data from=192.168.1.34 size=60
repeating data to br-guest
data from=192.168.1.34 size=40
repeating data to br-guest
data from=192.168.1.34 size=358
repeating data to br-guest
data from=192.168.1.34 size=370
repeating data to br-guest
data from=192.168.1.34 size=369
repeating data to br-guest
data from=192.168.1.30 size=338
repeating data to br-guest
data from=192.168.1.30 size=338
repeating data to br-guest
data from=192.168.1.32 size=332
repeating data to br-guest
data from=192.168.1.32 size=147
repeating data to br-guest
data from=192.168.1.32 size=70
repeating data to br-guest
data from=192.168.1.32 size=332
repeating data to br-guest
data from=192.168.1.36 size=354
repeating data to br-guest
data from=192.168.1.36 size=354
repeating data to br-guest
data from=192.168.1.35 size=355
repeating data to br-guest
data from=192.168.1.35 size=355
repeating data to br-guest
data from=192.168.1.32 size=51
repeating data to br-guest
data from=192.168.1.60 size=553
repeating data to br-guest

Is there some way to log this in the background to the file, hard to keep Putty running all the time?

the 2 in 2>/tmp/mdns.log means only redirecting the errors.

If you want to redirect also standard output then use

/usr/sbin/mdns-repeater -f br-lan br-guest >/dev/null 2>&1 &

Do not forget the & as last character which puts the script in the background

2 Likes

Thank you! I have run it like this for 24 hours, I also noticed that for a while the mDNS was not forwarded (I could not reach it from the Guest Wifi), then it came back.
Sadly there are nothing in the error log for this.

I have no idea if this has anything to do with it, but I had to change my MTU-size in my guest wifi to 1496 to accomodate the 4 byte VLAN tag.

config interface 'eth0'
	option ifname 'eth0'
	option mtu '1496'

Maybe this has nothing to do with it?

But this doesn't output to the /temp/mdns.log file?

Sorry my bad, copy paste error :frowning:
Try this:
/usr/sbin/mdns-repeater -f br-lan br-guest >/tmp/mdns.log 2>&1 &

That works! Thank you. Problem is that there is no time stamp, and the log only contains this info:

data from=192.168.1.34 size=370
repeating data to br-guest
data from=192.168.1.34 size=369
repeating data to br-guest
data from=192.168.1.34 size=80
repeating data to br-guest
data from=192.168.1.34 size=60
repeating data to br-guest
data from=192.168.1.34 size=40
repeating data to br-guest
data from=192.168.1.34 size=358
repeating data to br-guest
data from=192.168.1.34 size=370
repeating data to br-guest
data from=192.168.1.34 size=369
repeating data to br-guest
data from=192.168.1.30 size=338
repeating data to br-guest
data from=192.168.1.30 size=338
repeating data to br-guest
data from=192.168.1.32 size=332
repeating data to br-guest
data from=192.168.1.32 size=147
repeating data to br-guest
data from=192.168.1.32 size=70
repeating data to br-guest
data from=192.168.1.32 size=332
repeating data to br-guest
data from=192.168.1.36 size=354
repeating data to br-guest
data from=192.168.1.36 size=354
repeating data to br-guest
data from=192.168.1.35 size=355
repeating data to br-guest
data from=192.168.1.35 size=355
repeating data to br-guest
data from=192.168.1.32 size=51
repeating data to br-guest
data from=192.168.1.60 size=553
repeating data to br-guest

That does not help me find the root cause :frowning:
What do you think about the MTU size?

How do I stop a service which is started this way?

service mdns-repeater stop

Does nothing when it is started with the command you provided. Thanks!

Try from commandline (SSH)
killall mdns-repeater

other wise try:
kill $(pidof mdns-repeater)