Skip to content

Dropped mdns results #47

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
davidrenne opened this issue Dec 20, 2018 · 3 comments
Closed

Dropped mdns results #47

davidrenne opened this issue Dec 20, 2018 · 3 comments

Comments

@davidrenne
Copy link

The latest package for us is always giving us inconsistent results from our devices.

Whereas this package:

https://github.com/hashicorp/mdns

This works every single time.

For anyone reading this, I would just choose to use hashicorp's library over this library until this is fixed. I dont mind recompiling a new build and re-running on my mdns devices shown here. Essentially I should get 5 unique models of omnistream shown which hashicorp's library consistently returns 5 items for us.

Here are my logs:

$ go run mdnsDiscover.go 


192.168.1.202 velocity.local.
192.168.1.252 model=at-omni-121
192.168.1.232 model=at-omni-521

192.168.1.253 model=at-omni-111
192.168.1.248 model=at-omni-122







Davids-MacBook-Pro:Downloads davidrenne$ 
Davids-MacBook-Pro:Downloads davidrenne$ 
Davids-MacBook-Pro:Downloads davidrenne$ 
Davids-MacBook-Pro:Downloads davidrenne$ 
Davids-MacBook-Pro:Downloads davidrenne$ 
Davids-MacBook-Pro:Downloads davidrenne$ 
Davids-MacBook-Pro:Downloads davidrenne$ 
Davids-MacBook-Pro:Downloads davidrenne$ 
Davids-MacBook-Pro:Downloads davidrenne$ 
Davids-MacBook-Pro:Downloads davidrenne$ 
Davids-MacBook-Pro:Downloads davidrenne$ 
Davids-MacBook-Pro:Downloads davidrenne$ go run mdnsDiscover.go 
192.168.1.202 velocity.local.
192.168.1.232 model=at-omni-521
192.168.1.230 model=at-omni-512
192.168.1.253 model=at-omni-111



Davids-MacBook-Pro:Downloads davidrenne$ 
Davids-MacBook-Pro:Downloads davidrenne$ 
Davids-MacBook-Pro:Downloads davidrenne$ 
Davids-MacBook-Pro:Downloads davidrenne$ go run mdnsDiscover.go 
192.168.1.202 velocity.local.
192.168.1.232 model=at-omni-521
192.168.1.230 model=at-omni-512
192.168.1.253 model=at-omni-111

Davids-MacBook-Pro:Downloads davidrenne$ 
Davids-MacBook-Pro:Downloads davidrenne$ go run mdnsDiscover.go 
192.168.1.202 velocity.local.
192.168.1.232 model=at-omni-521
192.168.1.253 model=at-omni-111
192.168.1.230 model=at-omni-512
Davids-MacBook-Pro:Downloads davidrenne$ go run mdnsDiscover.go 
192.168.1.202 velocity.local.
192.168.1.230 model=at-omni-512
192.168.1.252 model=at-omni-121
192.168.1.232 model=at-omni-521
192.168.1.253 model=at-omni-111
192.168.1.248 model=at-omni-122
Davids-MacBook-Pro:Downloads davidrenne$ 
Davids-MacBook-Pro:Downloads davidrenne$ go run mdnsDiscover.go 
192.168.1.202 velocity.local.
192.168.1.252 model=at-omni-121
192.168.1.232 model=at-omni-521
192.168.1.253 model=at-omni-111
192.168.1.248 model=at-omni-122
192.168.1.230 model=at-omni-512


Davids-MacBook-Pro:Downloads davidrenne$ 
Davids-MacBook-Pro:Downloads davidrenne$ 
Davids-MacBook-Pro:Downloads davidrenne$ go run mdnsDiscover.go 
192.168.1.202 velocity.local.
192.168.1.252 model=at-omni-121
192.168.1.232 model=at-omni-521
192.168.1.230 model=at-omni-512
192.168.1.248 model=at-omni-122
192.168.1.253 model=at-omni-111

Davids-MacBook-Pro:Downloads davidrenne$ 
Davids-MacBook-Pro:Downloads davidrenne$ go run mdnsDiscover.go 
192.168.1.202 velocity.local.
192.168.1.252 model=at-omni-121
192.168.1.232 model=at-omni-521
192.168.1.248 model=at-omni-122
192.168.1.253 model=at-omni-111
Davids-MacBook-Pro:Downloads davidrenne$ go run mdnsDiscover.go 
192.168.1.202 velocity.local.
192.168.1.230 model=at-omni-512
192.168.1.248 model=at-omni-122
192.168.1.232 model=at-omni-521
192.168.1.253 model=at-omni-111
192.168.1.252 model=at-omni-121

Davids-MacBook-Pro:Downloads davidrenne$ 
Davids-MacBook-Pro:Downloads davidrenne$ go run mdnsDiscover.go 
192.168.1.202 velocity.local.
192.168.1.230 model=at-omni-512
192.168.1.232 model=at-omni-521
192.168.1.253 model=at-omni-111



