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
The macOS agent fails to start after installation #461
Comments
after a phew weeks, I finally figured out the solution to this problem on Sonoma OSX 14.4+, and to be honest it's quite simple to fix. you need to change the first line of the following file: the first line will have the content: and you need to update it to: and that is it, fixed |
@cainatplugify Okay, that helped partially (thank you a lot), but have you ever encountered the fact that
I also managed to fix all the errors on Intel with your fix, but the agent still doesn't communicate with the server. |
Hi @6lvckmania, Can you confirm that this is happening on Sonoma 14.4+ systems only ? Do you have multiple perl versions installed ? Regards, |
Hi @Lea9250, I installed my Macbook Pro M3 at the end of January. I can confirm that during that time the agent worked. I do not remember when I updated to 14.4 or 14.4.1 exactly. But the agent logging stopped on 11 April. When an update is available I usually update within a few weeks. I'm pretty certain I ran 14.4 before upgrading to 14.4.1 in april. I believe it is likely the issue was introduced in 14.4.1. Unfortunately, I have no other macOS system at my disposal to test. macOS Sonoma 14.4 - Released March 7, 2024 Agent version: https://github.com/OCSInventory-NG/UnixAgent/releases/download/v2.10.1-MAC/Ocsinventory_Unix_Agent-2.10.1-MAC.tar.gz After executing below, there's no new entries in /var/log/ocsng.log. Last ones are from 11 April.
Changing the perl in version to 5.30 does not fix the issue.
-----EDIT-----I have resolved the issue with Util.bundle and have been able to start the agent by renaming EDID.pm. Both are required to be able to start the agent on Apple Silicon (M3).
Util.bundle mach-o FixDownloaded the source of List::Util: https://cpan.metacpan.org/authors/id/P/PE/PEVANS/Scalar-List-Utils-1.63.tar.gz
Copy Util.bundle from your compile location Scalar-List-Utils-1.63/blib/arch/auto/List/Util and place it in: /Applications/OCSNG.app/Contents/Resources/lib/darwin-thread-multi-2level/auto/List/Util After launching I am getting the same errors as reported by @6lvckmania:
In regards to sysctl error 'machdep.cpu.vendor'. This does not appear to be available on Mac Silicon. Unsure of Intel Mac's. This does not prevent the agent from starting though.
Workaround EDID.pm errorsI renamed EDID.pm to end in .bak in /Applications/OCSNG.app/Contents/Resources/lib/Parse/ and started the agent. On the inventory server I can see the agent made contact. This has also appeared to fix the "$idate in localtime" error in OS.pm. Last inventory: 04/16/2024 22:27 I don't know how important https://metacpan.org/pod/Parse::EDID is for OCS. Going by the description of the project. I could probably do without the information.
|
Hi! Updating to #!/usr/bin/perl5.30 fixed it for me on Macbook Air A1392 Intel CPU/ Sonoma 14.4.1. |
General Information
OCS Inventory Information
Problem Description
The macOS agent fails to start after installation. Upon launching the client on a clean laptop, it immediately closes without contacting the server. Additionally, despite specifying in the settings for the ocsng.log file to be created, it remains absent. This issue manifests inconsistently across different machines.
Please advise on resolving this issue and identifying its root cause.
Inventory Log File (Optional)
No ocsng.log file has been created.
The text was updated successfully, but these errors were encountered: