Why is DMR Net now yellow?

Help with DMR issues
KN2TOD
Posts: 104
Joined: Sun Nov 11, 2018 6:36 pm

Re: Why is DMR Net now yellow?

Post by KN2TOD »

f1rmb wrote: Thu Mar 18, 2021 10:27 pm Not entirely true, as the new function checkDMRLogin() is wrong by design: it's checking if a disconnection has happened in the last 5 lines of the log (MMDVMHost or DMRGateway), but it doesn't check if a reconnection did happened afterward.
So, "yellow" state can falsely remains on screen for a while (even longer while using DMRGateway).
I agree. A check within the 5 lines needs to added to the function:

Take these sample logs: re-logons are occurring quickly enough (like, one line later) but the delay rolling off those specific log lines can take a while, leaving one with the impression that they're disconnected.


M: 2021-03-19 01:14:51.460 0000: 07 00 00 6E 00 20 00 57 00 *...n. .W.*
M: 2021-03-19 01:14:53.007 DMR Slot 2, received network end of voice transmission from ...
W: 2021-03-19 01:15:08.146 DMR, Login to the master has failed, retrying login ...
M: 2021-03-19 01:15:18.341 DMR, Logged into the master successfully
M: 2021-03-19 01:31:38.989 DMR Slot 2, received network voice header from KN4NDV to TG ...
M: 2021-03-19 01:31:39.370 DMR Talker Alias (Data Format 3, Received 3/13 char): 'KN4'
M: 2021-03-19 01:31:39.370 DMR Slot 2, Embedded Talker Alias Header

M: 2021-03-18 12:15:44.785 DMR Slot 2, Embedded Talker Alias Block 1
M: 2021-03-18 12:15:44.785 0000: 05 00 20 4A 6F 68 6E 20 4B *.. John K*
M: 2021-03-18 12:16:15.161 DMR Slot 2, received network end of voice transmission from
W: 2021-03-18 12:32:59.238 DMR, Login to the master has failed, retrying login ...
M: 2021-03-18 12:33:09.445 DMR, Logged into the master successfully
M: 2021-03-18 12:50:49.992 DMR Slot 2, received network voice header from KN4DRW to TG ..
M: 2021-03-18 12:50:50.121 DMR Slot 2, received network end of voice transmission from

M: 2021-03-18 19:27:18.860 0000: 07 00 00 61 00 6E 00 65 00 *...a.n.e.*
M: 2021-03-18 19:27:26.538 DMR Slot 2, received network end of voice transmission from ...
W: 2021-03-18 19:42:16.488 DMR, Login to the master has failed, retrying login ...
M: 2021-03-18 19:42:26.684 DMR, Logged into the master successfully
M: 2021-03-18 19:42:51.389 DMR Slot 2, received network voice header from WW4MO to TG ...
M: 2021-03-18 19:42:51.759 DMR Talker Alias (Data Format 3, Received 3/13 char): 'WW4'

M: 2021-03-17 19:33:14.320 DMR Slot 2, received network end of voice transmission from ...
W: 2021-03-17 19:39:34.722 DMR, Login to the master has failed, retrying login ...
M: 2021-03-17 19:39:44.941 DMR, Logged into the master successfully
W: 2021-03-17 19:40:55.037 DMR, Login to the master has failed, retrying login ...
M: 2021-03-17 19:41:05.244 DMR, Logged into the master successfully
M: 2021-03-17 19:51:48.924 DMR Slot 2, received network voice header from KN4WQH to TG ...
M: 2021-03-17 19:51:48.940 DMR Slot 2, received network end of voice transmission from ...
KE7FNS
Pi-Star Team
Posts: 1951
Joined: Wed Apr 17, 2019 11:11 pm

Re: Why is DMR Net now yellow?

Post by KE7FNS »

KN2TOD wrote: Fri Mar 19, 2021 3:20 am Take these sample logs: re-logons are occurring quickly enough (like, one line later) but the delay rolling off those specific log lines can take a while, leaving one with the impression that they're disconnected.
A disconnection from the master is going to immediately indicate a RED "DMR Net", NOT yellow.

Code: Select all

W: 2021-03-18 19:42:13.009 DMR, Login to the master has failed, retrying login $
M: 2021-03-18 19:42:23.112 DMR, Logged into the master successfully
M: 2021-03-18 19:43:03.392 DMR Slot 2, received network voice header from WW4MO$
M: 2021-03-18 19:43:04.688 DMR Slot 2, received network end of voice transmissi$
M: 2021-03-18 19:43:45.065 DMR Slot 2, received network voice header from AC6EH$
M: 2021-03-18 19:43:45.277 DMR Slot 2, received network end of voice transmissi$

Code: Select all

