Diversion Diversion stopped working in 386.1_2

  • ATTENTION! You'll notice a Prefix dropdown when you create a thread. If your post applies to one of the topics listed, please use that Prefix for your post. When browsing the thread list you can use the Prefix to filter the view.
  • ATTENTION! As of November 1, 2020, you are not able to reply to threads 6 months after the thread is opened if there are more than 500 posts in the thread.
    Threads will not be locked, so posts may still be edited by their authors.
    Just start a new thread on the topic to post if you get an error message when trying to reply to a thread.

CrunchyInside

New Around Here
Hi everyone,

Last night I upgraded to 386.1_2 and things were good. My router went through a scheduled nightly reboot while I slept and this morning I had no external network access. After the usual hard boot and some debugging, I turned off Diversion and everything started working again.

I've since tried forcing reinstalling Diversion, with no change. I also was using DNS filtering specifically so I could have two different pixelserv's running (one for the Roku on a custom blacklist, one for everything else). I tried turning off DNS filtering and reenabling Diversion, but that too didn't make a difference.

Interestingly, even with Diversion disabled, I'm still getting DNS denies on advertising domains yet I'm not seeing pixelserv in the process tree.

Has anyone else encountered this? Appreciate any tips on getting this working again.
 

figorr

Regular Contributor
I also had issues with diversion/UiDivStats after the update. Had to reinstall both and now they seem to be working fine.
Same here. Yesterday the UiDivStats stopped working. Stats were not being updated, but Diversion seems to be working and blocking.

Today I tried to manually update the stats and didn’t worked. Then I forced the update for UiDivStats (uf) but It was not solved. Then I uninstalled UiDivStats and reinstalled it. During the new installation ... appeared an error at the end. But now it seems it is working.
 

CrunchyInside

New Around Here
I also had issues with diversion/UiDivStats after the update. Had to reinstall both and now they seem to be working fine.

Thank you very much for posting this. I had tried reinstalling Diversion but I hadn't thought about uiDivStats.

I was able to get back online after doing a complete uninstall of both uiDivStats and Diversion(including removing the local backup). I'm in a much happier place now.
 

JR Godwin

Occasional Visitor
Maybe not quite the same, but what I was seeing was that pixelserv wasn't running, nor would it run even trying to restart it from the CLI Diversion menu.
 

figorr

Regular Contributor
It happened again. At 23:01pm GMT+1 ... UiDivStats stopped again. So I reinstalled UiDivStats and there was an error message when it was creating the new database. Same error as before.
 

L&LD

Part of the Furniture
What error? Specifically? Do you have any log files for the devs?
 

figorr

Regular Contributor
There is nothing strange in the system log.

But I took a picture of the error while UiDivStats was being reinstalled. Reinstalling the script was the only way to recover it and start working again.

Error: near line 1: index idx_dns_domains already exists
Error: near line 1: index idx_dns_time already exists
Error: near line 1: index idx_dns_clients already exists

And finally ...

Error: near line 1: index idx_clients already exists
 

Attachments

  • 37EB10DB-4680-40B2-855F-BCBD6C721477.png
    37EB10DB-4680-40B2-855F-BCBD6C721477.png
    186.5 KB · Views: 60
Last edited:

Jack Yaz

Part of the Furniture
There is nothing strange in the system log.

But I took a picture of the error while UiDivStats was being reinstalled. Reinstalling the script was the only way to recover it and start working again.

Error: near line 1: index idx_dns_domains already exists
Error: near line 1: index idx_dns_time already exists
Error: near line 1: index idx_dns_clients already exists

And finally ...

Error: near line 1: index idx_clients already exists
Expected if you didn't delete the database. Can you explain how uiDivStats is "stopping"?
 

figorr

Regular Contributor
Yesterday, when I arrived at home I saw the UiDivStats WebUi was showing like Diversion had stopped refreshing stats, because the graph was showing 0 queries and 0 total, and the table of UiDivStats was not being updated since the day before. Although I have the check marked in order the table refreshes every 60 seconds.

