OSX Server

For discussion of topics specific to MythTV on OSX
leejk
Junior
Posts: 65
Joined: Wed Mar 18, 2015 1:51 am

OSX Server

Post by leejk »

Hi,

I have mythtv running on a quad core Mac mini & Yosemite.... was wondering if there'd be any issue if I installed OSX Server onto it? I'd like to use the extra power the machine has for some other tasks. Just wondering if anyone else has tried it.

Thx
User avatar
pvr4me
Senior
Posts: 764
Joined: Fri Feb 07, 2014 7:25 pm
Location: near Toronto, Canada
Contact:
Canada

Re: OSX Server

Post by pvr4me »

I've used a virtual machine running OS X Server (10.6.8) for building and testing the all-in-one installer and I've never noticed any problems that I could attribute to Server.

I guess it depends on how much your Myth box is doing currently and what these "extra tasks" involve. For example, if you are transcoding multiple streams for (say) iPad playback, that's already a heavy workload. If your box is also a frontend while recording and commflagging multiple channels, that's a heavy-ish workload.

BTW, Myth on Mac tends to need more RAM than you'll see recommended for Linux systems. OS X has never done very well when pushed to use swap.

You can use ssh to look at top while your box is working to get an idea of what your current CPU and RAM usage are. Or Command-Tab to Activity Monitor for a graphical view. Then you'll have to guess whether your extra tasks will be OK or too much! ;)

Craig
Formerly the MacPorts guy.
Gribnif
Junior
Posts: 89
Joined: Wed May 14, 2014 12:46 pm
United States of America

Re: OSX Server

Post by Gribnif »

From what I've heard, OS X Server is really the same as the Desktop version, with just a few extra configuration utilities and daemons. There's no reason it would work any differently as far as Myth is concerned.
leejk
Junior
Posts: 65
Joined: Wed Mar 18, 2015 1:51 am

Re: OSX Server

Post by leejk »

Ok, thx for the info. Currently that Mac just has to run MythTV while watching TV on a Kodi front end, which is on another machine. CPU usage is currently pretty low. It's got 16GB of ram too.
sfatula
Senior
Posts: 163
Joined: Sun Aug 09, 2015 3:51 am
Location: Calera, OK
United States of America

Re: OSX Server

Post by sfatula »

I am using mythtv and OSX server with zero issue. mythtv is not much load at all, even recording 6 channels at once. Separate drive of course...
leejk
Junior
Posts: 65
Joined: Wed Mar 18, 2015 1:51 am

Re: OSX Server

Post by leejk »

I've installed OS X Server and it must have stepped on MythWeb, as I can't connect to it anymore. I do not have the web services in OS X Server turned on, so perhaps the install stepped on the web server portion of MythWeb. My guess is that I need to incorporate the MythWeb module into the OS X Server's web server, but not sure where to start. Before I start troubleshooting, does anyone have an idea as to what I should start with first?

thx
leejk
Junior
Posts: 65
Joined: Wed Mar 18, 2015 1:51 am

Re: OSX Server

Post by leejk »

Ok, I decided to experiment :)

I copied the /opt/dvr/apache2/htdocs/MythWeb directory to the OS X Server web directory: /Library/Server/Web/Data/Sites/Default
I added the MythWeb Include directive to /Library/Server/Web/Config/apache2/httpd_server_app.conf
I modified /Library/Server/Web/Data/Sites/Default/MythWeb/mythweb.conf to reflect the new path locations.
I backed up /Library/Server/Web/Config/php/php.ini to php.ini.org
I copied /opt/dvr/etc/php54/php.ini to /Library/Server/Web/Config/php/php.ini, and merged in the values of the original QS X php.ini version

In the OS X server config app, I turned on web services and php.

I stopped the original MythWeb process using the command from the Macports MythWeb wiki page.

And the screenshot shows as far as I've gotten. Any ideas?
Screen Shot 2015-09-25 at 11.21.28 AM.png
Screen Shot 2015-09-25 at 11.21.28 AM.png (47.49 KiB) Viewed 5538 times
sfatula
Senior
Posts: 163
Joined: Sun Aug 09, 2015 3:51 am
Location: Calera, OK
United States of America

Re: OSX Server

Post by sfatula »

I can't comment unfortunately as I use the Macports installer. Just installed OSX server 5.0 yesterday, no impact at all on mythtv. Perhaps there is some key difference with the other installer you are using.
leejk
Junior
Posts: 65
Joined: Wed Mar 18, 2015 1:51 am

Re: OSX Server

Post by leejk »

Does MythWeb work for you? MythTV itself works fine still.

thx
sfatula
Senior
Posts: 163
Joined: Sun Aug 09, 2015 3:51 am
Location: Calera, OK
United States of America

