LinHES Forums http://forum.linhes.org/ |
|
Understanding LinHes/Or How to Have 2 Myth Boxes http://forum.linhes.org/viewtopic.php?f=11&t=3428 |
Page 1 of 2 |
Author: | jesse [ Wed Feb 02, 2005 11:52 pm ] |
Post subject: | Understanding LinHes/Or How to Have 2 Myth Boxes |
At http://www.mysettopbox.tv/linhes.html Cecil has a mini-how-to. I thought I would elaborate on it as I recently made some more changes to my setup and used some of these instructions. This also assumes that you have 2 machines. One is a MBE (Master Backend) and the other is a SBE (Slave Backend). The MBE keeps the program database, settings, and files. The SBE connects as needed and can play the recorded TV programs or videos. **Start with an AUTO-INSTALL on both machines. Customization: This step adds a way to tie a name like mbe.mysettopbox.tv to an IP Address. On the MBE: 1. Open Terminal 2. su root 3. vi /etc/hosts: 4. Add Code: 127.0.0.1 mbe.mysettopbox.tv localhost 192.168.x.x sbe Where 192.168.x.x is the IP address of the SBE (Slave Backend). This step will export the myth directory where all of the TV shows, videos, and MP3's are located and allow your SBE to connect to it. 1. vi /etc/exports: 2. Change to say Code: /myth *(rw) This step will start NFS automatically. 1. update-rc.d nfs-kernel-server defaults **Note: You do not need to do this step to view recorded TV stored on MBE from SBE** **Note: I keep all of my files on my MBE. So, my setup differs from Cecil's. Both the MBE and the SBE need to have same source directory.** 1. cd /mnt 2. mkdir music 3. mkdir video 4. ln -s /myth/music music 5. ln -s /myth/video video 6. mythfrontend 7. Setup-Music Settings-General Settings, change the directory to hold music to /mnt/music 8. Setup-Video Settings-General Settings change directory to hold videos to /mnt/video **This step sets up the proper IP and networking for the MBE and SBE to talk to each other.** 1. mythtv-setup 2. Change the IP Addresses to the IP Address of the MBE 3. Exit. 4. vi /etc/mysql/my.cnf 5. Find line that looks like this Code: skip-networking 6. Change to Code: #skip-networking Now switch to the SBE This step adds a way to tie a name like mbe.mysettopbox.tv to an IP Address. On the SBE: 1. Open Terminal 2. su root 3. vi /etc/hosts: 4. Add Code: 127.0.0.1 localhost 192.168.x1.x1 sbe.mysettopbox.tv sbe 192.168.x2.x2 mbe.mysettopbox.tv mbe Where 192.168.x1.x1 is the IP address of the SBE (Slave Backend). Where 192.168.x2.x2 is the IP address of the MBE (Master Backend). This step will automatically mount a nfs shared directory automatically from the MBE. On the SBE: 1. vi /etc/fstab 2. Add Code: mbe:/myth /mnt/mbe nfs rsize=8192,wsize=8192,soft,nfsvers=3 This step will start NFS automatically. 1. update-rc.d nfs-kernel-server defaults Since this is just a Slave Backend, there are some things that don't need to run. This will make Mysql and Apache not start automatically. 1. update-rc.d -f mysql remove 2. update-rc.d -f apache remove Since MBE already keeps track of the TV listings, the SBE doesn't need to do it too. 1. rm -fr /etc/cron.daily/mythtv-backend **Note: You do not need to do this step to view recorded TV stored on MBE from SBE** **Note: I keep all of my files on my MBE. So, my setup differs from Cecil's. Both the MBE and the SBE need to have same source directory.** 1. cd /mnt 2. mkdir mbe 3. ln -s mbe/video video 4. ln -s mbe/music music 5. mythfrontend 6. Setup-Music Settings-General Settings, change the directory to hold music to /mnt/music 7. Setup-Video Settings-General Settings change directory to hold videos to /mnt/video **This step sets up the proper IP and networking for the MBE and SBE to talk to each other.** 1. mythtv-setup 2. Change the first IP Address to the IP Address of the SBE 3. Change the second IP Address to the IP Address of the MBE 4. Exit. **Change the SBE to connect to the MBE database.** 1. cd ~/.mythtv 2. vi mysql.txt 3. Change it say Code: DBHostName=mbe DBUserName=mythtv DBPassword=mythtv DBName=mythconverg LocalHostName=sbe **Done and time to reboot** On MBE 1. shutdown -r 0 **Wait for MBE to boot.** On SBE 1. shutdown -r 0 2. Cross fingers At this point both of them should work. Place a video on the MBE at /myth/video and see if it plays on SBE. Also, I noticed that some of the video quality and frame rate is bad on my files. So, I updated to the newest XVID core. 1. su root 2. apt-get update 3. apt-get install libxvidcore2 4. apt-get install libxvidcore4 Both my MBE and SBE have ATI remotes. So, one remote will control the other box when it is turned on. More info here http://www.oxxus.net/host/2.6.8/hosting-ati_remote.htm On MBE: 1. On remote hold down hand icon until it blinks. The number of blinks shows its channel number. 2. Press 1 then hand. It should blink once. The channel is now 1. 3. su root 4. ati_remote (if you haven't already) 5. vi /etc/modules 6. Change Code: ati_remote to say Code: ati_remote channel_mask=65533 This will ignore every other channel except 1. 7. Reboot. (I don't know the command to reload modules) On SBE: 1. On remote hold down hand icon until it blinks. The number of blinks shows its channel number. 2. Press 2 then hand. It should blink once. The channel is now 2. 3. su root 4. ati_remote (if you haven't already) 5. vi /etc/modules 6. Change Code: ati_remote to say Code: ati_remote channel_mask=65530
This will ignore every other channel except 2. 7. Reboot. (I don't know the command to reload modules) Hope this helps! I'm there are problems/optimizations in here, but this should get you started. Here is the benefit of my Linux experience. |
Author: | jesse [ Fri Apr 01, 2005 3:22 pm ] |
Post subject: | |
Here are some of the changes as of R5A12 to do make LinHES: Code: **Change the SBE to connect to the MBE database.** 1. cd ~/.mythtv 2. vi mysql.txt Should be: Code: **Change the SBE to connect to the MBE database.** 1. cd /etc/mythtv 2. vi mysql.txt At the part where you add the ati_remote to /etc/modules. It should be: Code: 1. On remote hold down hand icon until it blinks. The number of blinks shows its channel number.
2. Press 1 then hand. It should blink once. The channel is now 1. 3. su root 4. vi /etc/modules 5. Add at the very top for MBE ati_remote channel_mask=65533 For SBE ati_remote channel_mask=65530 This will ignore every other channel except 1. 6. Reboot. (I don't know the command to reload modules) |
Author: | sanger440 [ Thu Apr 28, 2005 12:52 am ] |
Post subject: | |
Well, I thought I would get adventurous and try the MBE and SBE setup as outlined here, but did not quite succeed. I did my best to follow this how to, and my MBE seems to be running with the settings except it will no longer access the music files. The video recordings show up and still work with the new settings. My SBE will not start the frontend. Here is the error message I am getting when trying to start the frontend from xterm: Code: Unable to connect to database!
Driver error was [1/-1]: QMYSQL3: Unable to connect Database error was: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2 Both the SBE and the MBE have nearly identical hardware as shown in my signature and both were working perfectly as stand alones with R4V5 installed on them. The only deviation I saw from the posted instructions was the mysql.txt file. It was located in /etc/mythtv directory and not in ~/.mythtv location as suggested. I have gone over all the settings twice and will check them again. Any suggestions on what to check? |
Author: | cesman [ Thu Apr 28, 2005 6:47 am ] |
Post subject: | |
Perhaps MySQL isn't listening for network connections? |
Author: | jesse [ Thu Apr 28, 2005 12:39 pm ] |
Post subject: | |
Do the other modules work? From the SBE can you view the TV schedule? Can you view the list of movies? |
Author: | sanger440 [ Thu Apr 28, 2005 6:34 pm ] |
Post subject: | |
I am not sure what you mean by "do the other modules work" I cannot view anything (movies, scheule, etc) from the SBE, it will not boot into the frontend. It returns the message I posted above. From xterm on the SBE, if I type "ping mbe" it returns Quote: root@mythbox2:/home/mythtv# ping mbe PING mbe.mysettopbox.tv (192.168.0.94): 56 data bytes 64 bytes from 192.168.0.94: icmp_seq=0 ttl=64 time=3.5 ms 64 bytes from 192.168.0.94: icmp_seq=1 ttl=64 time=1.9 ms 64 bytes from 192.168.0.94: icmp_seq=2 ttl=64 time=1.9 ms 64 bytes from 192.168.0.94: icmp_seq=3 ttl=64 time=1.6 ms 64 bytes from 192.168.0.94: icmp_seq=4 ttl=64 time=1.9 m From the SBE if I ping the sbe it returns Quote: @mythbox2:/home/mythtv# ping sbe PING sbe.mysettopbox.tv (192.168.0.95): 56 data bytes 64 bytes from 192.168.0.95: icmp_seq=0 ttl=64 time=0.0 ms 64 bytes from 192.168.0.95: icmp_seq=1 ttl=64 time=0.0 ms 64 bytes from 192.168.0.95: icmp_seq=2 ttl=64 time=0.0 ms 64 bytes from 192.168.0.95: icmp_seq=3 ttl=64 time=0.0 ms 64 bytes from 192.168.0.95: icmp_seq=4 ttl=64 time=0.0 ms 64 bytes from 192.168.0.95: icmp_seq=5 ttl=64 time=0.0 ms From the MBE when I ping the sbe and mbe I get Quote: root@mythtv:/home/mythtv# ping sbe PING sbe (192.168.0.95): 56 data bytes 64 bytes from 192.168.0.95: icmp_seq=0 ttl=64 time=1.0 ms 64 bytes from 192.168.0.95: icmp_seq=1 ttl=64 time=1.0 ms 64 bytes from 192.168.0.95: icmp_seq=2 ttl=64 time=1.0 ms 64 bytes from 192.168.0.95: icmp_seq=3 ttl=64 time=1.0 ms 64 bytes from 192.168.0.95: icmp_seq=4 ttl=64 time=1.7 ms 64 bytes from 192.168.0.95: icmp_seq=5 ttl=64 time=1.7 m Quote: root@mythtv:/home/mythtv# ping mbe ping: unknown host mbe So there seems to be communication via nfs. Should there be a ping returned on the MBE when I ping the MBE? I cannot double check the ip's I entered into the setup screens on the frontend since the frontend does not start. typing "mythtv-setup" returns Quote: root@mythbox2:/home/mythtv# mythtv-setup Unable to connect to database! Driver error was [1/-1]: QMYSQL3: Unable to connect Database error was: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) Unable to open database: Driver error was: QMYSQL3: Unable to connect Database error was: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) So MySql seems to be the problem. The server on the MBE should be listening with these setting in /etc/mysql/my.cnf Quote: # The skip-networkin option will no longer be set via debconf menu.
# You have to manually change it if you want networking i.e. the server # listening on port 3306. The default is "disable" - for security reasons. #skip-networking set-variable = key_buffer=16M set-variable = max_allowed_packet=1M set-variable = thread_stack=128K |
Author: | cesman [ Thu Apr 28, 2005 8:36 pm ] |
Post subject: | |
Perhaps you should re-read my post? |
Author: | sanger440 [ Fri Apr 29, 2005 12:38 am ] |
Post subject: | |
Cesman, I have read and re-read your post. As I mention above, I have commented out "skip networking" in the /etc/mysql/my.cnf file on the MBE as per the instrucions in this How To. I have searched for other ideas on what to do but did not find any. Is there something else I am missing that will enable MySQL to listen for network connections on the MBE? |
Author: | Xsecrets [ Fri Apr 29, 2005 6:46 am ] |
Post subject: | |
try searching the forum for skip networking. There's another thread about this with an answer, but I don't have time to look it up right now. |
Author: | jesse [ Fri Apr 29, 2005 10:44 am ] |
Post subject: | |
Did you change the mysql.txt too? |
Author: | sanger440 [ Fri Apr 29, 2005 5:05 pm ] |
Post subject: | |
Here is my mysql.txt on the sbe: Quote: DBHostName=mbe DBUserName=mythtv DBPassword=mythtv DBName=mythconverg LocalHostName=sbe # Set the following if you want to use something other than the # machine's real hostname for identifying settings in the database. # This is useful if your hostname changes often, as otherwise # you'll need to reconfigure mythtv (or futz with the DB) every time. # TWO HOSTS MUST NOT USE THE SAME VALUE # #LocalHostName=my-unique-identifier-goes-here #DBPassword=q2dUSRDq Here is the mysql.txt on the mbe: Quote: DBHostName=localhost
DBUserName=mythtv DBName=mythconverg # Set the following if you want to use something other than the # machine's real hostname for identifying settings in the database. # This is useful if your hostname changes often, as otherwise # you'll need to reconfigure mythtv (or futz with the DB) every time. # TWO HOSTS MUST NOT USE THE SAME VALUE # #LocalHostName=my-unique-identifier-goes-here #DBPassword=q2dUSRDq DBPassword=mythtv |
Author: | scotbrady [ Sat Apr 30, 2005 9:31 am ] |
Post subject: | |
The mbe hostname is likely not resolving; use the IP address. I do not think you need the LocalHostName line (I don't have it). |
Author: | sanger440 [ Sat Apr 30, 2005 1:35 pm ] |
Post subject: | |
I have tried replacing some of the host names with ip's but the frontend will still not log on to the mbe. Here are my settings now: sbe: /etc/hosts Quote: #127.0.0.1 mythbox2 localhost # The following lines are desirable for IPv6 capable hosts # (added automatically by netbase upgrade) ::1 ip6-localhost ip6-loopback fe00::0 ip6-localnet ff00::0 ip6-mcastprefix ff02::1 ip6-allnodes ff02::2 ip6-allrouters ff02::3 ip6-allhosts #127.0.0.1 localhost 192.168.0.95 sbe.mysettopbox.tv sbe 192.168.0.94 mbe.mysettopbox.tv mbe SBE: /etc/mythtv/mysqll.txt Quote: DBHostName=192.168.0.94 DBUserName=mythtv DBPassword=mythtv DBName=mythconverg LocalHostName=sbe # Set the following if you want to use something other than the # machine's real hostname for identifying settings in the database. # This is useful if your hostname changes often, as otherwise # you'll need to reconfigure mythtv (or futz with the DB) every time. # TWO HOSTS MUST NOT USE THE SAME VALUE # #LocalHostName=my-unique-identifier-goes-here #DBPassword=q2dUSRDq On the MBE: /etc/hosts Quote: #127.0.0.1 mythtv localhost # The following lines are desirable for IPv6 capable hosts # (added automatically by netbase upgrade) ::1 ip6-localhost ip6-loopback fe00::0 ip6-localnet ff00::0 ip6-mcastprefix ff02::1 ip6-allnodes ff02::2 ip6-allrouters ff02::3 ip6-allhosts #127.0.0.1 mbe.mysettopbox.tv localhost 192.168.0.95 sbe on MBE /etc/mythtv/mysql.txt Quote: DBHostName=192.168.0.94
DBUserName=mythtv DBName=mythconverg DBPassword=mythtv # Set the following if you want to use something other than the # machine's real hostname for identifying settings in the database. # This is useful if your hostname changes often, as otherwise # you'll need to reconfigure mythtv (or futz with the DB) every time. # TWO HOSTS MUST NOT USE THE SAME VALUE # #LocalHostName=my-unique-identifier-goes-here #DBPassword=q2dUSRDq Since the frontend will no longer start, where can I look to double check that I entered the correct ip's for the sbe/mbe setup? |
Author: | cesman [ Sat Apr 30, 2005 2:22 pm ] |
Post subject: | |
Why are you using my domain name in your /etc/host? Granted, it isn't routed, but still... Code: ifconfig Will show you what your IPs are.
|
Author: | tjc [ Sat Apr 30, 2005 3:22 pm ] |
Post subject: | |
Actually your domain name shows up residually in a couple places under /etc... For example I just noticed and removed it in: /etc/webmin/miniserv.conf and a quick find/xargs/grep under /etc turns up... Code: root@black:~# find /etc/ -type f -print0 | xargs -0 grep -l mysettopbox.tv
/etc/exim4/update-exim4.conf.conf /etc/laptop-net/schemes /etc/nxserver/users.id_dsa.pub /etc/resolvconf/resolv.conf.d/original /etc/webmin/miniserv.conf~ Most of these are harmless or not an issue... |
Page 1 of 2 | All times are UTC - 6 hours |
Powered by phpBB® Forum Software © phpBB Group http://www.phpbb.com/ |