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

MacOS agent not working after sleeping/locking/unlocking #29

Open
BornTKill opened this issue Feb 7, 2025 · 11 comments
Open

MacOS agent not working after sleeping/locking/unlocking #29

BornTKill opened this issue Feb 7, 2025 · 11 comments

Comments

@BornTKill
Copy link

BornTKill commented Feb 7, 2025

Dear @schorschii

My OSX users (like most OSX users) never/rarely logoff or turnoff their computers. They are used to close the lid / lock / unlock and not shutdown/logoff/logon session.
We have notice that oco-agent is not resuming/working in this case. So oco is not working well for these users.
We often need to

sudo launchctl unload /Library/LaunchDaemons/systems.sieber.oco-agent.plist
sudo launchctl load /Library/LaunchDaemons/systems.sieber.oco-agent.plist

We plan as a workaround to use SleepTight/SleepWatcher but i think that is not the best solution.

https://github.com/qiuosier/SleepTight
https://www.bernhard-baehr.de/

Thank you for your help.

@POLYANKA123456
Copy link

Any updates on this issue ? 50% of our users are affected by this bug, and we have to restart them manually to reload the oco-agent. Is there any solution to keep the agent alive ?

Thanks for your help.

@schorschii
Copy link
Owner

schorschii commented Feb 13, 2025

I'm currently unable to reproduce it so I rely on your information to debug this.

Does this affect a specific model, maybe only the newer Macs with Apple ARM silicon? Unfortunately, I only own an older Intel Mac. Are you using the ARM build of OCO agent? Can you test if using the x86 build on ARM works better? It should be executable using Rosetta 2.

Also, please add the following lines into /Library/LaunchDaemons/systems.sieber.oco-agent.plist:

<key>StandardErrorPath</key>
<string>/tmp/oco-agent.stderr</string>
<key>StandardOutPath</key>
<string>/tmp/oco-agent.stdout</string>

Then reload the service. It should now log the output into these files. Weirdly, the files are filled by launchd only after stopping the service again. After the agent stopped working, please have a look at these files for suspicious lines and report them here.

@BornTKill
Copy link
Author

We are running x86 version on all mac (Intel and Apple Silicon)

Maybe not a good idea ?

@schorschii
Copy link
Owner

Yes, in this case, please test the ARM build on ARM macs.

@BornTKill
Copy link
Author

Ok will do it and let you know.

Should be great to be able to have architecture compatibility in deployment like we have for OS. I miss something ?

@schorschii
Copy link
Owner

schorschii commented Feb 26, 2025

@POLYANKA123456 , @thorm42 you can test and contribute information too if you are interested in a solution.

@BornTKill
Copy link
Author

@POLYANKA123456 , @thorm42 you can test and contribute information too if you are interested in a solution...

They both work with me :)
Test in progress

@schorschii
Copy link
Owner

They both work with me :)
Test in progress

Thanks! Good to know :)

@BornTKill
Copy link
Author

Still have the same issue. Next step

StandardErrorPath
/tmp/oco-agent.stderr
StandardOutPath
/tmp/oco-agent.stdout

@schorschii
Copy link
Owner

Does this problem appear on all Macs or on x86 or ARM Macs only?

@BornTKill
Copy link
Author

We will Check and update you

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