Re: OSX Server

Post by sfatula »

Perfectly. You might want to check your IP address, perhaps you have the wrong one? If you cannot connect, it tells you the IP and port it can not connect to in mythweb. You can compare the IP vs the one assigned to your Mac.
User avatar
pvr4me
Senior
Posts: 764
Joined: Fri Feb 07, 2014 7:25 pm
Location: near Toronto, Canada
Contact:
Canada

Re: OSX Server

Post by pvr4me »

leejk wrote:Ok, I decided to experiment :)

I copied the /opt/dvr/apache2/htdocs/MythWeb directory to the OS X Server web directory: /Library/Server/Web/Data/Sites/Default
I added the MythWeb Include directive to /Library/Server/Web/Config/apache2/httpd_server_app.conf
I modified /Library/Server/Web/Data/Sites/Default/MythWeb/mythweb.conf to reflect the new path locations.
I backed up /Library/Server/Web/Config/php/php.ini to php.ini.org
I copied /opt/dvr/etc/php54/php.ini to /Library/Server/Web/Config/php/php.ini, and merged in the values of the original QS X php.ini version

In the OS X server config app, I turned on web services and php.
...
Check that user "_www" has write access to /Library/Server/Web/Data/Sites/Default and the MythWeb directories underneath.

I don't know what modules Apple delivers with Apache. Might create a problem.

I presume Apple's PHP will be used and I think you will also have to configure it to look for the MariaDB socket. See

https://www.mythtv.org/wiki/MythWeb_via ... figuration

Good luck!

Craig
Formerly the MacPorts guy.
leejk
Junior
Posts: 65
Joined: Wed Mar 18, 2015 1:51 am

Re: OSX Server

Post by leejk »

As a follow up, I was able to get the original MacPorts MythWeb working. It turns out that for some reason now after the mac mini is restarted, I haver to stop and restart MythWeb, else it can't be accessed.

Craig, I'll try your suggestion when I get another chance... it probably is just a permissions thing, since I copied those file from /opt/dvr, the permissions might be wrong.
User avatar
pvr4me
Senior
Posts: 764
Joined: Fri Feb 07, 2014 7:25 pm
Location: near Toronto, Canada
Contact:
Canada

Re: OSX Server

Post by pvr4me »

leejk wrote:As a follow up, I was able to get the original MacPorts MythWeb working. It turns out that for some reason now after the mac mini is restarted, I haver to stop and restart MythWeb, else it can't be accessed.
If you restart and Mythweb isn't working, look in Console.app to see if there are any error messages from "http" or launchd. You might also find something at /opt/dvr/apache2/logs/ .
Craig, I'll try your suggestion when I get another chance... it probably is just a permissions thing, since I copied those file from /opt/dvr, the permissions might be wrong.
It will be easier to do future upgrades if you stick to a vanilla install. But if you like a challenge, go for it! ;)

Craig
Formerly the MacPorts guy.
sfatula
Senior
Posts: 163
Joined: Sun Aug 09, 2015 3:51 am
Location: Calera, OK
United States of America

Re: OSX Server

Post by sfatula »

Hah, I was wrong, wrong machine! I have the exact same behavior, mythweb does not work upon reboot. Even though mythtv startup / stop SAYS it's running (the macports script), I have to stop it and start it in order for mythweb to work. This is after OSX server 5.0.

I can debug this when I get a chance. Which isn't right now, got an extra early morning. I am guessing it might be a startup sequence error. Could be lots of things though. There was not mythbackend log before restarting it, so, it may indeed not be running (did not check other than the script). But the launchctl script should be starting it and restarting it if there is an error, so, a little surprising.
User avatar
pvr4me
Senior
Posts: 764
Joined: Fri Feb 07, 2014 7:25 pm
Location: near Toronto, Canada
Contact:
Canada

Re: OSX Server

Post by pvr4me »

sfatula wrote:Hah, I was wrong, wrong machine! I have the exact same behavior, mythweb does not work upon reboot. Even though mythtv startup / stop SAYS it's running (the macports script), I have to stop it and start it in order for mythweb to work. This is after OSX server 5.0.

I can debug this when I get a chance. Which isn't right now, got an extra early morning. I am guessing it might be a startup sequence error. Could be lots of things though. There was not mythbackend log before restarting it, so, it may indeed not be running (did not check other than the script). But the launchctl script should be starting it and restarting it if there is an error, so, a little surprising.
Previously, launchd used to try to run mythbackend every 10 seconds which, if it wasn't properly set up, was way overkill. I changed that to 600 seconds, 10 minutes. Hindsight suggests I went a bit too far--2 minutes might be a better tradeoff. Anyway, if you are patient, mythbackend ought to come up.

Craig
Formerly the MacPorts guy.
Post Reply