chuot / rdio-scanner

Rdio Scanner is an open source software that ingest and distribute audio files generated by various software-defined radio recorders. Its interface tries to reproduce the user experience of a real police scanner, while adding its own touch.
GNU General Public License v3.0
435 stars 62 forks source link

rdio-scanner not shipping calls to downstream #195

Closed infecticide closed 2 years ago

infecticide commented 2 years ago

Hi Chrystian it's me again, you are likely tired of seeing my name in the issues list!

rdio-scanner server: 6.3.6 DB Type: mariadb OS: Ubuntu 21.04

A friend of mine has setup a rdio-scanner instance, provided me with an API key and URL. I have set this up as a "Downstream" and selected the TGs I want to ship out to them.

At no time does my rdio-scanner server seem to reach out to send the calls when they are processed. I have no errors, warnings or informational logs about calls being sent to the downstream. I have also confirmed via a packet trace on the network that my server never attempts to send the calls downstream.

I have verified the API key, the URL, the TGs and that the Downstream is not disabled.

My friend is sending calls to me successfully.

infecticide commented 2 years ago

Switching to SQLite backend solves this issue, I would like to continue using MySQL however.

Dewey3 commented 2 years ago

Just a thought... something that tripped me up the first time I used the downstream feature. I was actually disabling the downstream because I though turning the first slider to on (to the right) was enabling the downstream, not disabling it (EGG ON FACE!).

infecticide commented 2 years ago

I have confirmed via the DB that the downstream object is NOT disabled. I thought the same thing as well and tried toggling it back and forth a number of times to be sure I didn't mess it up.

chuot commented 2 years ago

I just tried to downstream from my main instance on sqlite to an instance on mariadb which downstream to an instance on mysql which downstream to an instance on sqlite. Unfortunately, I wasn't able to reproduce your issue. All the dowstream chain reached the last instance from the very first one.

Would you mind sending me a copy of your configuration by email so I can double check your config ?

chuot commented 2 years ago

It looks like your config is done so it will only downstream talkgroups 5490 and 6175 from system 1. Every other calls that doesn't match either one of the two talkgroups wont be downstreamed at all. If your intention is to downstream everything from system 1, then go back to your downstream configuration and click on choose systems. From there, make sure the sys/tg selection is set to what you really want to downstream to your friend. Don't forget to click on save after closing the popup window to persist the new configuration.

Note that when downstream part of your whole setup, the downstream definition section will tell: This downstream allows access to some systems and talkgroups, as opposed to all.

infecticide commented 2 years ago

That is correct that we only want to ship those 2 TGs. It doesn't seem to be happening though.

There are calls on those TGs from 07:26 this morning and my logs do not show that it sent those calls downstream.

I've confirmed with the recipient, those calls do not appear downstream.

EDIT: I noticed that your test starts with a SQLite instance vs MariaDB, is it possible that matters? My server uses MariaDB and the downstream is using SQLite.

Is there any other logging I can enable to further troubleshoot this?

infecticide commented 2 years ago

I thought it might be helpful to post my rdio-scanner.service file as well:

[Unit] Description=The perfect software-defined radio companion ConditionFileIsExecutable=/home/infecticide/rdio-scanner

[Service] StartLimitInterval=5 StartLimitBurst=10 ExecStart=/home/infecticide/rdio-scanner "-service" "run" -db_host MARIADBSERVERNAME -db_name rdio_scanner -db_port 3306 -db_type mariadb -db_user rdio_scanner -db_pass PASSWORDREMOVED User=infecticide Restart=always RestartSec=120

[Install] WantedBy=multi-user.target

chuot commented 2 years ago

Still trying to figure out the issue.

You should use the -config_save option to save all the database properties instead of passing them on the ExecStart line. Look in the PDF for some examples.

infecticide commented 2 years ago

I've updated my systemctl unit to use -config instead.

infecticide commented 2 years ago

Just following up on this, is there anything else you would like me to try or provide more information?

chuot commented 2 years ago

Have you tried with v6.4.5?

infecticide commented 2 years ago

I have been running 6.4.5 for a couple days now and my calls are still not shipping downstream.

chuot commented 2 years ago

Install the latest v6.5.1 and post back all the relevent logs when the issue is happening. Unfortunately I cannot reproduce your issue with mariadb and mysql.

infecticide commented 2 years ago

6.5.1 installed, but calls still not shipping.

EDIT:

Checking the logs, I can see the 'newcall' bits show up from the dirwatch but nothing after that.

chuot commented 2 years ago

Here's what I tried this morning:

chuot@ubuntu2110:~/Rdio Scanner$ uname -a
Linux ubuntu2110 5.13.0-52-generic #59-Ubuntu SMP Wed Jun 15 20:17:13 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
chuot@ubuntu2110:~/Rdio Scanner$ sudo mysql
Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 31
Server version: 10.5.15-MariaDB-0ubuntu0.21.10.1 Ubuntu 21.10

Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

MariaDB [(none)]> create database rdioscanner;
Query OK, 1 row affected (0.001 sec)

MariaDB [(none)]> grant all privileges on rdioscanner.* to 'rdioscanner'@'localhost' identified by 'rdioscanner';
Query OK, 0 rows affected (0.007 sec)

MariaDB [(none)]> ^DBye
chuot@ubuntu2110:~/Rdio Scanner$ ls
rdio-scanner-linux-amd64-v6.5.1.zip
chuot@ubuntu2110:~/Rdio Scanner$ unzip -o rdio-scanner-linux-amd64-v6.5.1.zip 
Archive:  rdio-scanner-linux-amd64-v6.5.1.zip
  inflating: rdio-scanner            
  inflating: rdio-scanner.pdf        
chuot@ubuntu2110:~/Rdio Scanner$ ./rdio-scanner -db_type=mariadb -db_name=rdioscanner -db_user=rdioscanner -db_pass=rdioscanner -config_save
rdio-scanner.ini file created
chuot@ubuntu2110:~/Rdio Scanner$ cat rdio-scanner.ini
db_host = localhost
db_name = rdioscanner
db_pass = rdioscanner
db_port = 3306
db_type = mariadb
db_user = rdioscanner
listen = :3000
chuot@ubuntu2110:~/Rdio Scanner$ ./rdio-scanner 

Rdio Scanner v6.5.1
----------------------------------
2022/07/06 09:51:22 server started
2022/07/06 09:51:22 base folder is /home/chuot/Rdio Scanner
2022/07/06 09:51:22 main interface at http://ubuntu2110:3000
2022/07/06 09:51:22 admin interface at http://ubuntu2110:3000/admin
2022/07/06 09:53:59 configuration changed
2022/07/06 09:54:57 newcall: system=1 talkgroup=5490 file=20220705_135623Provincial_Public_Safety_Telecommunications_Network_005_(Regina_SaskPower_HeadOffice)_TRAFFIC__TO_5490_FROM_225.m4a success
2022/07/06 09:54:57 downstream: system=1 talkgroup=5490 file=20220705_135623Provincial_Public_Safety_Telecommunications_Network_005_(Regina_SaskPower_HeadOffice)_TRAFFIC__TO_5490_FROM_225.m4a to http://zion.hjl.ca:3000 success

So I'm really unable to reproduce your issue despite having tried almost everything.

Would it be possible for you to repeat the steps above with a new VM and test as I did?

I will flag this issue as not reproducible for now.

20220705_135623Provincial_Public_Safety_Telecommunications_Network005(Regina_SaskPower_HeadOffice)_TRAFFIC__TO_5490_FROM_225.zip