Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Session Logging issue using Zymatic #184

Open
jdmbeer opened this issue Jan 7, 2021 · 19 comments
Open

Session Logging issue using Zymatic #184

jdmbeer opened this issue Jan 7, 2021 · 19 comments

Comments

@jdmbeer
Copy link

jdmbeer commented Jan 7, 2021

Currently running a brew - no apparently issues. However from the server side there is no "Session" Data being reported. The previous "test" brew I ran "water only" appeared to only report session data for about the first 5 minutes. Seemed to correlate with when I looked at the graph. Current session not reporting. Below is a screen shot from "sudo systemctl status rc.local -n 200
" command
Let me know If I can gather more information
Thanks. JM

no_session_data

@chiefwigms
Copy link
Owner

chiefwigms commented Jan 7, 2021

If you go to the about menu, what hash of the server are you running?, Also can you try to past the full log (increase 200) and paste the full text (the screen capture cut off some of the log messages)

@jdmbeer
Copy link
Author

jdmbeer commented Jan 7, 2021

IS this the hash you are looking for? local version: bc24aca
Let me get the file info for you

@chiefwigms
Copy link
Owner

Yep - looks like you're on the latest code. If you can get me a full log w/ how it connected to the session i can debug. It looks like it's trying to dump data in to a session that's malformed somehow

@jdmbeer
Copy link
Author

jdmbeer commented Jan 7, 2021

actually seems like it updated without my knowledge because I noticed that the "devices" function is on there - which is pretty cool. Is there a permanent name / location of the file it writes to? I can pull it with SCP and drop it in

@chiefwigms
Copy link
Owner

we have it set to update every boot ;)
you could do "sudo systemctl status rc.local > /picobrew_pico/debug_log.txt" and grab it off the app samba share (\raspberrypi\app i think?)

@jdmbeer
Copy link
Author

jdmbeer commented Jan 7, 2021

I had to direct it to /home/pi to get it to write. Not sure this is what you wanted though... let me know

debug_log.txt

@chiefwigms
Copy link
Owner

chiefwigms commented Jan 7, 2021

thats it but only has 10 lines... try "sudo systemctl status rc.local -n 20000 > /home/pi/debug_log.txt"
using the line count and keep incrementing it until you can see

 * Environment: production
   WARNING: This is a development server. Do not use it in a production deployment.
   Use a production WSGI server instead.
 * Debug mode: off
 * Running on http.......```

@jdmbeer
Copy link
Author

jdmbeer commented Jan 7, 2021

Here is the file. the first one didn't start the way you indicated so I went with 22000 lines and it didn't change, but here is the file.
and of course the brew just died with a fatal error #1... ugh
debug_log.txt

@chiefwigms
Copy link
Owner

So from the looks of it, it appears that the Zymatic was sending data logs already, so it appears that the PI lost power? it should If it had an active session, it should have recovered (you can check by looking to see if theres anything in /picobrew_pico/app/sessions/brew/active). If not, i'm not sure how it got to a point where it was logging data already.

Are you connected via wifi or ethernet?

@jdmbeer
Copy link
Author

jdmbeer commented Jan 7, 2021

Zy connects via ethernet to pi. That's interesting, I'll look in that directory when I get it back together.

@jdmbeer
Copy link
Author

jdmbeer commented Jan 7, 2021

Wondering if maybe during all of the taking it apart and burping Glycol maybe I accidentally shut off the Pi before the Zy. looking now there is a session file from 1/1/21 when I was test brewing. Then there is a file from 2:09 today when I originally started, then a 3rd from when I restarted

@tmack8001
Copy link
Collaborator

Could be @jdmbeer.

If you don't mind delete all those active brew files and go from a clean slate (I want to expose the ability to "close" or "end" a detected active session in the UI... But samba share can do that for you).

Keep using the server and your Zy and let us know here if this happens again and if you possibly can have reproduction steps that would be awesome. Thanks for being so detailed in your messaging so far that is a great help!

@tmack8001
Copy link
Collaborator

@jdmbeer did you by chance add an alias for your device during an active session?

I did this today (on a new vanilla install) and wanted to test some of these new features during a brew... And noticed that my session got abandoned and a brand new one was created (without the initialize session being sent, cause the machine was already brewing).

I created an issue to track the fix for that in case this is similar to what you experienced.

@jdmbeer
Copy link
Author

jdmbeer commented Jan 10, 2021 via email

@tmack8001
Copy link
Collaborator

complaining that the routes_frontend.py was failing

So you have more data as to why it was complaining about? Likely the file left over in the active directory was an issue or something like that?

@jdmbeer
Copy link
Author

jdmbeer commented Jan 11, 2021 via email

@jdmbeer
Copy link
Author

jdmbeer commented Jan 11, 2021 via email

@jdmbeer
Copy link
Author

jdmbeer commented Jan 31, 2021

I wanted to update this string. Now running beta6. Started a session, noticed that I'm not seeing any session data at all. I'm attaching the logs and the json that is being built in the active session folder. Then I notice that I had a connection open on two browser tabs, When I switched to the other browser tab it was showing the session data. I thought - great! it was some weird glitch because I have multiple tabs open. I close the newer tab and go back to the session window.. and the graphic disappears.
nginx.access.log
picobrew_pico.log
20210131_150937#abc0391a0000#e87382694c81468c9ad7a557ee25cbfc#TBNL_Dr_Rudi_v2_json.txt

I also notice that in the picobrew log it thinks the session has been running for over a week. I know the beerberry was turned off, but the browser tab persisted. I'm wondering if maybe since the tab remained the "session" was never timed out. So this may be two issues, or they may be related, Either way I wanted to provide more data.

update - changing from the Dissenter Browser to Opera seemed to allow the graphs to present. I'm still not sure if there is a session issue there or not

@tmack8001
Copy link
Collaborator

The browser/frontend doesn't toggle session start or end that is the responsibility of the device and the server communicating.

We do stream data from the session into your open browser tabs via the socketio interface we setup (creates a lot of back and forth noise in the logs).

Next time when you start a session do a forced cache clearing in your browser (or simply start an incognito window) and see if there are any errors being reported in the browser's console logs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants