bemasher / rtlamr-collect

Data aggregation for rtlamr.
GNU Affero General Public License v3.0
171 stars 29 forks source link

unexpected end of JSON input main.main invalid character C /f E M C E . #39

Closed cypherstream closed 2 years ago

cypherstream commented 2 years ago

I have a batch file that I used to be able to run in a second window (ensure I have rtl_tcp running in the first window) but recently I've been experiencing the issue. Here is my batch file:

set COLLECT_INFLUXDB_HOSTNAME=http://192.168.5.202:8086/
set COLLECT_INFLUXDB_BUCKET=utility
set COLLECT_INFLUXDB_MEASUREMENT=utilities
set COLLECT_INFLUXDB_ORG=utility
set COLLECT_INFLUXDB_TOKEN=username:password
set RTLAMR_FORMAT=json

rtlamr -filterid=1550256522 -msgtype=r900 | rtlamr-collect

But when this is run the only screen output I get is this:

INFO[2022-06-29 23:05:55.264]main.go:406 main.main connecting to "http://192.168.5.202:8086/"
INFO[2022-06-29 23:05:55.269]main.go:424 main.main unexpected end of JSON input
INFO[2022-06-29 23:05:55.27]main.go:424 main.main invalid character 'C' looking for beginning of value
INFO[2022-06-29 23:05:55.272]main.go:424 main.main invalid character '\f' looking for beginning of value
INFO[2022-06-29 23:05:55.273]main.go:424 main.main invalid character 'E' looking for beginning of value
INFO[2022-06-29 23:05:55.273]main.go:424 main.main invalid character 'M' looking for beginning of value
INFO[2022-06-29 23:05:55.274]main.go:424 main.main invalid character 'C' looking for beginning of value
INFO[2022-06-29 23:05:55.274]main.go:424 main.main invalid character 'E' looking for beginning of value
INFO[2022-06-29 23:05:55.275]main.go:424 main.main invalid character '.' looking for beginning of value

Eventually, this eats up all my CPU cycles and services begin to crash. I end up losing network connectivity and in Task manager, the font changes into big bold characters like from Windows 3.1 in the early 90's. It gets very difficult to close anything (the computer just beeps at me) but I end up restarting the computer and the resources are back to normal.

I'm not sure what's changed besides the usual Windows 10 update cadence (up to June 2022 cumulative updates now).

cypherstream commented 2 years ago

I just tried rtlamr -filterid=1550256522 -msgtype=r900 | rtlamr-collect and it does the same thing, so I don't think it has anything to do with rtlamr-collect.

In task manager it spans millions of cmd processes, that's why the system runs out of resources.

bemasher commented 2 years ago

rtlamr-collect requires either the environment variable RTLAMR_FORMAT=json or the flag -format=json on the rtlamr invocation.

cypherstream commented 2 years ago

It was but I figured out that I had to run both cmd windows as administrator.