Davids-MacBook-Pro:Downloads davidrenne$ 
Davids-MacBook-Pro:Downloads davidrenne$ 
Davids-MacBook-Pro:Downloads davidrenne$ 
Davids-MacBook-Pro:Downloads davidrenne$ 
Davids-MacBook-Pro:Downloads davidrenne$ 
Davids-MacBook-Pro:Downloads davidrenne$ go run mdnsDiscover.go 
192.168.1.202 velocity.local.
192.168.1.230 model=at-omni-512
192.168.1.248 model=at-omni-122
192.168.1.232 model=at-omni-521
192.168.1.252 model=at-omni-121
Davids-MacBook-Pro:Downloads davidrenne$ go get github.com/hashicorp/mdns
Davids-MacBook-Pro:Downloads davidrenne$ vim mdnsDiscover.go 
Davids-MacBook-Pro:Downloads davidrenne$ go run mdnsDiscover.go 
# command-line-arguments
./mdnsDiscover.go:12:9: undefined: fmt
Davids-MacBook-Pro:Downloads davidrenne$ vim mdnsDiscover.go 
Davids-MacBook-Pro:Downloads davidrenne$ go run mdnsDiscover.go 
2018/12/20 15:52:21 [ERR] mdns: Failed to bind to udp6 port: listen udp6 [ff02::fb]:5353: setsockopt: can't assign requested address
Got new entry: &{at-omni-122-00487._ajows._tcp.local. at-omni-122-00487.local. 192.168.1.248 <nil> 80 txtvers=1|ws=/wsapp/|model=at-omni-122|uniqueID=at-omni-122-00487 [txtvers=1 ws=/wsapp/ model=at-omni-122 uniqueID=at-omni-122-00487] 192.168.1.248 true true}
Got new entry: &{at-omni-121-00706._ajows._tcp.local. at-omni-121-00706.local. 192.168.1.252 <nil> 80 txtvers=1|ws=/wsapp/|model=at-omni-121|uniqueID=at-omni-121-00706 [txtvers=1 ws=/wsapp/ model=at-omni-121 uniqueID=at-omni-121-00706] 192.168.1.252 true true}
Got new entry: &{at-omni-512-00010._ajows._tcp.local. at-omni-512-00010.local. 192.168.1.230 <nil> 80 txtvers=1|ws=/wsapp/|model=at-omni-512|uniqueID=at-omni-512-00010 [txtvers=1 ws=/wsapp/ model=at-omni-512 uniqueID=at-omni-512-00010] 192.168.1.230 true true}
Got new entry: &{at-omni-111-00459._ajows._tcp.local. at-omni-111-00459.local. 192.168.1.253 <nil> 80 txtvers=1|ws=/wsapp/|model=at-omni-111|uniqueID=at-omni-111-00459 [txtvers=1 ws=/wsapp/ model=at-omni-111 uniqueID=at-omni-111-00459] 192.168.1.253 true true}
Got new entry: &{at-omni-521-00046._ajows._tcp.local. at-omni-521-00046.local. 192.168.1.232 <nil> 80 txtvers=1|ws=/wsapp/|model=at-omni-521|uniqueID=at-omni-521-00046 [txtvers=1 ws=/wsapp/ model=at-omni-521 uniqueID=at-omni-521-00046] 192.168.1.232 true true}
Got new entry: &{ATL-UHD-CLSO-824._ahttp._tcp.local. ATL-UHD-CLSO-824.local. 192.168.1.99 <nil> 80  [] 192.168.1.99 true true}
2018/12/20 15:52:22 [INFO] mdns: Closing client {0xc42000e030 0xc42000e038 0xc42000e040 <nil> true 0xc42008a1e0 {1 0}}
2018/12/20 15:52:22 [ERR] mdns: Failed to read packet: read udp4 0.0.0.0:61268: use of closed network connection
2018/12/20 15:52:22 [ERR] mdns: Failed to read packet: read udp4 0.0.0.0:5353: use of closed network connection
Davids-MacBook-Pro:Downloads davidrenne$ go run mdnsDiscover.go 
2018/12/20 15:52:41 [ERR] mdns: Failed to bind to udp6 port: listen udp6 [ff02::fb]:5353: setsockopt: can't assign requested address
Got new entry: &{at-omni-111-00459._ajows._tcp.local. at-omni-111-00459.local. 192.168.1.253 <nil> 80 txtvers=1|ws=/wsapp/|model=at-omni-111|uniqueID=at-omni-111-00459 [txtvers=1 ws=/wsapp/ model=at-omni-111 uniqueID=at-omni-111-00459] 192.168.1.253 true true}
Got new entry: &{at-omni-122-00487._ajows._tcp.local. at-omni-122-00487.local. 192.168.1.248 <nil> 80 txtvers=1|ws=/wsapp/|model=at-omni-122|uniqueID=at-omni-122-00487 [txtvers=1 ws=/wsapp/ model=at-omni-122 uniqueID=at-omni-122-00487] 192.168.1.248 true true}
Got new entry: &{at-omni-521-00046._ajows._tcp.local. at-omni-521-00046.local. 192.168.1.232 <nil> 80 txtvers=1|ws=/wsapp/|model=at-omni-521|uniqueID=at-omni-521-00046 [txtvers=1 ws=/wsapp/ model=at-omni-521 uniqueID=at-omni-521-00046] 192.168.1.232 true true}
Got new entry: &{at-omni-121-00706._ajows._tcp.local. at-omni-121-00706.local. 192.168.1.252 <nil> 80 txtvers=1|ws=/wsapp/|model=at-omni-121|uniqueID=at-omni-121-00706 [txtvers=1 ws=/wsapp/ model=at-omni-121 uniqueID=at-omni-121-00706] 192.168.1.252 true true}
Got new entry: &{at-omni-512-00010._ajows._tcp.local. at-omni-512-00010.local. 192.168.1.230 <nil> 80 txtvers=1|ws=/wsapp/|model=at-omni-512|uniqueID=at-omni-512-00010 [txtvers=1 ws=/wsapp/ model=at-omni-512 uniqueID=at-omni-512-00010] 192.168.1.230 true true}
Got new entry: &{VelocityGateway._ajows._tcp.local. velocity.local. 192.168.1.202 <nil> 42424 txtv=0|lo=1|la=2 [txtv=0 lo=1 la=2] 192.168.1.202 true true}
Got new entry: &{ATL-UHD-CLSO-824._ahttp._tcp.local. ATL-UHD-CLSO-824.local. 192.168.1.99 <nil> 80  [] 192.168.1.99 true true}
2018/12/20 15:52:42 [INFO] mdns: Closing client {0xc42000e030 0xc42000e038 0xc42000e040 <nil> true 0xc42008a1e0 {1 0}}
2018/12/20 15:52:42 [ERR] mdns: Failed to read packet: read udp4 0.0.0.0:63117: use of closed network connection
2018/12/20 15:52:42 [ERR] mdns: Failed to read packet: read udp6 [::]:63118: use of closed network connection
2018/12/20 15:52:42 [ERR] mdns: Failed to read packet: read udp4 0.0.0.0:5353: use of closed network connection
Davids-MacBook-Pro:Downloads davidrenne$ go run mdnsDiscover.go 
2018/12/20 15:52:47 [ERR] mdns: Failed to bind to udp6 port: listen udp6 [ff02::fb]:5353: setsockopt: can't assign requested address
Got new entry: &{at-omni-121-00706._ajows._tcp.local. at-omni-121-00706.local. 192.168.1.252 <nil> 80 txtvers=1|ws=/wsapp/|model=at-omni-121|uniqueID=at-omni-121-00706 [txtvers=1 ws=/wsapp/ model=at-omni-121 uniqueID=at-omni-121-00706] 192.168.1.252 true true}
Got new entry: &{at-omni-122-00487._ajows._tcp.local. at-omni-122-00487.local. 192.168.1.248 <nil> 80 txtvers=1|ws=/wsapp/|model=at-omni-122|uniqueID=at-omni-122-00487 [txtvers=1 ws=/wsapp/ model=at-omni-122 uniqueID=at-omni-122-00487] 192.168.1.248 true true}
Got new entry: &{at-omni-111-00459._ajows._tcp.local. at-omni-111-00459.local. 192.168.1.253 <nil> 80 txtvers=1|ws=/wsapp/|model=at-omni-111|uniqueID=at-omni-111-00459 [txtvers=1 ws=/wsapp/ model=at-omni-111 uniqueID=at-omni-111-00459] 192.168.1.253 true true}
Got new entry: &{at-omni-521-00046._ajows._tcp.local. at-omni-521-00046.local. 192.168.1.232 <nil> 80 txtvers=1|ws=/wsapp/|model=at-omni-521|uniqueID=at-omni-521-00046 [txtvers=1 ws=/wsapp/ model=at-omni-521 uniqueID=at-omni-521-00046] 192.168.1.232 true true}
Got new entry: &{at-omni-512-00010._ajows._tcp.local. at-omni-512-00010.local. 192.168.1.230 <nil> 80 txtvers=1|ws=/wsapp/|model=at-omni-512|uniqueID=at-omni-512-00010 [txtvers=1 ws=/wsapp/ model=at-omni-512 uniqueID=at-omni-512-00010] 192.168.1.230 true true}
Got new entry: &{ATL-UHD-CLSO-824._ahttp._tcp.local. ATL-UHD-CLSO-824.local. 192.168.1.99 <nil> 80  [] 192.168.1.99 true true}
2018/12/20 15:52:48 [INFO] mdns: Closing client {0xc4200ba020 0xc4200ba028 0xc4200ba030 <nil> true 0xc4200981e0 {1 0}}
2018/12/20 15:52:48 [ERR] mdns: Failed to read packet: read udp4 0.0.0.0:64006: use of closed network connection
2018/12/20 15:52:48 [ERR] mdns: Failed to read packet: read udp4 0.0.0.0:5353: use of closed network connection
2018/12/20 15:52:48 [ERR] mdns: Failed to read packet: read udp6 [::]:64007: use of closed network connection
Davids-MacBook-Pro:Downloads davidrenne$ go run mdnsDiscover.go 
2018/12/20 15:53:03 [ERR] mdns: Failed to bind to udp6 port: listen udp6 [ff02::fb]:5353: setsockopt: can't assign requested address
Got new entry: &{at-omni-121-00706._ajows._tcp.local. at-omni-121-00706.local. 192.168.1.252 <nil> 80 txtvers=1|ws=/wsapp/|model=at-omni-121|uniqueID=at-omni-121-00706 [txtvers=1 ws=/wsapp/ model=at-omni-121 uniqueID=at-omni-121-00706] 192.168.1.252 true true}
Got new entry: &{at-omni-111-00459._ajows._tcp.local. at-omni-111-00459.local. 192.168.1.253 <nil> 80 txtvers=1|ws=/wsapp/|model=at-omni-111|uniqueID=at-omni-111-00459 [txtvers=1 ws=/wsapp/ model=at-omni-111 uniqueID=at-omni-111-00459] 192.168.1.253 true true}
Got new entry: &{at-omni-512-00010._ajows._tcp.local. at-omni-512-00010.local. 192.168.1.230 <nil> 80 txtvers=1|ws=/wsapp/|model=at-omni-512|uniqueID=at-omni-512-00010 [txtvers=1 ws=/wsapp/ model=at-omni-512 uniqueID=at-omni-512-00010] 192.168.1.230 true true}
Got new entry: &{at-omni-122-00487._ajows._tcp.local. at-omni-122-00487.local. 192.168.1.248 <nil> 80 txtvers=1|ws=/wsapp/|model=at-omni-122|uniqueID=at-omni-122-00487 [txtvers=1 ws=/wsapp/ model=at-omni-122 uniqueID=at-omni-122-00487] 192.168.1.248 true true}
Got new entry: &{at-omni-521-00046._ajows._tcp.local. at-omni-521-00046.local. 192.168.1.232 <nil> 80 txtvers=1|ws=/wsapp/|model=at-omni-521|uniqueID=at-omni-521-00046 [txtvers=1 ws=/wsapp/ model=at-omni-521 uniqueID=at-omni-521-00046] 192.168.1.232 true true}
Got new entry: &{ATL-UHD-CLSO-824._ahttp._tcp.local. ATL-UHD-CLSO-824.local. 192.168.1.99 <nil> 80  [] 192.168.1.99 true true}
Got new entry: &{amzn\.dmgr:1E8EA5E8B62252574495D8E11427F98D:BtOSCVJEPv:922114._amzn-wplay._tcp.local. 192-168-1-12.local. 192.168.1.12 <nil> 40682 s=0|at=RCpejAcaXTm+|n=Fire TV|tr=tcp|sp=39759|pv=1|mv=2|v=2|a=0|u=1E8EA5E8B62252574495D8E11427F98D|ad=A2LWARUGJLBYEW|dpv=1|t=8|f=0 [s=0 at=RCpejAcaXTm+ n=Fire TV tr=tcp sp=39759 pv=1 mv=2 v=2 a=0 u=1E8EA5E8B62252574495D8E11427F98D ad=A2LWARUGJLBYEW dpv=1 t=8 f=0] 192.168.1.12 true true}
2018/12/20 15:53:04 [INFO] mdns: Closing client {0xc4200ac020 0xc4200ac028 0xc4200ac030 <nil> true 0xc42008a1e0 {1 0}}
2018/12/20 15:53:04 [ERR] mdns: Failed to read packet: read udp4 0.0.0.0:53944: use of closed network connection
2018/12/20 15:53:04 [ERR] mdns: Failed to read packet: read udp6 [::]:53945: use of closed network connection
2018/12/20 15:53:04 [ERR] mdns: Failed to read packet: read udp4 0.0.0.0:5353: use of closed network connection
Davids-MacBook-Pro:Downloads davidrenne$ go run mdnsDiscover.go 
2018/12/20 15:53:06 [ERR] mdns: Failed to bind to udp6 port: listen udp6 [ff02::fb]:5353: setsockopt: can't assign requested address
Got new entry: &{at-omni-122-00487._ajows._tcp.local. at-omni-122-00487.local. 192.168.1.248 <nil> 80 txtvers=1|ws=/wsapp/|model=at-omni-122|uniqueID=at-omni-122-00487 [txtvers=1 ws=/wsapp/ model=at-omni-122 uniqueID=at-omni-122-00487] 192.168.1.248 true true}
Got new entry: &{at-omni-521-00046._ajows._tcp.local. at-omni-521-00046.local. 192.168.1.232 <nil> 80 txtvers=1|ws=/wsapp/|model=at-omni-521|uniqueID=at-omni-521-00046 [txtvers=1 ws=/wsapp/ model=at-omni-521 uniqueID=at-omni-521-00046] 192.168.1.232 true true}
Got new entry: &{at-omni-111-00459._ajows._tcp.local. at-omni-111-00459.local. 192.168.1.253 <nil> 80 txtvers=1|ws=/wsapp/|model=at-omni-111|uniqueID=at-omni-111-00459 [txtvers=1 ws=/wsapp/ model=at-omni-111 uniqueID=at-omni-111-00459] 192.168.1.253 true true}
Got new entry: &{at-omni-121-00706._ajows._tcp.local. at-omni-121-00706.local. 192.168.1.252 <nil> 80 txtvers=1|ws=/wsapp/|model=at-omni-121|uniqueID=at-omni-121-00706 [txtvers=1 ws=/wsapp/ model=at-omni-121 uniqueID=at-omni-121-00706] 192.168.1.252 true true}
Got new entry: &{at-omni-512-00010._ajows._tcp.local. at-omni-512-00010.local. 192.168.1.230 <nil> 80 txtvers=1|ws=/wsapp/|model=at-omni-512|uniqueID=at-omni-512-00010 [txtvers=1 ws=/wsapp/ model=at-omni-512 uniqueID=at-omni-512-00010] 192.168.1.230 true true}
Got new entry: &{ATL-UHD-CLSO-824._ahttp._tcp.local. ATL-UHD-CLSO-824.local. 192.168.1.99 <nil> 80  [] 192.168.1.99 true true}
2018/12/20 15:53:07 [INFO] mdns: Closing client {0xc4200ba020 0xc4200ba028 0xc4200ba030 <nil> true 0xc4200981e0 {1 0}}
2018/12/20 15:53:07 [ERR] mdns: Failed to read packet: read udp4 0.0.0.0:50376: use of closed network connection
2018/12/20 15:53:07 [ERR] mdns: Failed to read packet: read udp6 [::]:50377: use of closed network connection
Davids-MacBook-Pro:Downloads davidrenne$ go run mdnsDiscover.go 
2018/12/20 15:53:09 [ERR] mdns: Failed to bind to udp6 port: listen udp6 [ff02::fb]:5353: setsockopt: can't assign requested address
Got new entry: &{at-omni-122-00487._ajows._tcp.local. at-omni-122-00487.local. 192.168.1.248 <nil> 80 txtvers=1|ws=/wsapp/|model=at-omni-122|uniqueID=at-omni-122-00487 [txtvers=1 ws=/wsapp/ model=at-omni-122 uniqueID=at-omni-122-00487] 192.168.1.248 true true}
Got new entry: &{at-omni-521-00046._ajows._tcp.local. at-omni-521-00046.local. 192.168.1.232 <nil> 80 txtvers=1|ws=/wsapp/|model=at-omni-521|uniqueID=at-omni-521-00046 [txtvers=1 ws=/wsapp/ model=at-omni-521 uniqueID=at-omni-521-00046] 192.168.1.232 true true}
Got new entry: &{at-omni-111-00459._ajows._tcp.local. at-omni-111-00459.local. 192.168.1.253 <nil> 80 txtvers=1|ws=/wsapp/|model=at-omni-111|uniqueID=at-omni-111-00459 [txtvers=1 ws=/wsapp/ model=at-omni-111 uniqueID=at-omni-111-00459] 192.168.1.253 true true}
Got new entry: &{at-omni-121-00706._ajows._tcp.local. at-omni-121-00706.local. 192.168.1.252 <nil> 80 txtvers=1|ws=/wsapp/|model=at-omni-121|uniqueID=at-omni-121-00706 [txtvers=1 ws=/wsapp/ model=at-omni-121 uniqueID=at-omni-121-00706] 192.168.1.252 true true}
Got new entry: &{at-omni-512-00010._ajows._tcp.local. at-omni-512-00010.local. 192.168.1.230 <nil> 80 txtvers=1|ws=/wsapp/|model=at-omni-512|uniqueID=at-omni-512-00010 [txtvers=1 ws=/wsapp/ model=at-omni-512 uniqueID=at-omni-512-00010] 192.168.1.230 true true}
Got new entry: &{ATL-UHD-CLSO-824._ahttp._tcp.local. ATL-UHD-CLSO-824.local. 192.168.1.99 <nil> 80  [] 192.168.1.99 true true}
2018/12/20 15:53:10 [INFO] mdns: Closing client {0xc42000e030 0xc42000e038 0xc42000e040 <nil> true 0xc42008a1e0 {1 0}}
2018/12/20 15:53:10 [ERR] mdns: Failed to read packet: read udp4 0.0.0.0:64024: use of closed network connection
2018/12/20 15:53:10 [ERR] mdns: Failed to read packet: read udp4 0.0.0.0:5353: use of closed network connection
Davids-MacBook-Pro:Downloads davidrenne$ go run mdnsDiscover.go 
2018/12/20 15:53:13 [ERR] mdns: Failed to bind to udp6 port: listen udp6 [ff02::fb]:5353: setsockopt: can't assign requested address
Got new entry: &{at-omni-111-00459._ajows._tcp.local. at-omni-111-00459.local. 192.168.1.253 <nil> 80 txtvers=1|ws=/wsapp/|model=at-omni-111|uniqueID=at-omni-111-00459 [txtvers=1 ws=/wsapp/ model=at-omni-111 uniqueID=at-omni-111-00459] 192.168.1.253 true true}
Got new entry: &{at-omni-122-00487._ajows._tcp.local. at-omni-122-00487.local. 192.168.1.248 <nil> 80 txtvers=1|ws=/wsapp/|model=at-omni-122|uniqueID=at-omni-122-00487 [txtvers=1 ws=/wsapp/ model=at-omni-122 uniqueID=at-omni-122-00487] 192.168.1.248 true true}
Got new entry: &{at-omni-121-00706._ajows._tcp.local. at-omni-121-00706.local. 192.168.1.252 <nil> 80 txtvers=1|ws=/wsapp/|model=at-omni-121|uniqueID=at-omni-121-00706 [txtvers=1 ws=/wsapp/ model=at-omni-121 uniqueID=at-omni-121-00706] 192.168.1.252 true true}
Got new entry: &{at-omni-512-00010._ajows._tcp.local. at-omni-512-00010.local. 192.168.1.230 <nil> 80 txtvers=1|ws=/wsapp/|model=at-omni-512|uniqueID=at-omni-512-00010 [txtvers=1 ws=/wsapp/ model=at-omni-512 uniqueID=at-omni-512-00010] 192.168.1.230 true true}
Got new entry: &{at-omni-521-00046._ajows._tcp.local. at-omni-521-00046.local. 192.168.1.232 <nil> 80 txtvers=1|ws=/wsapp/|model=at-omni-521|uniqueID=at-omni-521-00046 [txtvers=1 ws=/wsapp/ model=at-omni-521 uniqueID=at-omni-521-00046] 192.168.1.232 true true}
Got new entry: &{VelocityGateway._ajows._tcp.local. velocity.local. 192.168.1.202 <nil> 42424 txtv=0|lo=1|la=2 [txtv=0 lo=1 la=2] 192.168.1.202 true true}
Got new entry: &{ATL-UHD-CLSO-824._ahttp._tcp.local. ATL-UHD-CLSO-824.local. 192.168.1.99 <nil> 80  [] 192.168.1.99 true true}
Got new entry: &{amzn\.dmgr:1E8EA5E8B62252574495D8E11427F98D:BtOSCVJEPv:922114._amzn-wplay._tcp.local. 192-168-1-12.local. 192.168.1.12 <nil> 40682 s=0|at=RCpejAcaXTm+|n=Fire TV|tr=tcp|sp=39759|pv=1|mv=2|v=2|a=0|u=1E8EA5E8B62252574495D8E11427F98D|ad=A2LWARUGJLBYEW|dpv=1|t=8|f=0 [s=0 at=RCpejAcaXTm+ n=Fire TV tr=tcp sp=39759 pv=1 mv=2 v=2 a=0 u=1E8EA5E8B62252574495D8E11427F98D ad=A2LWARUGJLBYEW dpv=1 t=8 f=0] 192.168.1.12 true true}
2018/12/20 15:53:14 [INFO] mdns: Closing client {0xc4200b2020 0xc4200b2028 0xc4200b2030 <nil> true 0xc42008a1e0 {1 0}}
2018/12/20 15:53:14 [ERR] mdns: Failed to read packet: read udp4 0.0.0.0:55832: use of closed network connection
2018/12/20 15:53:14 [ERR] mdns: Failed to read packet: read udp4 0.0.0.0:5353: use of closed network connection
Davids-MacBook-Pro:Downloads davidrenne$ go run mdnsDiscover.go 
2018/12/20 15:53:15 [ERR] mdns: Failed to bind to udp6 port: listen udp6 [ff02::fb]:5353: setsockopt: can't assign requested address
Got new entry: &{at-omni-512-00010._ajows._tcp.local. at-omni-512-00010.local. 192.168.1.230 <nil> 80 txtvers=1|ws=/wsapp/|model=at-omni-512|uniqueID=at-omni-512-00010 [txtvers=1 ws=/wsapp/ model=at-omni-512 uniqueID=at-omni-512-00010] 192.168.1.230 true true}
Got new entry: &{at-omni-122-00487._ajows._tcp.local. at-omni-122-00487.local. 192.168.1.248 <nil> 80 txtvers=1|ws=/wsapp/|model=at-omni-122|uniqueID=at-omni-122-00487 [txtvers=1 ws=/wsapp/ model=at-omni-122 uniqueID=at-omni-122-00487] 192.168.1.248 true true}
Got new entry: &{at-omni-111-00459._ajows._tcp.local. at-omni-111-00459.local. 192.168.1.253 <nil> 80 txtvers=1|ws=/wsapp/|model=at-omni-111|uniqueID=at-omni-111-00459 [txtvers=1 ws=/wsapp/ model=at-omni-111 uniqueID=at-omni-111-00459] 192.168.1.253 true true}
Got new entry: &{at-omni-521-00046._ajows._tcp.local. at-omni-521-00046.local. 192.168.1.232 <nil> 80 txtvers=1|ws=/wsapp/|model=at-omni-521|uniqueID=at-omni-521-00046 [txtvers=1 ws=/wsapp/ model=at-omni-521 uniqueID=at-omni-521-00046] 192.168.1.232 true true}
Got new entry: &{at-omni-121-00706._ajows._tcp.local. at-omni-121-00706.local. 192.168.1.252 <nil> 80 txtvers=1|ws=/wsapp/|model=at-omni-121|uniqueID=at-omni-121-00706 [txtvers=1 ws=/wsapp/ model=at-omni-121 uniqueID=at-omni-121-00706] 192.168.1.252 true true}
Got new entry: &{VelocityGateway._ajows._tcp.local. velocity.local. 192.168.1.202 <nil> 42424 txtv=0|lo=1|la=2 [txtv=0 lo=1 la=2] 192.168.1.202 true true}
Got new entry: &{ATL-UHD-CLSO-824._ahttp._tcp.local. ATL-UHD-CLSO-824.local. 192.168.1.99 <nil> 80  [] 192.168.1.99 true true}
2018/12/20 15:53:16 [INFO] mdns: Closing client {0xc42000e030 0xc42000e038 0xc42000e040 <nil> true 0xc42008a1e0 {1 0}}
2018/12/20 15:53:16 [ERR] mdns: Failed to read packet: read udp4 0.0.0.0:49407: use of closed network connection
2018/12/20 15:53:16 [ERR] mdns: Failed to read packet: read udp6 [::]:49408: use of closed network connection
2018/12/20 15:53:16 [ERR] mdns: Failed to read packet: read udp4 0.0.0.0:5353: use of closed network connection
Davids-MacBook-Pro:Downloads davidrenne$ go run mdnsDiscover.go 
2018/12/20 15:53:18 [ERR] mdns: Failed to bind to udp6 port: listen udp6 [ff02::fb]:5353: setsockopt: can't assign requested address
Got new entry: &{at-omni-121-00706._ajows._tcp.local. at-omni-121-00706.local. 192.168.1.252 <nil> 80 txtvers=1|ws=/wsapp/|model=at-omni-121|uniqueID=at-omni-121-00706 [txtvers=1 ws=/wsapp/ model=at-omni-121 uniqueID=at-omni-121-00706] 192.168.1.252 true true}
Got new entry: &{at-omni-122-00487._ajows._tcp.local. at-omni-122-00487.local. 192.168.1.248 <nil> 80 txtvers=1|ws=/wsapp/|model=at-omni-122|uniqueID=at-omni-122-00487 [txtvers=1 ws=/wsapp/ model=at-omni-122 uniqueID=at-omni-122-00487] 192.168.1.248 true true}
Got new entry: &{at-omni-111-00459._ajows._tcp.local. at-omni-111-00459.local. 192.168.1.253 <nil> 80 txtvers=1|ws=/wsapp/|model=at-omni-111|uniqueID=at-omni-111-00459 [txtvers=1 ws=/wsapp/ model=at-omni-111 uniqueID=at-omni-111-00459] 192.168.1.253 true true}
Got new entry: &{at-omni-521-00046._ajows._tcp.local. at-omni-521-00046.local. 192.168.1.232 <nil> 80 txtvers=1|ws=/wsapp/|model=at-omni-521|uniqueID=at-omni-521-00046 [txtvers=1 ws=/wsapp/ model=at-omni-521 uniqueID=at-omni-521-00046] 192.168.1.232 true true}
Got new entry: &{at-omni-512-00010._ajows._tcp.local. at-omni-512-00010.local. 192.168.1.230 <nil> 80 txtvers=1|ws=/wsapp/|model=at-omni-512|uniqueID=at-omni-512-00010 [txtvers=1 ws=/wsapp/ model=at-omni-512 uniqueID=at-omni-512-00010] 192.168.1.230 true true}
Got new entry: &{ATL-UHD-CLSO-824._ahttp._tcp.local. ATL-UHD-CLSO-824.local. 192.168.1.99 <nil> 80  [] 192.168.1.99 true true}
2018/12/20 15:53:19 [INFO] mdns: Closing client {0xc42000e030 0xc42000e038 0xc42000e040 <nil> true 0xc42008a1e0 {1 0}}
2018/12/20 15:53:19 [ERR] mdns: Failed to read packet: read udp4 0.0.0.0:51138: use of closed network connection
2018/12/20 15:53:19 [ERR] mdns: Failed to read packet: read udp6 [::]:51139: use of closed network connection
2018/12/20 15:53:19 [ERR] mdns: Failed to read packet: read udp4 0.0.0.0:5353: use of closed network connection
Davids-MacBook-Pro:Downloads davidrenne$ go run mdnsDiscover.go 
2018/12/20 15:53:27 [ERR] mdns: Failed to bind to udp6 port: listen udp6 [ff02::fb]:5353: setsockopt: can't assign requested address
Got new entry: &{at-omni-121-00706._ajows._tcp.local. at-omni-121-00706.local. 192.168.1.252 <nil> 80 txtvers=1|ws=/wsapp/|model=at-omni-121|uniqueID=at-omni-121-00706 [txtvers=1 ws=/wsapp/ model=at-omni-121 uniqueID=at-omni-121-00706] 192.168.1.252 true true}
Got new entry: &{at-omni-111-00459._ajows._tcp.local. at-omni-111-00459.local. 192.168.1.253 <nil> 80 txtvers=1|ws=/wsapp/|model=at-omni-111|uniqueID=at-omni-111-00459 [txtvers=1 ws=/wsapp/ model=at-omni-111 uniqueID=at-omni-111-00459] 192.168.1.253 true true}
Got new entry: &{at-omni-521-00046._ajows._tcp.local. at-omni-521-00046.local. 192.168.1.232 <nil> 80 txtvers=1|ws=/wsapp/|model=at-omni-521|uniqueID=at-omni-521-00046 [txtvers=1 ws=/wsapp/ model=at-omni-521 uniqueID=at-omni-521-00046] 192.168.1.232 true true}
Got new entry: &{at-omni-122-00487._ajows._tcp.local. at-omni-122-00487.local. 192.168.1.248 <nil> 80 txtvers=1|ws=/wsapp/|model=at-omni-122|uniqueID=at-omni-122-00487 [txtvers=1 ws=/wsapp/ model=at-omni-122 uniqueID=at-omni-122-00487] 192.168.1.248 true true}
Got new entry: &{at-omni-512-00010._ajows._tcp.local. at-omni-512-00010.local. 192.168.1.230 <nil> 80 txtvers=1|ws=/wsapp/|model=at-omni-512|uniqueID=at-omni-512-00010 [txtvers=1 ws=/wsapp/ model=at-omni-512 uniqueID=at-omni-512-00010] 192.168.1.230 true true}
Got new entry: &{ATL-UHD-CLSO-824._ahttp._tcp.local. ATL-UHD-CLSO-824.local. 192.168.1.99 <nil> 80  [] 192.168.1.99 true true}
2018/12/20 15:53:28 [INFO] mdns: Closing client {0xc4200ac020 0xc4200ac028 0xc4200ac030 <nil> true 0xc42008a1e0 {1 0}}
2018/12/20 15:53:28 [ERR] mdns: Failed to read packet: read udp4 0.0.0.0:56674: use of closed network connection
2018/12/20 15:53:28 [ERR] mdns: Failed to read packet: read udp4 0.0.0.0:5353: use of closed network connection
Davids-MacBook-Pro:Downloads davidrenne$ go run mdnsDiscover.go 
2018/12/20 15:53:35 [ERR] mdns: Failed to bind to udp6 port: listen udp6 [ff02::fb]:5353: setsockopt: can't assign requested address
Got new entry: &{at-omni-512-00010._ajows._tcp.local. at-omni-512-00010.local. 192.168.1.230 <nil> 80 txtvers=1|ws=/wsapp/|model=at-omni-512|uniqueID=at-omni-512-00010 [txtvers=1 ws=/wsapp/ model=at-omni-512 uniqueID=at-omni-512-00010] 192.168.1.230 true true}
Got new entry: &{at-omni-111-00459._ajows._tcp.local. at-omni-111-00459.local. 192.168.1.253 <nil> 80 txtvers=1|ws=/wsapp/|model=at-omni-111|uniqueID=at-omni-111-00459 [txtvers=1 ws=/wsapp/ model=at-omni-111 uniqueID=at-omni-111-00459] 192.168.1.253 true true}
Got new entry: &{at-omni-122-00487._ajows._tcp.local. at-omni-122-00487.local. 192.168.1.248 <nil> 80 txtvers=1|ws=/wsapp/|model=at-omni-122|uniqueID=at-omni-122-00487 [txtvers=1 ws=/wsapp/ model=at-omni-122 uniqueID=at-omni-122-00487] 192.168.1.248 true true}
Got new entry: &{at-omni-521-00046._ajows._tcp.local. at-omni-521-00046.local. 192.168.1.232 <nil> 80 txtvers=1|ws=/wsapp/|model=at-omni-521|uniqueID=at-omni-521-00046 [txtvers=1 ws=/wsapp/ model=at-omni-521 uniqueID=at-omni-521-00046] 192.168.1.232 true true}
Got new entry: &{at-omni-121-00706._ajows._tcp.local. at-omni-121-00706.local. 192.168.1.252 <nil> 80 txtvers=1|ws=/wsapp/|model=at-omni-121|uniqueID=at-omni-121-00706 [txtvers=1 ws=/wsapp/ model=at-omni-121 uniqueID=at-omni-121-00706] 192.168.1.252 true true}
Got new entry: &{VelocityGateway._ajows._tcp.local. velocity.local. 192.168.1.202 <nil> 42424 txtv=0|lo=1|la=2 [txtv=0 lo=1 la=2] 192.168.1.202 true true}
Got new entry: &{ATL-UHD-CLSO-824._ahttp._tcp.local. ATL-UHD-CLSO-824.local. 192.168.1.99 <nil> 80  [] 192.168.1.99 true true}
2018/12/20 15:53:36 [INFO] mdns: Closing client {0xc4200ba020 0xc4200ba028 0xc4200ba030 <nil> true 0xc4200981e0 {1 0}}
2018/12/20 15:53:36 [ERR] mdns: Failed to read packet: read udp4 0.0.0.0:65089: use of closed network connection
2018/12/20 15:53:36 [ERR] mdns: Failed to read packet: read udp6 [::]:65090: use of closed network connection
2018/12/20 15:53:36 [ERR] mdns: Failed to read packet: read udp4 0.0.0.0:5353: use of closed network connection
Davids-MacBook-Pro:Downloads davidrenne$ go run mdnsDiscover.go 
2018/12/20 15:53:53 [ERR] mdns: Failed to bind to udp6 port: listen udp6 [ff02::fb]:5353: setsockopt: can't assign requested address
Got new entry: &{at-omni-111-00459._ajows._tcp.local. at-omni-111-00459.local. 192.168.1.253 <nil> 80 txtvers=1|ws=/wsapp/|model=at-omni-111|uniqueID=at-omni-111-00459 [txtvers=1 ws=/wsapp/ model=at-omni-111 uniqueID=at-omni-111-00459] 192.168.1.253 true true}
Got new entry: &{at-omni-521-00046._ajows._tcp.local. at-omni-521-00046.local. 192.168.1.232 <nil> 80 txtvers=1|ws=/wsapp/|model=at-omni-521|uniqueID=at-omni-521-00046 [txtvers=1 ws=/wsapp/ model=at-omni-521 uniqueID=at-omni-521-00046] 192.168.1.232 true true}
Got new entry: &{at-omni-512-00010._ajows._tcp.local. at-omni-512-00010.local. 192.168.1.230 <nil> 80 txtvers=1|ws=/wsapp/|model=at-omni-512|uniqueID=at-omni-512-00010 [txtvers=1 ws=/wsapp/ model=at-omni-512 uniqueID=at-omni-512-00010] 192.168.1.230 true true}
Got new entry: &{at-omni-121-00706._ajows._tcp.local. at-omni-121-00706.local. 192.168.1.252 <nil> 80 txtvers=1|ws=/wsapp/|model=at-omni-121|uniqueID=at-omni-121-00706 [txtvers=1 ws=/wsapp/ model=at-omni-121 uniqueID=at-omni-121-00706] 192.168.1.252 true true}
Got new entry: &{at-omni-122-00487._ajows._tcp.local. at-omni-122-00487.local. 192.168.1.248 <nil> 80 txtvers=1|ws=/wsapp/|model=at-omni-122|uniqueID=at-omni-122-00487 [txtvers=1 ws=/wsapp/ model=at-omni-122 uniqueID=at-omni-122-00487] 192.168.1.248 true true}
Got new entry: &{ATL-UHD-CLSO-824._ahttp._tcp.local. ATL-UHD-CLSO-824.local. 192.168.1.99 <nil> 80  [] 192.168.1.99 true true}
Got new entry: &{amzn\.dmgr:1E8EA5E8B62252574495D8E11427F98D:BtOSCVJEPv:922114._amzn-wplay._tcp.local. 192-168-1-12.local. 192.168.1.12 <nil> 40682 s=0|at=RCpejAcaXTm+|n=Fire TV|tr=tcp|sp=39759|pv=1|mv=2|v=2|a=0|u=1E8EA5E8B62252574495D8E11427F98D|ad=A2LWARUGJLBYEW|dpv=1|t=8|f=0 [s=0 at=RCpejAcaXTm+ n=Fire TV tr=tcp sp=39759 pv=1 mv=2 v=2 a=0 u=1E8EA5E8B62252574495D8E11427F98D ad=A2LWARUGJLBYEW dpv=1 t=8 f=0] 192.168.1.12 true true}
2018/12/20 15:53:54 [INFO] mdns: Closing client {0xc42000e030 0xc42000e038 0xc42000e040 <nil> true 0xc42008a1e0 {1 0}}
2018/12/20 15:53:54 [ERR] mdns: Failed to read packet: read udp4 0.0.0.0:64112: use of closed network connection
2018/12/20 15:53:54 [ERR] mdns: Failed to read packet: read udp6 [::]:64113: use of closed network connection
Davids-MacBook-Pro:Downloads davidrenne$ go run mdnsDiscover.go 
2018/12/20 15:54:21 [ERR] mdns: Failed to bind to udp6 port: listen udp6 [ff02::fb]:5353: setsockopt: can't assign requested address
Got new entry: &{at-omni-122-00487._ajows._tcp.local. at-omni-122-00487.local. 192.168.1.248 <nil> 80 txtvers=1|ws=/wsapp/|model=at-omni-122|uniqueID=at-omni-122-00487 [txtvers=1 ws=/wsapp/ model=at-omni-122 uniqueID=at-omni-122-00487] 192.168.1.248 true true}
Got new entry: &{at-omni-111-00459._ajows._tcp.local. at-omni-111-00459.local. 192.168.1.253 <nil> 80 txtvers=1|ws=/wsapp/|model=at-omni-111|uniqueID=at-omni-111-00459 [txtvers=1 ws=/wsapp/ model=at-omni-111 uniqueID=at-omni-111-00459] 192.168.1.253 true true}
Got new entry: &{at-omni-512-00010._ajows._tcp.local. at-omni-512-00010.local. 192.168.1.230 <nil> 80 txtvers=1|ws=/wsapp/|model=at-omni-512|uniqueID=at-omni-512-00010 [txtvers=1 ws=/wsapp/ model=at-omni-512 uniqueID=at-omni-512-00010] 192.168.1.230 true true}
Got new entry: &{at-omni-121-00706._ajows._tcp.local. at-omni-121-00706.local. 192.168.1.252 <nil> 80 txtvers=1|ws=/wsapp/|model=at-omni-121|uniqueID=at-omni-121-00706 [txtvers=1 ws=/wsapp/ model=at-omni-121 uniqueID=at-omni-121-00706] 192.168.1.252 true true}
Got new entry: &{at-omni-521-00046._ajows._tcp.local. at-omni-521-00046.local. 192.168.1.232 <nil> 80 txtvers=1|ws=/wsapp/|model=at-omni-521|uniqueID=at-omni-521-00046 [txtvers=1 ws=/wsapp/ model=at-omni-521 uniqueID=at-omni-521-00046] 192.168.1.232 true true}
Got new entry: &{ATL-UHD-CLSO-824._ahttp._tcp.local. ATL-UHD-CLSO-824.local. 192.168.1.99 <nil> 80  [] 192.168.1.99 true true}
2018/12/20 15:54:22 [INFO] mdns: Closing client {0xc4200ba020 0xc4200ba028 0xc4200ba030 <nil> true 0xc4200981e0 {1 0}}
2018/12/20 15:54:22 [ERR] mdns: Failed to read packet: read udp4 0.0.0.0:59558: use of closed network connection
2018/12/20 15:54:22 [ERR] mdns: Failed to read packet: read udp6 [::]:59559: use of closed network connection
2018/12/20 15:54:22 [ERR] mdns: Failed to read packet: read udp4 0.0.0.0:5353: use of closed network connection
Davids-MacBook-Pro:Downloads davidrenne$ go run mdnsDiscover.go 
2018/12/20 15:55:12 [ERR] mdns: Failed to bind to udp6 port: listen udp6 [ff02::fb]:5353: setsockopt: can't assign requested address
Got new entry: &{at-omni-111-00459._ajows._tcp.local. at-omni-111-00459.local. 192.168.1.253 <nil> 80 txtvers=1|ws=/wsapp/|model=at-omni-111|uniqueID=at-omni-111-00459 [txtvers=1 ws=/wsapp/ model=at-omni-111 uniqueID=at-omni-111-00459] 192.168.1.253 true true}
Got new entry: &{at-omni-521-00046._ajows._tcp.local. at-omni-521-00046.local. 192.168.1.232 <nil> 80 txtvers=1|ws=/wsapp/|model=at-omni-521|uniqueID=at-omni-521-00046 [txtvers=1 ws=/wsapp/ model=at-omni-521 uniqueID=at-omni-521-00046] 192.168.1.232 true true}
Got new entry: &{at-omni-122-00487._ajows._tcp.local. at-omni-122-00487.local. 192.168.1.248 <nil> 80 txtvers=1|ws=/wsapp/|model=at-omni-122|uniqueID=at-omni-122-00487 [txtvers=1 ws=/wsapp/ model=at-omni-122 uniqueID=at-omni-122-00487] 192.168.1.248 true true}
Got new entry: &{at-omni-512-00010._ajows._tcp.local. at-omni-512-00010.local. 192.168.1.230 <nil> 80 txtvers=1|ws=/wsapp/|model=at-omni-512|uniqueID=at-omni-512-00010 [txtvers=1 ws=/wsapp/ model=at-omni-512 uniqueID=at-omni-512-00010] 192.168.1.230 true true}
Got new entry: &{at-omni-121-00706._ajows._tcp.local. at-omni-121-00706.local. 192.168.1.252 <nil> 80 txtvers=1|ws=/wsapp/|model=at-omni-121|uniqueID=at-omni-121-00706 [txtvers=1 ws=/wsapp/ model=at-omni-121 uniqueID=at-omni-121-00706] 192.168.1.252 true true}
Got new entry: &{VelocityGateway._ajows._tcp.local. velocity.local. 192.168.1.202 <nil> 42424 txtv=0|lo=1|la=2 [txtv=0 lo=1 la=2] 192.168.1.202 true true}
Got new entry: &{ATL-UHD-CLSO-824._ahttp._tcp.local. ATL-UHD-CLSO-824.local. 192.168.1.99 <nil> 80  [] 192.168.1.99 true true}
2018/12/20 15:55:13 [INFO] mdns: Closing client {0xc4200b2020 0xc4200b2028 0xc4200b2030 <nil> true 0xc42008a1e0 {1 0}}
2018/12/20 15:55:13 [ERR] mdns: Failed to read packet: read udp4 0.0.0.0:50644: use of closed network connection
2018/12/20 15:55:13 [ERR] mdns: Failed to read packet: read udp6 [::]:50645: use of closed network connection
Davids-MacBook-Pro:Downloads davidrenne$ go run mdnsDiscover.go 
2018/12/20 15:55:21 [ERR] mdns: Failed to bind to udp6 port: listen udp6 [ff02::fb]:5353: setsockopt: can't assign requested address
Got new entry: &{at-omni-122-00487._ajows._tcp.local. at-omni-122-00487.local. 192.168.1.248 <nil> 80 txtvers=1|ws=/wsapp/|model=at-omni-122|uniqueID=at-omni-122-00487 [txtvers=1 ws=/wsapp/ model=at-omni-122 uniqueID=at-omni-122-00487] 192.168.1.248 true true}
Got new entry: &{at-omni-111-00459._ajows._tcp.local. at-omni-111-00459.local. 192.168.1.253 <nil> 80 txtvers=1|ws=/wsapp/|model=at-omni-111|uniqueID=at-omni-111-00459 [txtvers=1 ws=/wsapp/ model=at-omni-111 uniqueID=at-omni-111-00459] 192.168.1.253 true true}
Got new entry: &{at-omni-512-00010._ajows._tcp.local. at-omni-512-00010.local. 192.168.1.230 <nil> 80 txtvers=1|ws=/wsapp/|model=at-omni-512|uniqueID=at-omni-512-00010 [txtvers=1 ws=/wsapp/ model=at-omni-512 uniqueID=at-omni-512-00010] 192.168.1.230 true true}
Got new entry: &{at-omni-121-00706._ajows._tcp.local. at-omni-121-00706.local. 192.168.1.252 <nil> 80 txtvers=1|ws=/wsapp/|model=at-omni-121|uniqueID=at-omni-121-00706 [txtvers=1 ws=/wsapp/ model=at-omni-121 uniqueID=at-omni-121-00706] 192.168.1.252 true true}
Got new entry: &{at-omni-521-00046._ajows._tcp.local. at-omni-521-00046.local. 192.168.1.232 <nil> 80 txtvers=1|ws=/wsapp/|model=at-omni-521|uniqueID=at-omni-521-00046 [txtvers=1 ws=/wsapp/ model=at-omni-521 uniqueID=at-omni-521-00046] 192.168.1.232 true true}
Got new entry: &{ATL-UHD-CLSO-824._ahttp._tcp.local. ATL-UHD-CLSO-824.local. 192.168.1.99 <nil> 80  [] 192.168.1.99 true true}
2018/12/20 15:55:22 [INFO] mdns: Closing client {0xc4200ac020 0xc4200ac028 0xc4200ac030 <nil> true 0xc42008a1e0 {1 0}}
2018/12/20 15:55:22 [ERR] mdns: Failed to read packet: read udp4 0.0.0.0:61069: use of closed network connection
2018/12/20 15:55:22 [ERR] mdns: Failed to read packet: read udp6 [::]:61070: use of closed network connection
Davids-MacBook-Pro:Downloads davidrenne$ go run mdnsDiscover.go 
2018/12/20 15:55:27 [ERR] mdns: Failed to bind to udp6 port: listen udp6 [ff02::fb]:5353: setsockopt: can't assign requested address
Got new entry: &{at-omni-122-00487._ajows._tcp.local. at-omni-122-00487.local. 192.168.1.248 <nil> 80 txtvers=1|ws=/wsapp/|model=at-omni-122|uniqueID=at-omni-122-00487 [txtvers=1 ws=/wsapp/ model=at-omni-122 uniqueID=at-omni-122-00487] 192.168.1.248 true true}
Got new entry: &{at-omni-121-00706._ajows._tcp.local. at-omni-121-00706.local. 192.168.1.252 <nil> 80 txtvers=1|ws=/wsapp/|model=at-omni-121|uniqueID=at-omni-121-00706 [txtvers=1 ws=/wsapp/ model=at-omni-121 uniqueID=at-omni-121-00706] 192.168.1.252 true true}
Got new entry: &{at-omni-111-00459._ajows._tcp.local. at-omni-111-00459.local. 192.168.1.253 <nil> 80 txtvers=1|ws=/wsapp/|model=at-omni-111|uniqueID=at-omni-111-00459 [txtvers=1 ws=/wsapp/ model=at-omni-111 uniqueID=at-omni-111-00459] 192.168.1.253 true true}
Got new entry: &{at-omni-512-00010._ajows._tcp.local. at-omni-512-00010.local. 192.168.1.230 <nil> 80 txtvers=1|ws=/wsapp/|model=at-omni-512|uniqueID=at-omni-512-00010 [txtvers=1 ws=/wsapp/ model=at-omni-512 uniqueID=at-omni-512-00010] 192.168.1.230 true true}
Got new entry: &{at-omni-521-00046._ajows._tcp.local. at-omni-521-00046.local. 192.168.1.232 <nil> 80 txtvers=1|ws=/wsapp/|model=at-omni-521|uniqueID=at-omni-521-00046 [txtvers=1 ws=/wsapp/ model=at-omni-521 uniqueID=at-omni-521-00046] 192.168.1.232 true true}
Got new entry: &{ATL-UHD-CLSO-824._ahttp._tcp.local. ATL-UHD-CLSO-824.local. 192.168.1.99 <nil> 80  [] 192.168.1.99 true true}
2018/12/20 15:55:28 [INFO] mdns: Closing client {0xc4200b2020 0xc4200b2028 0xc4200b2030 <nil> true 0xc42008a1e0 {1 0}}
2018/12/20 15:55:28 [ERR] mdns: Failed to read packet: read udp4 0.0.0.0:58464: use of closed network connection
2018/12/20 15:55:28 [ERR] mdns: Failed to read packet: read udp6 [::]:58465: use of closed network connection
2018/12/20 15:55:28 [ERR] mdns: Failed to read packet: read udp4 0.0.0.0:5353: use of closed network connectio

