Starting with launchd on OSX server 10.10

Get help with all aspects of SABnzbd
Forum rules
Help us help you:
  • Are you using the latest stable version of SABnzbd? Downloads page.
  • Tell us what system you run SABnzbd on.
  • Adhere to the forum rules.
  • Do you experience problems during downloading?
    Check your connection in Status and Interface settings window.
    Use Test Server in Config > Servers.
    We will probably ask you to do a test using only basic settings.
  • Do you experience problems during repair or unpacking?
    Enable +Debug logging in the Status and Interface settings window and share the relevant parts of the log here using [ code ] sections.
Post Reply
mbabauer
Newbie
Newbie
Posts: 11
Joined: March 24th, 2015, 9:01 am

Starting with launchd on OSX server 10.10

Post by mbabauer »

I am trying to get sab to start on a Mac Mini i5 w/ 8gb RAM running 10.10 (El Capitan) and OS X Server 5.0.15.

I first downloaded the OS X package for SAB and dropped it into /Applications. Just make things easy, I launched it once as my user and configured everything to ensure it was working well, which created some config/ini files in /Users/<myuser>/Library/Application Support/SABnzbd.

I then created a new user `sabnzbd` in my Open Directory, logged in to make sure the proper folders were created in /Users/sabnzbd, then moved the generated files from launching it as myself over to this users ~/Library, chowned them appropriately, and created the following launchd script:

Code: Select all

<?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>Label</key>
   <string>com.sabnzbd.daemon</string>
   <key>ProgramArguments</key>
   <array>
      <string>/Applications/SABnzbd.app/Contents/MacOS/SABnzbd</string>
      <string>-f</string>
      <string>/Users/sabnzbd/Library/Application Support/SABnzbd/sabnzbd.ini</string>
   </array>
   <key>UserName</key>
   <string>sabnzbd</string>
   <key>WorkingDirectory</key>
   <string>/Users/sabnzbd</string>
   <key>RunAtLoad</key>
   <true/>
</dict>
</plist>
But, when I ran it, nothing happens. So I tried running the following as the `sabnzbd` user from CLI:

Code: Select all

/Applications/SABnzbd.app/Contents/MacOS/SABnzbd -f /Users/sabnzbd/Library/Application Support/SABnzbd/sabnzbd.ini
But it hangs for a LONG time, then finally I get:
INFO:root:Console logging for OSX App disabled
2016-01-22 09:37:18,143::INFO::[SABnzbd:1255] Console logging for OSX App disabled
Even a Ctrl-C did not quit, so I end up having to kill the process running. I then tried adding `-w 1`, and I get the same hang w/ the following output:
Jan 22 10:09:26 SABnzbd[25903] <Error>: Set a breakpoint at CGSLogError to catch errors as they are logged.
Jan 22 10:09:26 SABnzbd[25903] <Error>: This user is not allowed access to the window system right now.
INFO:root:Console logging for OSX App disabled
2016-01-22 10:09:26,294::INFO::[SABnzbd:1255] Console logging for OSX App disabled
Again, Ctrl-C is still not working, so I have to kill it directly.

How can I troubleshoot what's going on here?
User avatar
shypike
Administrator
Administrator
Posts: 19773
Joined: January 18th, 2008, 12:49 pm

Re: Starting with launchd on OSX server 10.10

Post by shypike »

There might be an issue with IPv6.
To get more info, use the --console parameter.
Try to disable IPv6 with the extra parameter --no_ipv6
mbabauer
Newbie
Newbie
Posts: 11
Joined: March 24th, 2015, 9:01 am

Re: Starting with launchd on OSX server 10.10

Post by mbabauer »

Turned out to be a permissions issue that was solved after I restarted.
Post Reply