Logic Machine Forum
Web / app access freezes system from Moasic beta - Printable Version

+- Logic Machine Forum (https://forum.logicmachine.net)
+-- Forum: LogicMachine eco-system (https://forum.logicmachine.net/forumdisplay.php?fid=1)
+--- Forum: Application Store (https://forum.logicmachine.net/forumdisplay.php?fid=11)
+--- Thread: Web / app access freezes system from Moasic beta (/showthread.php?tid=3712)



Web / app access freezes system from Moasic beta - clue9 - 29.11.2021

Hi. My LM5-kcd  is having a issue I can't resolve further on my own. Started some months ago, and I have coped with the issue for some time. 
The system freezes from time to time when interacting with moasic 3.0 beta (tried many releases now), and I also did a complete factory on recovery from backup with no luck. When this happens, no log entry is applied so I have no clue what's going on.  I tried to change my moasic widgets, ad I noticed some changes in the templates recent. (Temp,Co, humidity now need all 3 fields)  wrote my own clean temp widget to rule out that as a problem. 
System freezes and is unresponsive for 2-3 minutes as it comes up again.  Not reacable per webbrowser (local), or app when this happens. Strange is that remote login seems to work sometimes in this.mode. 
I also noticed that some users getting the 403 error when trying to log in. Checked all settings twice, but can't figure something is wrong in users setting compared to similar users working. Tried both ios, android and web (Chrome and safari)for these users. Main users is ok. 
Could this be a moasic beta problem, or some main configuration issue?
Backups or zerotier access for debugging?


RE: Web / app access freezes system from Moasic beta - Daniel - 29.11.2021

First thought is that you run out of Memory and LM keeps rebooting.


RE: Web / app access freezes system from Moasic beta - admin - 29.11.2021

This can also be a hardware issue. Check the System uptime in System Config > Status > System status. Also see if you can still ping the device when this happens.


RE: Web / app access freezes system from Moasic beta - clue9 - 29.11.2021

(29.11.2021, 08:24)Daniel Wrote: First thought is that you run out of Memory and LM keeps rebooting.

Here is screenshot taken and checked in paralell about 30 sec before it stoppet responding again... Was navigating in Moasic an hit the x to go to main menu in app when it stopped responding.  Responsive at ping, but misses some packages. 
Where able to recreate the steps in Moasic (latest beta running 20211108) 
I have the latest firmware 20211014
Make notice I have seen this a while and have tried many firmwares and apps over time.
I run moasic instance 2, 3 and 4 app in paralell for some users, those apps is a different version 20191102
But the problem pick up in both, but more rare I think.

(29.11.2021, 08:34)admin Wrote: This can also be a hardware issue. Check the System uptime in System Config > Status > System status. Also see if you can still ping the device when this happens.

System is responsive to ping, but misses some packages when this is occuring. System uptime is not reset. System comes back up after some minutes.
83% free memory.
Se PM sent to admin and Daniel with device backup.


RE: Web / app access freezes system from Moasic beta - admin - 30.11.2021

This looks like a network issue of some sort. Can you provide what you get in System Config > Status > System log?


RE: Web / app access freezes system from Moasic beta - clue9 - 30.11.2021

(30.11.2021, 09:41)admin Wrote: This looks like a network issue of some sort. Can you provide what you get in System Config > Status > System log?

Here is the current log. Note i did a factory reset some days ago. No new listing here.
System is a microtik RB1200 router, with a HP aruba 2530 48G PoeP switch. Lm is not supplied with poe , it's a separate powersupply from Schneider supplying it. 
Wifi network is also aruba, mobility controller 3200  running 8 accesspoints.


RE: Web / app access freezes system from Moasic beta - clue9 - 01.12.2021

Now i have had a night of extended testing at home, playing with local network, wifi network and firewall/NAT at home. All along i have had 6 continious ping logging going against router, switch, Wifi controller and logic-machine. Same logging from 2 different pc's, one at ethernet cable and one over Wifi.
Can't find any correlation with the faults i experience with LM freezing up due to changes in network (cheked even the spanning tree and LACP protocols)
In LM i tried to disable/remove Amazon alexa app, google home app, also disabled zerotier. No change.
I'm left with the Moasic app, canx apps and zigbee app installed, with same results.
I notice problem arize when i close moasic and comes back to dashboard in LM app on android. Then everyting freezes, including local access in webbrowser on pc.
In some accation i however reach the system over cloud access from the app if i force close it on android and opens again. Cloud opens fine and I can control system, but no response/connection on local control.
All the time i have normal ping response from the device from the two pc's who is logging the system. So it's seems to be ok on the network side.
I starting to have a feeling something is wrong with the moasic system. It seems to happen if i navigate around moasic and close moasic back to dashboard.

Could it be som kind of token that is not released/closed and wait's for a timeout, hence the wait time with no response, or some kind of user blocking due to some error?


RE: Web / app access freezes system from Moasic beta - admin - 01.12.2021

If you are saying that ping does not stop and cloud is working then something might be blocking the web server worker process.
Run this script once to add more worker processes and see if you still get this issue:
Code:
os.execute('sed -i "s/worker_processes 1/worker_processes 3/" /etc/nginx.conf; /etc/init.d/nginx reload')
This is a temporary work-around. If it helps with the issue then we can check what is happening on the web server part further.


RE: Web / app access freezes system from Moasic beta - clue9 - 02.12.2021

(01.12.2021, 06:42)admin Wrote: If you are saying that ping does not stop and cloud is working then something might be blocking the web server worker process.
Run this script once to add more worker processes and see if you still get this issue:
Code:
os.execute('sed -i "s/worker_processes 1/worker_processes 3/" /etc/nginx.conf; /etc/init.d/nginx reload')
This is a temporary work-around. If it helps with the issue then we can check what is happening on the web server part further.

This works. The problems seems to be gone for now. I will monitor the next day.


RE: Web / app access freezes system from Moasic beta - admin - 02.12.2021

Can you provide remote access via ZeroTier so we can figure out what's causing this issue?


RE: Web / app access freezes system from Moasic beta - clue9 - 02.12.2021

(02.12.2021, 08:48)admin Wrote: Can you provide remote access via ZeroTier so we can figure out what's causing this issue?

I send a pm


RE: Web / app access freezes system from Moasic beta - admin - 10.01.2022

@clue9, the cause of this issue has been found. A bug in the app triggers a bug in LM which is very hard to trigger otherwise. An update will be published later.


RE: Web / app access freezes system from Moasic beta - clue9 - 15.02.2022

(10.01.2022, 08:34)admin Wrote: @clue9, the cause of this issue has been found. A bug in the app triggers a bug in LM which is very hard to trigger otherwise. An update will be published later.

Good thing!
I been quite busy last month so i haven't been able to follow up this case for some time, just noticed your reply on the issue.
Any progress on this?  I noticed and updated Moasic 3.0 to 20220114 for some time ago, but i still do the workaround script.
Maybe it time to try again?


RE: Web / app access freezes system from Moasic beta - admin - 16.02.2022

A newer firmware is needed to solve this but it's not ready yet. We are also looking into the mobile app bug that's causing it.