The version which is your library is:

package main

import (
	"context"
	"fmt"
	"runtime/debug"
	"time"

	"github.com/grandcat/zeroconf"
)

// Runs the MDNS Scan once, waiting for 10 seconds for any MDNS packets to come in before closing
func queryMDNS() {
	// for i := 0; i < 1; i++ {
	resolver, err := zeroconf.NewResolver(nil)
	if err != nil {
		fmt.Println("drivers.go->queryMDNS", "Failed to initialize mdns resolver:"+err.Error())
	}

	if resolver == nil { //On a machine that cannot resolve a network interface.
		return
	}

	ajowsTCP := make(chan int)

	ajowsEntries := make(chan *zeroconf.ServiceEntry)
	go processMDNSResults(ajowsEntries, ajowsTCP)
	// go processMDNSResults(ajowsEntries)

	ctx, cancel := context.WithTimeout(context.Background(), time.Millisecond*5000)
	// ctx, cancel := context.WithCancel(context.Background())
	defer cancel()
	err = resolver.Browse(ctx, "_ajows._tcp", "local.", ajowsEntries)
	if err != nil {
		fmt.Println("drivers.go->queryMDNS", "Failed to browse:"+err.Error())
		ajowsTCP <- 0
	}

	<-ajowsTCP
	// time.Sleep(time.Millisecond * 2000)
	// }

}