I tried to refresh the stats using the WebUi button and nothing happened.

Then I thought It was a problem of Diversion. So I went to amtm and I could see Diversion was working Ok.

Then I force update UiDivStats but nothing happened. Still no stats. So I decided to uninstall and reinstall the script (UiDivStats). This solved the issue, as it is shown in the picture, around 7pm.

But again, at 11pm Diversion suddenly stopped refreshing stats. And the only way to restart UiDivStats again was to uninstall and install it again.

And the system log was normal. No strange messages before UiDivStats stopped refreshing stats.

Which database should I remove before reinstalling the UiDivStats? I didn‘t see any option while uninstalling the script.
 

Attachments

  • 2836C389-9C33-4301-A0A8-52A1D0CD0A13.png
    2836C389-9C33-4301-A0A8-52A1D0CD0A13.png
    157.8 KB · Views: 61

Jack Yaz

Part of the Furniture
Next time it happens, can you check if dnsmasq is running, e.g.
Code:
ps | grep dnsmasq
ps | grep taildns
 

figorr

Regular Contributor
Next time it happens, can you check if dnsmasq is running, e.g.
Code:
ps | grep dnsmasq
ps | grep taildns
Thank you @Jack Yaz

It just happened again. Around 13:32pm

With code "ps | grep dnsmasq" I got this:

880 admin 3492 S tail -F /opt/var/log/dnsmasq.log /opt/var/log/dnsmasq.log3
882 admin 3492 S {dnsmasqtotal.aw} /usr/bin/awk -f /jffs/addons/uiDivStats.d/taildns.d/dnsmasqtotal.awk
5910 admin 5436 S grep dnsmasq
32151 nobody 9812 S dnsmasq --log-async
32152 admin 4796 S dnsmasq --log-async

With code "ps | grep taildns" I got this:
854 admin 3492 S {taildns} /bin/sh /opt/bin/taildns
864 admin 3492 S {taildnstotal} /bin/sh /jffs/addons/uiDivStats.d/taildns.d/taildnstotal
882 admin 3492 S {dnsmasqtotal.aw} /usr/bin/awk -f /jffs/addons/uiDivStats.d/taildns.d/dnsmasqtotal.awk
883 admin 3492 S {taildnstotal} /bin/sh /jffs/addons/uiDivStats.d/taildns.d/taildnstotal
4042 admin 5436 S grep taildns

Graph.png


Table.png


Diversion looks like it is working ok.

Diversion.png
 

figorr

Regular Contributor
I uninstalled UiDivstats and removed the database from /opt/share/uiDivStats.d/dnsqueries.db

I removed not only the database. I removed the whole UiDivStats.d folder. Just in case there is something corrupt there.

Then I installed again the UiDivStats script using amtm.

And now is working again. It is refreshing the graph and also the table every 60 seconds.

Let's see what happens in some hours.
 

figorr

Regular Contributor
At 23:09pm UiDivStats failed again and stopped refreshing the graphs and the table. About 10 hours after the last fail.

Now I reinstalled Diversion (using option d) and then I installed UiDivStats again. Let's see tomorrow if it fails again.
 

Jack Yaz

Part of the Furniture
At 23:09pm UiDivStats failed again and stopped refreshing the graphs and the table. About 10 hours after the last fail.

Now I reinstalled Diversion (using option d) and then I installed UiDivStats again. Let's see tomorrow if it fails again.
Note that the graphs only update once an hour, and each update will take longer with a larger database. The query log table should still update every 60s however
 

thelonelycoder

Part of the Furniture
I bet that Diversion / Dnsmasq worked all the time, while UiDivStats had some sort of an early spring cold.
Note that the two work independently, though they require each others services to do their job.
 

thelonelycoder

Part of the Furniture

Jack Yaz

Part of the Furniture
Let‘s settle for both had to sneeze at one point.
It is a strange one. All of uiDivStats' processes appear to be running. I wonder if the USB is failing/slow and dnsmasq.log isn't being written to correctly. That would impact both of our scripts in the way described by OP.
 

Latest threads

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top