W: 2021-03-19 01:15:04.189 DMR, Login to the master has failed, retrying login $
M: 2021-03-19 01:15:14.293 DMR, Logged into the master successfully
M: 2021-03-19 01:15:52.031 DMR Slot 2, received network voice header from K9WKM$
M: 2021-03-19 01:15:52.208 DMR Slot 2, received network end of voice transmissi$
M: 2021-03-19 01:16:36.161 DMR Slot 2, received network voice header from KA2Y $
M: 2021-03-19 01:16:36.605 DMR Talker Alias (Data Format 3, Received 3/9 char):$
Both cases from two different days in my logs were exactly the same time: 1 minute and 32 seconds, I guess you just need to monitor a busier talkgroup.
If someones previous actions are any indication of their future actions, then I predict the deletion and removal of access will happen at any moment. 7-11-2020.

"07/13/20 This Website Has Been Taken Down" ... again :lol:
f1rmb
Posts: 26
Joined: Thu Feb 21, 2019 12:12 pm

Re: Why is DMR Net now yellow?

Post by f1rmb »

KE7FNS wrote: Fri Mar 19, 2021 1:28 am
f1rmb wrote: Thu Mar 18, 2021 10:27 pm Not entirely true, as the new function checkDMRLogin() is wrong by design: it's checking if a disconnection has happened in the last 5 lines of the log (MMDVMHost or DMRGateway), but it doesn't check if a reconnection did happened afterward.
So, "yellow" state can falsely remains on screen for a while (even longer while using DMRGateway).
By using simple deductive reasoning you already know it reconnected. When it reconnects then the log is going to contain new entries pushing the disconnect message past the last 5 lines so it will no longer be true when checking for the existence of that message.
In the DMRGateway case, that's a real problem, as alsmost only connection/disconnection events are logged.
Per Network, it's a 4 lines entry, e.g.:

Code: Select all

W: 2021-03-18 12:16:37.077 BM_2081_France, Login to the master has failed, retrying login ...
D: 2021-03-18 12:16:47.299 BM_2081_France, Sending authorisation
D: 2021-03-18 12:16:47.494 BM_2081_France, Sending configuration
M: 2021-03-18 12:16:47.659 BM_2081_France, Logged into the master successfully
So, it's easy to see a real problem with that php function, as nothing more will be logged until a connection breaks.
My point is simply, this new connection state on the dashboard will confuse user, I also agree that checking for the reconnection will impact the CPU/IO load.
It's still possible to do it, I've build some shell command lines for this, but it's overkill in anyway, and still won't work when you have few enabled networks, as entries are mixed, so a connection can hide a disconnected network.


Cheers.
---
Daniel
f1rmb
Posts: 26
Joined: Thu Feb 21, 2019 12:12 pm

Re: Why is DMR Net now yellow?

Post by f1rmb »

KE7FNS wrote: Fri Mar 19, 2021 5:54 am
KN2TOD wrote: Fri Mar 19, 2021 3:20 am Take these sample logs: re-logons are occurring quickly enough (like, one line later) but the delay rolling off those specific log lines can take a while, leaving one with the impression that they're disconnected.
A disconnection from the master is going to immediately indicate a RED "DMR Net", NOT yellow.
A red "DMR Net" means MMDVMHost or DMRGateay (depending on the configuration) process is not running (showMode(), called from repeaterinfo.php).

Code: Select all

... showMode() snippet:
                elseif ($mode == "DMR Network") {
                        if (getConfigItem("DMR Network", "Address", $mmdvmconfigs) == '127.0.0.1') {
                                if (isProcessRunning("DMRGateway")) {
                                        if (checkDMRLogin("DMRGateway") > 0) { echo "<td style=\"background:#ff9; color:#030; width:50%;\">"; }
                                        else { echo "<td style=\"background:#0b0; color:#030; width:50%;\">"; }
                                } else {
                                        echo "<td style=\"background:#b00; color:#500; width:50%;\">";
                                }
                        }
                        else {
                                if (isProcessRunning("MMDVMHost")) {
                                        if (checkDMRLogin("MMDVMHost") > 0) { echo "<td style=\"background:#ff9; color:#030; width:50%;\">"; }
                                        else { echo "<td style=\"background:#0b0; color:#030; width:50%;\">"; }
                                } else {
                                        echo "<td style=\"background:#b00; color:#500; width:50%;\">";
                                }
                        }
                }
                
... repeaterinfo.php excerpt:
<table>
  <tr><th colspan="2"><?php echo $lang['net_status'];?></th></tr>
  <tr><?php showMode("D-Star Network", $mmdvmconfigs);?><?php showMode("DMR Network", $mmdvmconfigs);?></tr>
  <tr><?php showMode("System Fusion Network", $mmdvmconfigs);?><?php showMode("P25 Network", $mmdvmconfigs);?></tr>
  <tr><?php showMode("YSF2DMR Network", $mmdvmconfigs);?><?php showMode("NXDN Network", $mmdvmconfigs);?></tr>
  <tr><?php showMode("YSF2NXDN Network", $mmdvmconfigs);?><?php showMode("YSF2P25 Network", $mmdvmconfigs);?></tr>
  <tr><?php showMode("DMR2NXDN Network", $mmdvmconfigs);?><?php showMode("DMR2YSF Network", $mmdvmconfigs);?></tr>
