-
Notifications
You must be signed in to change notification settings - Fork 86
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
Exception: undefined method `groups' for nil:NilClass (lib/eye/controller/helpers.rb) #230
Comments
Looks like really rare concurrent situation, when in parallel application was deleted and in that time triggered depend_on on another. I would think how to avoid this. |
Thank you, indeed we recently switched to having a separate application per camera, before we used to have a single application for all cameras but it meant needing to restart everything when we made changes. |
Any update? :) |
i not see how to reproduce it and how this can happen, i can only imagine this is celluloid bug. Is it happen again? |
Yes, it happens every few days on one of the 900 or so servers we have :( - So much so, I added a separate process that just tails the eye logs every minute looking for "Exception: undefined method `groups' for nil:NilClass" and restarts eye if it finds this line. It only happens when stopping and starting eye "applications". |
Can you show how config look like schematically? |
i pushed 0.10.1.pre with simple not nil check, maybe it helps, still not understand how this can happen. can you try it? |
The config is a big complex, we use eye to start/stop all the processes required to record an IP camera, this includes proxy process, live view, detector, etc. Before, we used to just stop eye completely, then start eye again. This worked, but meant if someone edited the settings of 1 camera, all cameras had to be restarted. We changed the implementation to report a list of camera IDs that changed and then we run
Once all the camera IDs were stopped and deleted, we run:
Which ensures all cameras are started, internally it gets a list of IDs using a simple get request to the rails app running locally. Maybe this is the wrong way of doing it? I'll try with 0.10.1.pre, thank you! |
Your usage is quite strange, usually not need to call delete, only load command with updated config. It should delete and stop deleted from configs processes (if process have stop_on_delete true). And then you call restart for required processes. |
Reason we need to delete is sometimes the camera configuration changes, so it's not just ensuring all cameras are loaded, but sometimes we need to delete the camera and then load again to make sure that camera is loaded back. We have stop_on_delete true already :) |
One of my servers was misbehaving, so I sshed into it, checked the logs and found the following:
Any ideas what could be causing this and how to prevent in the future?
The text was updated successfully, but these errors were encountered: