sberk42/fritzbox_exporter

panic: XML syntax error when starting

Closed this issue · 3 comments

I've just tried "upgrading" from ndecker/fritzbox_exporter to this fork. Thanks for the work!

Unfortunately, running the binary produces an error for me:

$ ./fritzbox_exporter -gateway-url=http://192.168.0.1 -username=fritzuser -password=fritzpass -test=true
panic: XML syntax error on line 4: unquoted or missing attribute value in element
goroutine 1 [running]:
main.test()
        /home/myuser/go/pkg/mod/github.com/sberk42/fritzbox_exporter@v0.0.0-20220409084429-6b8ced028749/main.go:544 +0xc16
main.main()
        /home/myuser/go/pkg/mod/github.com/sberk42/fritzbox_exporter@v0.0.0-20220409084429-6b8ced028749/main.go:680 +0x4c6

I've installed fritzbox exporter via go install github.com/sberk42/fritzbox_exporter@latest, which seemd to run fine.
Any help highly appreciated, not sure if I'm doing something stupid maybe? From a quick glance at the code it seems like something with the UPNP connection goes wrong, as the panic points at a failed upnp.LoadServices call.

The same error also appears to happen when called without the test parameter.

What am I doing wrong here? What XML is the program talking about here?

I guess you use the wrong port try http://192.168.0.1:49000

no feedback - closing issue

I guess you use the wrong port try http://192.168.0.1:49000/

Yes this was the issue. Thanks for the pointer, and sorry for not getting back sooner!