</table>

Cheers.
---
Daniel
User avatar
MW0MWZ
Site Admin
Posts: 1357
Joined: Wed Apr 04, 2018 9:15 pm
Location: Wales, UK
Contact:

Re: Why is DMR Net now yellow?

Post by MW0MWZ »

f1rmb wrote: Fri Mar 19, 2021 5:59 am It's still possible to do it, I've build some shell command lines for this, but it's overkill in anyway, and still won't work when you have few enabled networks, as entries are mixed, so a connection can hide a disconnected network.
Interesting point, but connected networks stop logging that they are connected, while failed logins keep repeating in the log, so that should not be too much of an issue, and now I do check if the last login message of a type I care about is a success or a fail.

I've tweaked the code based on the comments here, and I'd appreciate some more feedback with the new version.
Andy

73 de MW0MWZ
http://pistar.uk
KE7FNS
Pi-Star Team
Posts: 1951
Joined: Wed Apr 17, 2019 11:11 pm

Re: Why is DMR Net now yellow?

Post by KE7FNS »

f1rmb wrote: Fri Mar 19, 2021 6:46 am A red "DMR Net" means MMDVMHost or DMRGateay (depending on the configuration) process is not running (showMode(), called from repeaterinfo.php).
Interesting, I thought its label and color conveyed something else, my mistake.
If someones previous actions are any indication of their future actions, then I predict the deletion and removal of access will happen at any moment. 7-11-2020.

"07/13/20 This Website Has Been Taken Down" ... again :lol:
User avatar
G8SEZ
Posts: 437
Joined: Fri Apr 13, 2018 8:26 pm

Re: Why is DMR Net now yellow?

Post by G8SEZ »

KE7FNS wrote: Fri Mar 19, 2021 6:04 pm
f1rmb wrote: Fri Mar 19, 2021 6:46 am A red "DMR Net" means MMDVMHost or DMRGateay (depending on the configuration) process is not running (showMode(), called from repeaterinfo.php).
Interesting, I thought its label and color conveyed something else, my mistake.
I think it's fair to make this mistake, I found that prior to the changes that Andy made in the last week or two I could have a green Net indication but at the same time a live log window could show repeating login attempt->login failure until I fixed the underlying problem (usually password related). The yellow Net case is a very useful addition for me.
--

Brian G8SEZ
KE7FNS
Pi-Star Team
Posts: 1951
Joined: Wed Apr 17, 2019 11:11 pm

Re: Why is DMR Net now yellow?

Post by KE7FNS »

MW0MWZ wrote: Fri Mar 19, 2021 5:52 pm I've tweaked the code based on the comments here, and I'd appreciate some more feedback with the new version.
I got confused looking at the recent code.

The last else should be indented.

Code: Select all

if (strpos($logCheckMMDVMHostDMRLogin, "success")) { return 0; }
  elseif (strpos($logCheckMMDVMHostDMRLogin, "fail")) { return 1; }
  else { return 0; }
https://www.php.net/manual/en/control-s ... elseif.php
If someones previous actions are any indication of their future actions, then I predict the deletion and removal of access will happen at any moment. 7-11-2020.

"07/13/20 This Website Has Been Taken Down" ... again :lol:
KE7FNS
Pi-Star Team
Posts: 1951
Joined: Wed Apr 17, 2019 11:11 pm

Re: Why is DMR Net now yellow?

Post by KE7FNS »

G8SEZ wrote: Fri Mar 19, 2021 6:43 pm I think it's fair to make this mistake, I found that prior to the changes that Andy made in the last week or two I could have a green Net indication but at the same time a live log window could show repeating login attempt->login failure until I fixed the underlying problem (usually password related). The yellow Net case is a very useful addition for me.
I find the whole indicator bars pretty much meaningless now. It doesn't really do what the labels indicate, and multiple calls to the same process check seem to just add to overhead.
If someones previous actions are any indication of their future actions, then I predict the deletion and removal of access will happen at any moment. 7-11-2020.

"07/13/20 This Website Has Been Taken Down" ... again :lol:
AF7FS
Posts: 8
Joined: Sat Aug 18, 2018 3:31 am

Re: Why is DMR Net now yellow?

Post by AF7FS »

I'll monitor the "DMR Net" status for a while to identify the impact to the connection. The status changed yellow on a DMR net 2 days ago and I did a reset back to green before my turn to check-in. At least I know the yellow indicator means something unusual is going on in the DMR network while I am still connected since the "DMR Net" status is not red. I have switched BM Servers and not sure if that made a difference yet.
Post Reply