Message boards : Questions and problems : Mac OS X : boinc running as a service = no network access
Message board moderation
Author | Message |
---|---|
Send message Joined: 13 Oct 10 Posts: 120 ![]() |
Hi all For many years I've been running boinc as a service on my Mac(s), because I have several accounts on the machine (family Mac) and I want to be sure that's it's always running. I had this setup working fine for years, with several versions of boinc. I used a script found on the wiki to do that, that installed a "BOINCManager.plist" and then I can use sudo launchctl load /Library/LaunchDaemons/com.BOINC.BOINCManager.plist to start the service or sudo launchctl unload /Library/LaunchDaemons/com.BOINC.BOINCManager.plist to stop it (because start and stop command are not enough, it will restart quickly by itself) I know it's running as a service then because I see 24-Apr-2016 14:51:54 [---] Running as a daemon However for quite a long time now (but I never took time to try to solve it, I have a workaround) and I think it started with v7 version of boinc, when running as a service it cannot connect to the network / internet anymore. This happens :
So I have to stop the service with unload and then start boinc manager so it will start in a normal mode, and then all is working fine and projects can be contacted. And not running it as a service is what I've been doing for a long time now so "I can live with it" but then why is it not working as a service ? Thanks for your help. |
![]() Send message Joined: 29 Aug 05 Posts: 15640 ![]() |
Is it possible that the service runs in a different session than the drivers for the network card do and that it therefore needs special enhancements? Can you tell which OS X this is under and with which version number of BOINC? |
Send message Joined: 13 Oct 10 Posts: 120 ![]() |
Mac OS X 10.11.4 and Boinc 7.6.22. This started several boinc (and Mac) versions in the past, "I think" from boinc 7.x, with the same Mac (I had this one since early 2010) but probably older version of OS X, but I can't tell which one). Here is the content of the plist : <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>Disabled</key> <false/> <key>Label</key> <string>com.BOINC.BOINCManager</string> <key>Program</key> <string>/Applications/BOINCManager.app/Contents/resources/boinc</string> <key>ProgramArguments</key> <array> <string>/Applications/BOINCManager.app/Contents/Resources/boinc</string> <string>--allow_remote_gui_rpc</string> <string>--daemon</string> <string>--redirectio</string> <string>--dir</string> <string>/Library/Application Support/BOINC Data/</string> </array> <key>UserName</key> <string>boinc_master</string> <key>RunAtLoad</key> <true/> <key>KeepAlive</key> <true/> <key>OnDemand</key> <false/> </dict> </plist> I do have "boinc_master" and "boinc_project" users, there are also used when running boinc in normal mode. |
Send message Joined: 20 Nov 12 Posts: 801 ![]() |
I found an older thread with similar problem connecting to DNS server, maybe the tip there helps. BOINC on OS X 10.9 refuses to connect to internet Although I have no idea why it works for you in normal mode but not as service. |
![]() Send message Joined: 29 Aug 05 Posts: 15640 ![]() |
Sorry for the wait on this, but I forwarded this thread to the developer of BOINC on the Mac. Perhaps that he knows what causes this. |
Send message Joined: 13 Oct 10 Posts: 120 ![]() |
OK thanks, hopefully they have some idea! |
![]() Send message Joined: 29 Aug 05 Posts: 15640 ![]() |
Answer from Charlie: Charlie Fenton wrote: Hi Jord, |
Send message Joined: 13 Oct 10 Posts: 120 ![]() |
That's definitively an interesting finding, the fact that my definition is missing the name of the group (ie user ?) to be used, thus having an impact on the capacity to use some system level functions. My plist is most certainly a very old one, I never thought it could eventually be updated, I'll try to do this asap. Thanks ! |
Send message Joined: 13 Oct 10 Posts: 120 ![]() |
Changing this parameter in my plist was a bit chaotic, somehow I managed to make it impossible to stop boinc as a service now, I cannot start it from boinc manager anymore, the launchctl command I used to use doesn't want to unload it anymore, it *has* to run as a service now... ... but, but, boinc as a service can now connect to internet ! So I hope it keeps working because I'll be in a big trouble if it doesn't :) Thanks !! |
![]() Send message Joined: 29 Aug 05 Posts: 15640 ![]() |
Great! Thanks, I'll let Charlie know. :-) Oh by the way, the not being able to stop the service, can't that be something to do with permissions, or lack thereof? You could try looking through http://boinc.berkeley.edu/wiki/Tools_for_Mac_OS_X for help on that (rerun permissions). |
Send message Joined: 17 Jul 06 Posts: 287 ![]() |
Hi Jerome, For more information please download and read the comments in http://boinc.berkeley.edu/dl/Make_BOINC_Service.sh (or use the link to it from http://boinc.berkeley.edu/dl/Make_BOINC_Service.sh). Basically, I believe you should be able to stop the service with: sudo launchctl stop edu.berkeley.boinc and restart it with: sudo launchctl start edu.berkeley.boinc If you have installed the boinccmd utility in the BOINC Data folder, you can also stop the daemon using: cd "/Library/Application Support/BOINC Data" ./boinccmd --quit If all else fails, you might try removing your plist file from the /Library/LaunchDaemons folder, run the Make_BOINC_Service script and restart the system. This will install a plist named edu.berkeley.boinc.plist in the /Library/LaunchDaemons folder. If that all works for you, then you can then modify my script as you wish (such as to add the --allow_remote_gui_rpc argument.) Charlie Fenton BOINC / SETI@home Macintosh & Windows Programmer |
Send message Joined: 13 Oct 10 Posts: 120 ![]() |
Hi Charlie Actually I had done a mess : I had both edu.berkeley.boinc.plist and com.BOINC.BOINCManager.plist inside /Library/LaunchDaemons/ :) Therefore, boinc couldn't access Internet this morning, and then after messing around it could again, then the boinc manager couldn't connect to boinc at the first try, but at the second it could... ==> I deleted com.BOINC.BOINCManager.plist and now I think it's OK ! Thanks for your help. |
Send message Joined: 13 Oct 10 Posts: 120 ![]() |
Very weird : each time I start the Mac I have the problem again, it's running as a service and cannot connect to the net... But now it's different : I use "sudo launchctl unload /Library/LaunchDaemons/edu.berkeley.boinc.plist" which stops the service, but then it restarts by itself quickly as a service (and before when I used to stop my previous plist file, it would stop completely that way...), and then it works well, boinc can connect to the net ! Also now I have issues with boinc manager that has a hard time connecting to boinc by itself (it normally starts automatically with my session) and I have to disconnect / reconnect to the client via the menu, and then it works. So I'm a bit confused with the evolution of this issue... |
Send message Joined: 13 Oct 10 Posts: 120 ![]() |
Gee I don't understand anything... today I start up the Mac, boinc manager cannot connect to boinc, I have to manually select localhost, but then I see boinc is running as a service and can connect to the net without me doing anything else... So basically "sometimes it works and sometimes it doesn't" :/ |
Send message Joined: 17 Jul 06 Posts: 287 ![]() |
Hi Jerome, My best guess is that it is a question of timing during the startup process. Perhaps if the BOINC client is started too early problems arise? I'm not sure how to adjust that timing. You could also try the latest BOINC 7.6.32 development build. Are you using the plist created by my Make_BOINC_Service.sh script or your modification of it? Charlie Fenton BOINC / SETI@home Macintosh & Windows Programmer |
Send message Joined: 13 Oct 10 Posts: 120 ![]() |
Hi Charlie The plist should be the one created by the script that I rerun the other day : <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>GroupName</key> <string>boinc_master</string> <key>Label</key> <string>edu.berkeley.boinc</string> <key>Program</key> <string>/Applications/BOINCManager.app/Contents/Resources/boinc</string> <key>ProgramArguments</key> <array> <string>/Applications/BOINCManager.app/Contents/Resources/boinc</string> <string>-redirectio</string> <string>-daemon</string> </array> <key>RunAtLoad</key> <true/> <key>UserName</key> <string>boinc_master</string> <key>WorkingDirectory</key> <string>/Library/Application Support/BOINC Data/</string> </dict> </plist> I only have one in the LaunchDaemons folder (edu.berkeley.boinc.plist). This morning the same happened, the service did start up automatically 07-May-2016 10:14:50 [---] Starting BOINC client version 7.6.22 for x86_64-apple-darwin but when my session opened I had to select manually the localhost from boinc manager cause it couldn't find it, and then I saw network errors, 07-May-2016 10:26:41 [https://am.statseb.fr/] Account manager RPC failed: can't resolve hostname I only "stopped the connected client" from the menu, the service did start up again by itself, 07-May-2016 10:27:49 [---] Exiting and then it was working fine with net access... 07-May-2016 10:28:37 [GoofyxGrid@Home] Sending scheduler request: Requested by project. (I usually don't stop my computer daily but I have family in that room at the moment so I have to turn it off every night) |
Send message Joined: 13 Oct 10 Posts: 120 ![]() |
This morning, situation : - i can see you are right, the service takes quite some time to really start boinc, I can see boinc process in memory not launching anything for a good moment, and then after several minutes the boinc tasks are loaded in memory - boinc manager did start at the same time, so I guess it doesn't find boinc process is already running - when I open it it's not connected, I have to select computer localhost and it's ok (not a big deal) - and this morning net access was OK from the beginning, I didn't have to do anything actually... |
Send message Joined: 17 Jul 06 Posts: 287 ![]() |
I have thought of a couple of suggestions which may help. If you don't already have your BOINC preferences set to suspend network activity when the computer is in use, try setting that. If you set it to suspend network activity when the computer has been in use within the last 3 minutes (for example), then I believe this will prevent network activity for the first 3 minutes after the system is booted. This may ensure that everything needed for the system to access the Internet is operational before BOINC tries to contact project servers. To do this, set BOINC Computing Preferences to "Suspend when computer is in use" and set the Activity menu to "Network activity based on preferences". If you don't want to suspend CPU and GPU activity when the computer is in use, you can set "Run always" and "Run GPU always" in the Activity menu. Also, you might try removing the BOINCManager login item (under System Preferences / Users and Groups / Login items) to ensure that BOINC Manager doesn't try to start the client at the same time the LaunchDaemon plist is trying to start it as a service. If you do this, then you will need to start the manager manually when you wish to use it. Charlie Fenton BOINC / SETI@home Macintosh & Windows Programmer |
Copyright © 2025 University of California.
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License,
Version 1.2 or any later version published by the Free Software Foundation.