// Process the responses from the mdns scan
// func processMDNSResults(results <-chan *zeroconf.ServiceEntry) {
func processMDNSResults(results <-chan *zeroconf.ServiceEntry, wait chan int) {

	defer func() {
		if r := recover(); r != nil {
			fmt.Println("\n\nPanic Stack: " + string(debug.Stack()))
			return
		}
	}()

	// for omni latest firmwares, it has more than 3 Text fields including the model
	// and unique id fields
	for entry := range results {
		if len(entry.Text) > 3 {
			// entry.Text: [txtvers=1 ws=/wsapp/ model=at-omni-122 uniqueID=at-omni-122-00381]
			// entry.Text[2]: model=at-omni-122
			fmt.Println(entry.AddrIPv4[0], entry.Text[2])
		} else {
			fmt.Println(entry.AddrIPv4[0], entry.HostName)
		}
	}

	wait <- 0
}

func main() {

	queryMDNS()

}

And then I swapped the example with this better library:

package main

import (
	"fmt"
	"github.com/hashicorp/mdns"
)

func main() {

entriesCh := make(chan *mdns.ServiceEntry, 4)
go func() {
    for entry := range entriesCh {
        fmt.Printf("Got new entry: %v\n", entry)
    }
}()

// Start the lookup
mdns.Lookup("_ajows._tcp", entriesCh)
close(entriesCh)

}
@grandcat
Copy link
Owner

Actually, I started with repository as hashicorp/mdns had unreliability issues I tested it for.
This was the reason why this repo exists.

As it is mDNS, it highly depends on the environment and configuration.
The only thing I can imagine why it might vary is that it supports both IPv4 and IPv6, but handles incoming packets on a FCFS basis. There is an open issue for that: #27 .

Otherwise, feel free to use whatever library which works better. And: PRs welcome.

@davidrenne
Copy link
Author

Cool thanks for the intel. I might try a third library too!

@davidrenne
Copy link
Author

The first round of testing for us using the other library is showing that at first scan we get all our results but subsequently (without recompile of a go main) we get less and less resulting coming back from the channel.

Is this why you started zerconf?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants