Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: MythTV: Users

HDHomeRun, 2nd NIC and dhcpd bootup issue

 

 

First page Previous page 1 2 Next page Last page  View All MythTV users RSS feed   Index | Next | Previous | View Threaded


deadzone2 at excite

Nov 4, 2007, 12:49 AM

Post #1 of 34 (4373 views)
Permalink
HDHomeRun, 2nd NIC and dhcpd bootup issue

I'm a long time user of MythTV and very much appreciate all the hard work everyone puts into the software. I recently decided I wanted a second HD tuner for OTA broadcasts and since I am already using 4 of 5 PCI slots, I decided to try a HDHomeRun.

While setting it up, I determined that the HDHomeRun used DHCP to get an IP address so I first connected it to my home network so my router would provide the IP address. My MythTV server is connected to my home network via a PCI Gigabit Ethernet card (eth0). Once everything was up and running, I wanted to move the HDHomeRun off my home network. I enabled the motherboard's 10/100 Ethernet NIC (eth1) and configured dhcpd to provide an address to it. After directly connecting the HDHomeRun to eth1 and restarting mythbackend, the tuners were available and working without any other changes.

Everything was great until my system was rebooted.

Turns out that after the reboot mythbackend reported "device not found" for both HDHomeRun tuners. After manually restarting mythbackend, the tuners were back and working. Thinking that the problem might be related to the second NIC and DHCP, I reconnected the HDHomeRun to my home network, rebooted and found that indeed, the tuners were discovered after the server restart.

When facing an issue such as this, I figure I'm not the first to experience it and search the internet for a solution. This time, I couldn't find a solution.

Thinking that it might be a timing issue where the HDHomeRun did not yet have an address from my MythTV dhcpd server for the second NIC, I hunted in the code until I found the FindDevice function in libs/libmythtv/hdhrchannel.cpp. I noticed that it tries to "Discover" the HDHomeRun 6 times before reporting "device not found". I modified it to try 60 times to give the HDHomeRun a bit more time to get an IP address. After building and installing the change, I rebooted and found that the HDHomeRun was found by mythbackend after the server restart and my problem was solved.

I don't know if the problem is unique to my configuration but, if not, perhaps my experience will help someone else.

Richard


_______________________________________________
Join Excite! - http://www.excite.com
The most personalized portal on the Web!


_______________________________________________
mythtv-users mailing list
mythtv-users [at] mythtv
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users


william_munson at bellsouth

Nov 4, 2007, 2:24 AM

Post #2 of 34 (4288 views)
Permalink
Re: HDHomeRun, 2nd NIC and dhcpd bootup issue [In reply to]

R wrote:
> I'm a long time user of MythTV and very much appreciate all the hard work everyone puts into the software. I recently decided I wanted a second HD tuner for OTA broadcasts and since I am already using 4 of 5 PCI slots, I decided to try a HDHomeRun.
>
> While setting it up, I determined that the HDHomeRun used DHCP to get an IP address so I first connected it to my home network so my router would provide the IP address. My MythTV server is connected to my home network via a PCI Gigabit Ethernet card (eth0). Once everything was up and running, I wanted to move the HDHomeRun off my home network. I enabled the motherboard's 10/100 Ethernet NIC (eth1) and configured dhcpd to provide an address to it. After directly connecting the HDHomeRun to eth1 and restarting mythbackend, the tuners were available and working without any other changes.
>
> Everything was great until my system was rebooted.
>
> Turns out that after the reboot mythbackend reported "device not found" for both HDHomeRun tuners. After manually restarting mythbackend, the tuners were back and working. Thinking that the problem might be related to the second NIC and DHCP, I reconnected the HDHomeRun to my home network, rebooted and found that indeed, the tuners were discovered after the server restart.
>
> When facing an issue such as this, I figure I'm not the first to experience it and search the internet for a solution. This time, I couldn't find a solution.
>
> Thinking that it might be a timing issue where the HDHomeRun did not yet have an address from my MythTV dhcpd server for the second NIC, I hunted in the code until I found the FindDevice function in libs/libmythtv/hdhrchannel.cpp. I noticed that it tries to "Discover" the HDHomeRun 6 times before reporting "device not found". I modified it to try 60 times to give the HDHomeRun a bit more time to get an IP address. After building and installing the change, I rebooted and found that the HDHomeRun was found by mythbackend after the server restart and my problem was solved.
>
> I don't know if the problem is unique to my configuration but, if not, perhaps my experience will help someone else.
>
> Richard
>
>
First off, this is not the only solution. What I ended up doing was to
install a small 4 port switch between the myth system and the rest of
the home network. This switch only has 3 connections. The myth system,
the hdhr and a cable to the rest of the system. This keeps hdhr traffic
local to that switch and allows my primary dhcp server to assign
addresses. This provides plenty of bandwidth, especially if you run
gigabit rather than 100/t. I run 100/t here and have no problems with
being able to record 2 shows while playing another on a remote frontend.
_______________________________________________
mythtv-users mailing list
mythtv-users [at] mythtv
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users


mitchell.gore at gmail

Nov 4, 2007, 7:07 AM

Post #3 of 34 (4277 views)
Permalink
Re: HDHomeRun, 2nd NIC and dhcpd bootup issue [In reply to]

On Nov 4, 2007 4:24 AM, William Munson <william_munson [at] bellsouth> wrote:

> R wrote:
> > I'm a long time user of MythTV and very much appreciate all the hard
> work everyone puts into the software. I recently decided I wanted a second
> HD tuner for OTA broadcasts and since I am already using 4 of 5 PCI slots, I
> decided to try a HDHomeRun.
> >
> > While setting it up, I determined that the HDHomeRun used DHCP to get an
> IP address so I first connected it to my home network so my router would
> provide the IP address. My MythTV server is connected to my home network via
> a PCI Gigabit Ethernet card (eth0). Once everything was up and running, I
> wanted to move the HDHomeRun off my home network. I enabled the
> motherboard's 10/100 Ethernet NIC (eth1) and configured dhcpd to provide an
> address to it. After directly connecting the HDHomeRun to eth1 and
> restarting mythbackend, the tuners were available and working without any
> other changes.
> >
> > Everything was great until my system was rebooted.
> >
> > Turns out that after the reboot mythbackend reported "device not found"
> for both HDHomeRun tuners. After manually restarting mythbackend, the tuners
> were back and working. Thinking that the problem might be related to the
> second NIC and DHCP, I reconnected the HDHomeRun to my home network,
> rebooted and found that indeed, the tuners were discovered after the server
> restart.
> >
> > When facing an issue such as this, I figure I'm not the first to
> experience it and search the internet for a solution. This time, I couldn't
> find a solution.
> >
> > Thinking that it might be a timing issue where the HDHomeRun did not yet
> have an address from my MythTV dhcpd server for the second NIC, I hunted in
> the code until I found the FindDevice function in
> libs/libmythtv/hdhrchannel.cpp. I noticed that it tries to "Discover" the
> HDHomeRun 6 times before reporting "device not found". I modified it to try
> 60 times to give the HDHomeRun a bit more time to get an IP address. After
> building and installing the change, I rebooted and found that the HDHomeRun
> was found by mythbackend after the server restart and my problem was solved.
> >
> > I don't know if the problem is unique to my configuration but, if not,
> perhaps my experience will help someone else.
> >
> > Richard
> >
> >
>

Richard,

I have a similar setup. I have two NICs in my BE and want to hook the HDHR
directly to the BE. i have dhcpd installed but i am not sure what to use in
the configuration file. My setup gives eth0 a connection to the network and
then the internet. eth1 i want to hook directly to the HDHR.

Initially i wanted to bridge the two cards so the HDHR would still get an
address from my router. I couldnt figure that out so i moved to another
dhcp server. After reading i thought i found something saying this couldn't
be done.

How did you do it? (could you post the .conf file) I think we need a wiki
on this. If you could explain it to me then ill figure it out and publish
the how to.

Thanks,
Mitchell


mikerice1969 at gmail

Nov 4, 2007, 7:23 AM

Post #4 of 34 (4270 views)
Permalink
Re: HDHomeRun, 2nd NIC and dhcpd bootup issue [In reply to]

On 11/4/07, Mitch Gore <mitchell.gore [at] gmail> wrote:
> I have a similar setup. I have two NICs in my BE and want to hook the HDHR
> directly to the BE. i have dhcpd installed but i am not sure what to use in
> the configuration file. My setup gives eth0 a connection to the network and
> then the internet. eth1 i want to hook directly to the HDHR.

I plan on setting this up today. I'll report back if I have success.
This looks like good info on what needs to be done:

http://www.gossamer-threads.com/lists/mythtv/users/296532?search_string=hdhomerun%20and%20network;#296532
_______________________________________________
mythtv-users mailing list
mythtv-users [at] mythtv
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users


harley at thepetersclan

Nov 4, 2007, 8:13 AM

Post #5 of 34 (4260 views)
Permalink
Re: HDHomeRun, 2nd NIC and dhcpd bootup issue [In reply to]

R wrote:
> I'm a long time user of MythTV and very much appreciate all the hard work everyone puts into the software. I recently decided I wanted a second HD tuner for OTA broadcasts and since I am already using 4 of 5 PCI slots, I decided to try a HDHomeRun.
>
> While setting it up, I determined that the HDHomeRun used DHCP to get an IP address so I first connected it to my home network so my router would provide the IP address. My MythTV server is connected to my home network via a PCI Gigabit Ethernet card (eth0). Once everything was up and running, I wanted to move the HDHomeRun off my home network. I enabled the motherboard's 10/100 Ethernet NIC (eth1) and configured dhcpd to provide an address to it. After directly connecting the HDHomeRun to eth1 and restarting mythbackend, the tuners were available and working without any other changes.
>
> Everything was great until my system was rebooted.
>
> Turns out that after the reboot mythbackend reported "device not found" for both HDHomeRun tuners. After manually restarting mythbackend, the tuners were back and working. Thinking that the problem might be related to the second NIC and DHCP, I reconnected the HDHomeRun to my home network, rebooted and found that indeed, the tuners were discovered after the server restart.
>
> When facing an issue such as this, I figure I'm not the first to experience it and search the internet for a solution. This time, I couldn't find a solution.
>
> Thinking that it might be a timing issue where the HDHomeRun did not yet have an address from my MythTV dhcpd server for the second NIC, I hunted in the code until I found the FindDevice function in libs/libmythtv/hdhrchannel.cpp. I noticed that it tries to "Discover" the HDHomeRun 6 times before reporting "device not found". I modified it to try 60 times to give the HDHomeRun a bit more time to get an IP address. After building and installing the change, I rebooted and found that the HDHomeRun was found by mythbackend after the server restart and my problem was solved.
>
> I don't know if the problem is unique to my configuration but, if not, perhaps my experience will help someone else.
>
> Richard
>
>
> _______________________________________________
> Join Excite! - http://www.excite.com
> The most personalized portal on the Web!
>
>
> _______________________________________________
> mythtv-users mailing list
> mythtv-users [at] mythtv
> http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users
>

Just to let you know your not the only one i also have this problem.
Might want to report this as a bug.
I'll give your solution a try. Might be a while as i don't want to
restart the server unless i have to.

Harley

_______________________________________________
mythtv-users mailing list
mythtv-users [at] mythtv
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users


harley at thepetersclan

Nov 4, 2007, 8:44 AM

Post #6 of 34 (4266 views)
Permalink
Re: HDHomeRun, 2nd NIC and dhcpd bootup issue [In reply to]

R wrote:
> I'm a long time user of MythTV and very much appreciate all the hard work everyone puts into the software. I recently decided I wanted a second HD tuner for OTA broadcasts and since I am already using 4 of 5 PCI slots, I decided to try a HDHomeRun.
>
> While setting it up, I determined that the HDHomeRun used DHCP to get an IP address so I first connected it to my home network so my router would provide the IP address. My MythTV server is connected to my home network via a PCI Gigabit Ethernet card (eth0). Once everything was up and running, I wanted to move the HDHomeRun off my home network. I enabled the motherboard's 10/100 Ethernet NIC (eth1) and configured dhcpd to provide an address to it. After directly connecting the HDHomeRun to eth1 and restarting mythbackend, the tuners were available and working without any other changes.
>
> Everything was great until my system was rebooted.
>
> Turns out that after the reboot mythbackend reported "device not found" for both HDHomeRun tuners. After manually restarting mythbackend, the tuners were back and working. Thinking that the problem might be related to the second NIC and DHCP, I reconnected the HDHomeRun to my home network, rebooted and found that indeed, the tuners were discovered after the server restart.
>
> When facing an issue such as this, I figure I'm not the first to experience it and search the internet for a solution. This time, I couldn't find a solution.
>
> Thinking that it might be a timing issue where the HDHomeRun did not yet have an address from my MythTV dhcpd server for the second NIC, I hunted in the code until I found the FindDevice function in libs/libmythtv/hdhrchannel.cpp. I noticed that it tries to "Discover" the HDHomeRun 6 times before reporting "device not found". I modified it to try 60 times to give the HDHomeRun a bit more time to get an IP address. After building and installing the change, I rebooted and found that the HDHomeRun was found by mythbackend after the server restart and my problem was solved.
>
> I don't know if the problem is unique to my configuration but, if not, perhaps my experience will help someone else.
>
> Richard
>
>
> _______________________________________________
> Join Excite! - http://www.excite.com
> The most personalized portal on the Web!
>
>
> _______________________________________________
> mythtv-users mailing list
> mythtv-users [at] mythtv
> http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users
>

Could you post the change you made so i don't have to search through the
code ?

Harley

_______________________________________________
mythtv-users mailing list
mythtv-users [at] mythtv
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users


deadzone2 at excite

Nov 4, 2007, 9:50 AM

Post #7 of 34 (4247 views)
Permalink
Re: HDHomeRun, 2nd NIC and dhcpd bootup issue [In reply to]

Sure.

It's a very simple change. I'm running the 0.20.2 release and
it appears the code is the same in the .20 bug svn.

1) Edit the file mythtv-0.20.2/libs/libmythtv/hdhrchannel.cpp
2) Search for "/* Discover. */"
3) You should find:

/* Discover. */
for (int retry = 0; retry < 6; retry++)
{

4) Change the "retry < 6;" to "retry < 60;" or the 6 to whatever
value works for you. For example:

/* Discover. */
for (int retry = 0; retry < 60; retry++)
{

5) Save the file and backup to the base directory and make;make install;
6) Reboot and if this was your problem, it should work now.

--- On Sun 11/04, Harley Peters < harley [at] thepetersclan > wrote:
From: Harley Peters [mailto: harley [at] thepetersclan]
To: mythtv-users [at] mythtv
Date: Sun, 04 Nov 2007 10:44:19 -0600
Subject: Re: [mythtv-users] HDHomeRun, 2nd NIC and dhcpd bootup issue

R wrote:> I'm a long time user of MythTV and very much appreciate all the hard work everyone puts into the software. I recently decided I wanted a second HD tuner for OTA broadcasts and since I am already using 4 of 5 PCI slots, I decided to try a HDHomeRun. > > While setting it up, I determined that the HDHomeRun used DHCP to get an IP address so I first connected it to my home network so my router would provide the IP address. My MythTV server is connected to my home network via a PCI Gigabit Ethernet card (eth0). Once everything was up and running, I wanted to move the HDHomeRun off my home network. I enabled the motherboard's 10/100 Ethernet NIC (eth1) and configured dhcpd to provide an address to it. After directly connecting the HDHomeRun to eth1 and restarting mythbackend, the tuners were available and working without any other changes. > > Everything was great until my system was rebooted. > > Turns out that after the reboot mythbackend reported "device not found" for
both HDHomeRun tuners. After manually restarting mythbackend, the tuners were back and working. Thinking that the problem might be related to the second NIC and DHCP, I reconnected the HDHomeRun to my home network, rebooted and found that indeed, the tuners were discovered after the server restart.> > When facing an issue such as this, I figure I'm not the first to experience it and search the internet for a solution. This time, I couldn't find a solution. > > Thinking that it might be a timing issue where the HDHomeRun did not yet have an address from my MythTV dhcpd server for the second NIC, I hunted in the code until I found the FindDevice function in libs/libmythtv/hdhrchannel.cpp. I noticed that it tries to "Discover" the HDHomeRun 6 times before reporting "device not found". I modified it to try 60 times to give the HDHomeRun a bit more time to get an IP address. After building and installing the change, I rebooted and found that the HDHomeRun was found by mythbackend
after the server restart and my problem was solved.> > I don't know if the problem is unique to my configuration but, if not, perhaps my experience will help someone else.> > Richard> > > _______________________________________________> Join Excite! - http://www.excite.com> The most personalized portal on the Web!> > > _______________________________________________> mythtv-users mailing list> mythtv-users [at] mythtv> http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users> Could you post the change you made so i don't have to search through thecode ?Harley_______________________________________________mythtv-users mailing listmythtv-users [at] mythtvhttp://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users

_______________________________________________
Join Excite! - http://www.excite.com
The most personalized portal on the Web!


_______________________________________________
mythtv-users mailing list
mythtv-users [at] mythtv
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users


deadzone at flashmail

Nov 4, 2007, 10:25 AM

Post #8 of 34 (4242 views)
Permalink
HDHomeRun, 2nd NIC and dhcpd bootup issue [In reply to]

Sorry, still trying to figure this mailing list out...

I accidentally started a new thread with the same subject with the details of the change.


mikerice1969 at gmail

Nov 4, 2007, 11:16 AM

Post #9 of 34 (4285 views)
Permalink
Re: HDHomeRun, 2nd NIC and dhcpd bootup issue [In reply to]

On 11/4/07, Mitch Gore <mitchell.gore [at] gmail> wrote:
> I have a similar setup. I have two NICs in my BE and want to hook the HDHR
> directly to the BE. i have dhcpd installed but i am not sure what to use in
> the configuration file. My setup gives eth0 a connection to the network and
> then the internet. eth1 i want to hook directly to the HDHR.
>
> Initially i wanted to bridge the two cards so the HDHR would still get an
> address from my router. I couldnt figure that out so i moved to another
> dhcp server. After reading i thought i found something saying this couldn't
> be done.
>
> How did you do it? (could you post the .conf file) I think we need a wiki
> on this. If you could explain it to me then ill figure it out and publish
> the how to.

Ok here is what I did. It seems to be working though I cannot be 100%
sure after such a short time. My backend is running Fedora Core 6.

# yum install dhcp
# chkconfig dhcpd on

My /etc/dhcpd.conf:

ddns-update-style interim;
ignore client-updates;

subnet 192.168.2.0 netmask 255.255.255.0 {
range 192.168.2.20 192.168.2.30;
option broadcast-address 192.168.2.255;
option subnet-mask 255.255.255.0;
option ip-forwarding off;
}

My normal network is on eth0 192.168.1.* which I want to get addresses
from my router.
I setup eth1 with a static address: 192.168.2.10 which is attached to the HDHR.

After reboot I get this in /var/log/messages:

Nov 4 11:04:44 masterbackend dhcpd: Listening on
LPF/eth1/00:00:XX:XX:XX:XX/192.168.2/24
Nov 4 11:04:44 masterbackend dhcpd: Sending on
LPF/eth1/00:00:XX:XX:XX:XX/192.168.2/24
Nov 4 11:04:44 masterbackend dhcpd:
Nov 4 11:04:44 masterbackend dhcpd: No subnet declaration for eth0
(192.168.1.26).
Nov 4 11:04:44 masterbackend dhcpd: ** Ignoring requests on eth0. If
this is not what
Nov 4 11:04:44 masterbackend dhcpd: you want, please write a
subnet declaration
Nov 4 11:04:44 masterbackend dhcpd: in your dhcpd.conf file for
the network segment
Nov 4 11:04:44 masterbackend dhcpd: to which interface eth0 is attached. **
Nov 4 11:04:44 masterbackend dhcpd:
Nov 4 11:04:44 masterbackend dhcpd: Sending on Socket/fallback/fallback-net
Nov 4 11:04:44 masterbackend dhcpd: dhcpd startup succeeded

I think ignoring eth0 is what I want. Then:

Nov 4 11:04:45 masterbackend dhcpd: DHCPDISCOVER from
00:YY:YY:YY:YY:YY(HDHR-1011D84D) via eth1
Nov 4 11:04:46 masterbackend dhcpd: DHCPOFFER on 192.168.2.30 to
00:YY:YY:YY:YY:YY(HDHR-1011D84D) via eth1
Nov 4 11:04:47 masterbackend dhcpd: DHCPREQUEST for 192.168.2.30
(192.168.2.10) from 00:YY:YY:YY:YY:YY(HDHR-1011D84D) via eth1
Nov 4 11:04:47 masterbackend dhcpd: DHCPACK on 192.168.2.30 to
00:YY:YY:YY:YY:YY(HDHR-1011D84D) via eth1

Looks good.. check the mythbackend.log:

2007-11-04 11:04:51.922 HDHRChan(ffffffff/0): device found at address
192.168.2.30
2007-11-04 11:04:52.100 HDHRChan(ffffffff/1): device found at address
192.168.2.30

I will reply if I have any problems with this down the road.
_______________________________________________
mythtv-users mailing list
mythtv-users [at] mythtv
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users


harley at thepetersclan

Nov 4, 2007, 11:30 AM

Post #10 of 34 (4253 views)
Permalink
Re: HDHomeRun, 2nd NIC and dhcpd bootup issue [In reply to]

R wrote:
>
> Sure.
>
> It's a very simple change. I'm running the 0.20.2 release and
> it appears the code is the same in the .20 bug svn.
>
> 1) Edit the file mythtv-0.20.2/libs/libmythtv/hdhrchannel.cpp
> 2) Search for "/* Discover. */"
> 3) You should find:
>
> /* Discover. */
> for (int retry = 0; retry < 6; retry++)
> {
>
> 4) Change the "retry < 6;" to "retry < 60;" or the 6 to whatever
> value works for you. For example:
>
> /* Discover. */
> for (int retry = 0; retry < 60; retry++)
> {
>
> 5) Save the file and backup to the base directory and make;make install;
> 6) Reboot and if this was your problem, it should work now.
>
> --- On Sun 11/04, Harley Peters < harley [at] thepetersclan > wrote:
> From: Harley Peters [mailto: harley [at] thepetersclan]
> To: mythtv-users [at] mythtv
> Date: Sun, 04 Nov 2007 10:44:19 -0600
> Subject: Re: [mythtv-users] HDHomeRun, 2nd NIC and dhcpd bootup issue
>
> R wrote:> I'm a long time user of MythTV and very much appreciate all the hard work everyone puts into the software. I recently decided I wanted a second HD tuner for OTA broadcasts and since I am already using 4 of 5 PCI slots, I decided to try a HDHomeRun. > > While setting it up, I determined that the HDHomeRun used DHCP to get an IP address so I first connected it to my home network so my router would provide the IP address. My MythTV server is connected to my home network via a PCI Gigabit Ethernet card (eth0). Once everything was up and running, I wanted to move the HDHomeRun off my home network. I enabled the motherboard's 10/100 Ethernet NIC (eth1) and configured dhcpd to provide an address to it. After directly connecting the HDHomeRun to eth1 and restarting mythbackend, the tuners were available and working without any other changes. > > Everything was great until my system was rebooted. > > Turns out that after the reboot mythbackend reported "device not found" f
or
> both HDHomeRun tuners. After manually restarting mythbackend, the tuners were back and working. Thinking that the problem might be related to the second NIC and DHCP, I reconnected the HDHomeRun to my home network, rebooted and found that indeed, the tuners were discovered after the server restart.> > When facing an issue such as this, I figure I'm not the first to experience it and search the internet for a solution. This time, I couldn't find a solution. > > Thinking that it might be a timing issue where the HDHomeRun did not yet have an address from my MythTV dhcpd server for the second NIC, I hunted in the code until I found the FindDevice function in libs/libmythtv/hdhrchannel.cpp. I noticed that it tries to "Discover" the HDHomeRun 6 times before reporting "device not found". I modified it to try 60 times to give the HDHomeRun a bit more time to get an IP address. After building and installing the change, I rebooted and found that the HDHomeRun was found by mythbacken
d
> after the server restart and my problem was solved.> > I don't know if the problem is unique to my configuration but, if not, perhaps my experience will help someone else.> > Richard> > > _______________________________________________> Join Excite! - http://www.excite.com> The most personalized portal on the Web!> > > _______________________________________________> mythtv-users mailing list> mythtv-users [at] mythtv> http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users> Could you post the change you made so i don't have to search through thecode ?Harley_______________________________________________mythtv-users mailing listmythtv-users [at] mythtvhttp://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users
>
> _______________________________________________
> Join Excite! - http://www.excite.com
> The most personalized portal on the Web!
>
>
> _______________________________________________
> mythtv-users mailing list
> mythtv-users [at] mythtv
> http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users
>

Ok i am running svn version 14499 and that code is no longer there.
I think i found it in libs/libmythtv/hdhomerun/hdhomerun_discover.c
Starting at line# 424 but haven't had a chance to check it out yet.

Harley



_______________________________________________
mythtv-users mailing list
mythtv-users [at] mythtv
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users


harley at thepetersclan

Nov 4, 2007, 11:35 AM

Post #11 of 34 (4249 views)
Permalink
Re: HDHomeRun, 2nd NIC and dhcpd bootup issue [In reply to]

Make that line # 417
_______________________________________________
mythtv-users mailing list
mythtv-users [at] mythtv
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users


deadzone at flashmail

Nov 4, 2007, 12:16 PM

Post #12 of 34 (4263 views)
Permalink
Re: HDHomeRun, 2nd NIC and dhcpd bootup issue [In reply to]

My dhcpd.conf file is very similar to yours. I also have a Hauppauge
MediaMVP on my home network that requires a boot image so that adds to
the configuration. Because of that, I also need to have an empty
subnet defined for my home network but it doesn't actually serve
addresses.

----- start cut -----
subnet 192.168.1.0 netmask 255.255.255.0 {
# this subnet served by firewall/router
}
----- end cut -----

I still get log messages (different from yours) but I'm no expert and
since it's working, can live with them.



_______________________________________________
mythtv-users mailing list
mythtv-users [at] mythtv
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users


harley at thepetersclan

Nov 5, 2007, 8:45 AM

Post #13 of 34 (4227 views)
Permalink
Re: HDHomeRun, 2nd NIC and dhcpd bootup issue [In reply to]

R wrote:
> I'm a long time user of MythTV and very much appreciate all the hard work everyone puts into the software. I recently decided I wanted a second HD tuner for OTA broadcasts and since I am already using 4 of 5 PCI slots, I decided to try a HDHomeRun.
>
> While setting it up, I determined that the HDHomeRun used DHCP to get an IP address so I first connected it to my home network so my router would provide the IP address. My MythTV server is connected to my home network via a PCI Gigabit Ethernet card (eth0). Once everything was up and running, I wanted to move the HDHomeRun off my home network. I enabled the motherboard's 10/100 Ethernet NIC (eth1) and configured dhcpd to provide an address to it. After directly connecting the HDHomeRun to eth1 and restarting mythbackend, the tuners were available and working without any other changes.
>
> Everything was great until my system was rebooted.
>
> Turns out that after the reboot mythbackend reported "device not found" for both HDHomeRun tuners. After manually restarting mythbackend, the tuners were back and working. Thinking that the problem might be related to the second NIC and DHCP, I reconnected the HDHomeRun to my home network, rebooted and found that indeed, the tuners were discovered after the server restart.
>
> When facing an issue such as this, I figure I'm not the first to experience it and search the internet for a solution. This time, I couldn't find a solution.
>
> Thinking that it might be a timing issue where the HDHomeRun did not yet have an address from my MythTV dhcpd server for the second NIC, I hunted in the code until I found the FindDevice function in libs/libmythtv/hdhrchannel.cpp. I noticed that it tries to "Discover" the HDHomeRun 6 times before reporting "device not found". I modified it to try 60 times to give the HDHomeRun a bit more time to get an IP address. After building and installing the change, I rebooted and found that the HDHomeRun was found by mythbackend after the server restart and my problem was solved.
>
> I don't know if the problem is unique to my configuration but, if not, perhaps my experience will help someone else.
>
> Richard
>
>
> _______________________________________________
> Join Excite! - http://www.excite.com
> The most personalized portal on the Web!
>
>
> _______________________________________________
> mythtv-users mailing list
> mythtv-users [at] mythtv
> http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users
>

Well i gave it a try but i have to set it to 200+ to get it to work.
So i just installed a second switch instead.
The real problem is when you reboot the backend the network interface on
the Hdhomerun goes down. And when it comes back up it tries to get an ip
address from the dhcp server right away and the server hasn't booted up
yet so the dhcp server isn't yet available.
By putting the switch in the Hdhomerun network interface never goes down
when rebooting the backend and therefore doesn't attempt to get an ip
address.

Harley


_______________________________________________
mythtv-users mailing list
mythtv-users [at] mythtv
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users


mikerice1969 at gmail

Nov 5, 2007, 9:46 AM

Post #14 of 34 (4232 views)
Permalink
Re: HDHomeRun, 2nd NIC and dhcpd bootup issue [In reply to]

On 11/5/07, Harley Peters <harley [at] thepetersclan> wrote:
> Well i gave it a try but i have to set it to 200+ to get it to work.
> So i just installed a second switch instead.
> The real problem is when you reboot the backend the network interface on
> the Hdhomerun goes down. And when it comes back up it tries to get an ip
> address from the dhcp server right away and the server hasn't booted up
> yet so the dhcp server isn't yet available.

Makes sense and all but after installing the HDHR on the separate NIC
I rebooted several times and haven't seen the problem. Does this
happen everytime or does it find the HDHR on some reboots? I'd like
to know if I am "safe" or if I will have this happen down the road.
My backend is on FC6 now... what distro are you using? I wonder if
the timing issues are distro specific or something else.
_______________________________________________
mythtv-users mailing list
mythtv-users [at] mythtv
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users


harley at thepetersclan

Nov 5, 2007, 10:23 AM

Post #15 of 34 (4218 views)
Permalink
Re: HDHomeRun, 2nd NIC and dhcpd bootup issue [In reply to]

Michael Rice wrote:
> On 11/5/07, Harley Peters <harley [at] thepetersclan> wrote:
>> Well i gave it a try but i have to set it to 200+ to get it to work.
>> So i just installed a second switch instead.
>> The real problem is when you reboot the backend the network interface on
>> the Hdhomerun goes down. And when it comes back up it tries to get an ip
>> address from the dhcp server right away and the server hasn't booted up
>> yet so the dhcp server isn't yet available.
>
> Makes sense and all but after installing the HDHR on the separate NIC
> I rebooted several times and haven't seen the problem. Does this
> happen everytime or does it find the HDHR on some reboots? I'd like
> to know if I am "safe" or if I will have this happen down the road.
> My backend is on FC6 now... what distro are you using? I wonder if
> the timing issues are distro specific or something else.
> _______________________________________________
> mythtv-users mailing list
> mythtv-users [at] mythtv
> http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users
>

For me it happens every time.
I'm running Gentoo.

Harley

_______________________________________________
mythtv-users mailing list
mythtv-users [at] mythtv
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users


cnlibmyth at gmail

Nov 5, 2007, 2:56 PM

Post #16 of 34 (4221 views)
Permalink
Re: HDHomeRun, 2nd NIC and dhcpd bootup issue [In reply to]

>
>
>
> For me it happens every time.
> I'm running Gentoo.
>
> Harley
>
> Isn't there a way to tell a service to not start unless/until a precursor
service has started? Can't you tell mythbackend to wait until the network
service has started? Or maybe I read that you could pause a service for X
amount of seconds...

Joltman


jaw1959 at gmail

Nov 5, 2007, 3:00 PM

Post #17 of 34 (4218 views)
Permalink
Re: HDHomeRun, 2nd NIC and dhcpd bootup issue [In reply to]

Or change the order in which the services load (as in, put the network ahead
of myth in the list)?

On 11/5/07, James Oltman <cnlibmyth [at] gmail> wrote:
>
>
> >
> > For me it happens every time.
> > I'm running Gentoo.
> >
> > Harley
> >
> > Isn't there a way to tell a service to not start unless/until a
> precursor service has started? Can't you tell mythbackend to wait until the
> network service has started? Or maybe I read that you could pause a service
> for X amount of seconds...
>
> Joltman
>
> _______________________________________________
> mythtv-users mailing list
> mythtv-users [at] mythtv
> http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users
>
>


deadzone at flashmail

Nov 5, 2007, 9:43 PM

Post #18 of 34 (4214 views)
Permalink
Re: HDHomeRun, 2nd NIC and dhcpd bootup issue [In reply to]

I tried to change the service start order first but both dhcpd and
mythbackend are near the end of the startup sequence. Besides, over
time, changes could affect the start up time and result in
intermittent failures.

I believe Harley made his change in
libs/libmythtv/hdhomerun/hdhomerun_discover.c for his version of mythtv
while I made mine in libs/libmythtv/hdhrchannel.cpp. Perhaps that has
something to do with our difference in results. I've rebooted numerous
times and haven't experienced a problem yet.

In the 0.20.2 version of mythtv that I'm using, the socket timeout is
set to 500 milliseconds (.5 seconds). The initial retry count of 6
gave the device only 3 seconds to respond. When I changed it to 60, I
allowed it up to 30 seconds for it to get an address and respond. You
can set the values as high as you like (as long as it fits in an
'int') with the only risk being it delays the backend startup until it
finds the HDHomeRun -- or doesn't.

I'm running the lastest version of the HDHomeRun firmware 20071015.
The 20070218 version had a change to "Avoid delay in obtaining ip
address by triggering DHCP renew when link is obtained." Perhaps
that's the problem.

I have enough power sucking boxes and transformers around here and I
don't want another unless absolutely necessary. If it wasn't for the
fact that I transfer recorded files over my primary Gigabit NIC, I'd
just throw the HDHomeRun on my home network. Any good network switch
should be non-blocking and only pass traffic from port A to port B
anyway and not to all the other ports (ignoring the little bit of
broadcast traffic).

Richard


Quoting Josh White <jaw1959 [at] gmail>:

> Or change the order in which the services load (as in, put the network ahead
> of myth in the list)?
>
> On 11/5/07, James Oltman <cnlibmyth [at] gmail> wrote:
>>
>>
>> >
>> > For me it happens every time.
>> > I'm running Gentoo.
>> >
>> > Harley
>> >
>> > Isn't there a way to tell a service to not start unless/until a
>> precursor service has started? Can't you tell mythbackend to wait until the
>> network service has started? Or maybe I read that you could pause a service
>> for X amount of seconds...
>>
>> Joltman
>>
>> _______________________________________________
>> mythtv-users mailing list
>> mythtv-users [at] mythtv
>> http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users
>>
>>
>



_______________________________________________
mythtv-users mailing list
mythtv-users [at] mythtv
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users


harley at thepetersclan

Nov 6, 2007, 8:16 AM

Post #19 of 34 (4207 views)
Permalink
Re: HDHomeRun, 2nd NIC and dhcpd bootup issue [In reply to]

Richard wrote:
> I tried to change the service start order first but both dhcpd and
> mythbackend are near the end of the startup sequence. Besides, over
> time, changes could affect the start up time and result in
> intermittent failures.
>
> I believe Harley made his change in
> libs/libmythtv/hdhomerun/hdhomerun_discover.c for his version of mythtv
> while I made mine in libs/libmythtv/hdhrchannel.cpp. Perhaps that has
> something to do with our difference in results. I've rebooted numerous
> times and haven't experienced a problem yet.
>
> In the 0.20.2 version of mythtv that I'm using, the socket timeout is
> set to 500 milliseconds (.5 seconds). The initial retry count of 6
> gave the device only 3 seconds to respond. When I changed it to 60, I
> allowed it up to 30 seconds for it to get an address and respond. You
> can set the values as high as you like (as long as it fits in an
> 'int') with the only risk being it delays the backend startup until it
> finds the HDHomeRun -- or doesn't.
>
> I'm running the lastest version of the HDHomeRun firmware 20071015.
> The 20070218 version had a change to "Avoid delay in obtaining ip
> address by triggering DHCP renew when link is obtained." Perhaps
> that's the problem.
>
> I have enough power sucking boxes and transformers around here and I
> don't want another unless absolutely necessary. If it wasn't for the
> fact that I transfer recorded files over my primary Gigabit NIC, I'd
> just throw the HDHomeRun on my home network. Any good network switch
> should be non-blocking and only pass traffic from port A to port B
> anyway and not to all the other ports (ignoring the little bit of
> broadcast traffic).
>
> Richard

Yes i made the change in libs/libmythtv/hdhomerun/hdhomerun_discover.c.
I think the reason i needed a higher value is the server myth backend is
running on is running a lot of services and takes a long time boot.
I already had the dhcpd service starting as early as it could.

Harley
_______________________________________________
mythtv-users mailing list
mythtv-users [at] mythtv
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users


briandlong at gmail

Nov 6, 2007, 8:33 AM

Post #20 of 34 (4199 views)
Permalink
Re: HDHomeRun, 2nd NIC and dhcpd bootup issue [In reply to]

On Nov 6, 2007 12:43 AM, Richard <deadzone [at] flashmail> wrote:
> I have enough power sucking boxes and transformers around here and I
> don't want another unless absolutely necessary. If it wasn't for the
> fact that I transfer recorded files over my primary Gigabit NIC, I'd
> just throw the HDHomeRun on my home network. Any good network switch
> should be non-blocking and only pass traffic from port A to port B
> anyway and not to all the other ports (ignoring the little bit of
> broadcast traffic).

If you're running a Linksys or other switch / router supported by
DD-WRT, you could load their firmware and configure VLANs. This means
you wouldn't be pulling any extra power, but you could still segregate
the traffic as desired.

/Brian/
_______________________________________________
mythtv-users mailing list
mythtv-users [at] mythtv
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users


mikerice1969 at gmail

Feb 12, 2008, 5:09 PM

Post #21 of 34 (3720 views)
Permalink
Re: HDHomeRun, 2nd NIC and dhcpd bootup issue [In reply to]

On 11/5/07, Michael Rice <mikerice1969 [at] gmail> wrote:
> On 11/5/07, Harley Peters <harley [at] thepetersclan> wrote:
> > Well i gave it a try but i have to set it to 200+ to get it to work.
> > So i just installed a second switch instead.
> > The real problem is when you reboot the backend the network interface on
> > the Hdhomerun goes down. And when it comes back up it tries to get an ip
> > address from the dhcp server right away and the server hasn't booted up
> > yet so the dhcp server isn't yet available.
>
> Makes sense and all but after installing the HDHR on the separate NIC
> I rebooted several times and haven't seen the problem. Does this
> happen everytime or does it find the HDHR on some reboots? I'd like
> to know if I am "safe" or if I will have this happen down the road.
> My backend is on FC6 now... what distro are you using? I wonder if
> the timing issues are distro specific or something else.
>

I installed a different NIC in my backend and started getting the
"HDHR doesn't get an IP address fast enough" problem. In case anyone
is still having a problem with this I solved it by adding a few lines
to my mythbackend startup scipt. It just pings the HDHR's IP address
until successful before starting the backend. I haven't used it a
long time yet but it seems better than editing the mythtv source:

# Wait for HDHR to come up
RESULT=1
CNT=0
while [ "$RESULT" != "0" ];
do
/bin/ping -c 1 192.168.2.30
RESULT="$?"
CNT="`expr $CNT + 1`"
if [ "$CNT" = "30" ]; then
RESULT=0
fi
done

Any better ideas?
_______________________________________________
mythtv-users mailing list
mythtv-users [at] mythtv
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users


scram69 at gmail

Aug 12, 2008, 10:19 PM

Post #22 of 34 (2771 views)
Permalink
Re: HDHomeRun, 2nd NIC and dhcpd bootup issue [In reply to]

On Tue, Feb 12, 2008 at 6:09 PM, Michael Rice <mikerice1969 [at] gmail> wrote:
> On 11/5/07, Michael Rice <mikerice1969 [at] gmail> wrote:
>> On 11/5/07, Harley Peters <harley [at] thepetersclan> wrote:
>> > Well i gave it a try but i have to set it to 200+ to get it to work.
>> > So i just installed a second switch instead.
>> > The real problem is when you reboot the backend the network interface on
>> > the Hdhomerun goes down. And when it comes back up it tries to get an ip
>> > address from the dhcp server right away and the server hasn't booted up
>> > yet so the dhcp server isn't yet available.
>>
>> Makes sense and all but after installing the HDHR on the separate NIC
>> I rebooted several times and haven't seen the problem. Does this
>> happen everytime or does it find the HDHR on some reboots? I'd like
>> to know if I am "safe" or if I will have this happen down the road.
>> My backend is on FC6 now... what distro are you using? I wonder if
>> the timing issues are distro specific or something else.
>>
>
> I installed a different NIC in my backend and started getting the
> "HDHR doesn't get an IP address fast enough" problem. In case anyone
> is still having a problem with this I solved it by adding a few lines
> to my mythbackend startup scipt. It just pings the HDHR's IP address
> until successful before starting the backend. I haven't used it a
> long time yet but it seems better than editing the mythtv source:
>
> # Wait for HDHR to come up
> RESULT=1
> CNT=0
> while [ "$RESULT" != "0" ];
> do
> /bin/ping -c 1 192.168.2.30
> RESULT="$?"
> CNT="`expr $CNT + 1`"
> if [ "$CNT" = "30" ]; then
> RESULT=0
> fi
> done
>
> Any better ideas?
> _______________________________________________
> mythtv-users mailing list
> mythtv-users [at] mythtv
> http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users
>
I'm also having this problem, and would rather not edit the source
(mostly because I've never been able to successfully compile myth from
anything). But the HDHR seems to take an inordinate amount of time to
get an address from my 2nd NIC (eth1). Here are the relevent lines
from /var/log/messages:

Aug 12 18:07:34 mediaserver kernel: [ 53.246499] eth1: link up,
100Mbps, full-duplex, lpa 0x41E1
Aug 12 18:07:54 mediaserver dhcpd: Internet Systems Consortium DHCP
Server V3.0.6
Aug 12 18:07:54 mediaserver dhcpd: Copyright 2004-2007 Internet
Systems Consortium.
Aug 12 18:07:54 mediaserver dhcpd: All rights reserved.
Aug 12 18:07:54 mediaserver dhcpd: For info, please visit
http://www.isc.org/sw/dhcp/
Aug 12 18:07:54 mediaserver dhcpd: Internet Systems Consortium DHCP
Server V3.0.6
Aug 12 18:07:54 mediaserver dhcpd: Copyright 2004-2007 Internet
Systems Consortium.
Aug 12 18:07:54 mediaserver dhcpd: All rights reserved.
Aug 12 18:07:54 mediaserver dhcpd: For info, please visit
http://www.isc.org/sw/dhcp/
Aug 12 18:07:54 mediaserver dhcpd: Wrote 0 deleted host decls to leases file.
Aug 12 18:07:54 mediaserver dhcpd: Wrote 0 new dynamic host decls to
leases file.
Aug 12 18:07:54 mediaserver dhcpd: Wrote 2 leases to leases file.
Aug 12 18:07:54 mediaserver kernel: [ 78.868019] NET: Registered
protocol family 17
Aug 12 18:08:38 mediaserver dhcpd: DHCPDISCOVER from 00:18:dd:01:19:75 via eth1
Aug 12 18:08:38 mediaserver dhcpd: DHCPOFFER on 192.168.0.198 to
00:18:dd:01:19:75 via eth1
Aug 12 18:08:39 mediaserver dhcpd: DHCPREQUEST for 192.168.0.198
(192.168.0.1) from 00:18:dd:01:19:75 via eth1
Aug 12 18:08:39 mediaserver dhcpd: DHCPACK on 192.168.0.198 to
00:18:dd:01:19:75 via eth1

and, inevitably, in /var/log/mythbackend.log:

2008-08-12 18:07:51.322 Current Schema Version: 1214
Starting up as the master server.
2008-08-12 18:07:51.408 mythbackend: MythBackend started as master server
2008-08-12 18:07:52.529 HDHRChan(ffffffff/0), Error: device not found
2008-08-12 18:07:52.537 New DB connection, total: 3
2008-08-12 18:07:52.586 Connected to database 'mythconverg' at host: localhost
2008-08-12 18:07:52.589 mythbackend: Problem with capture cards: Card
1failed init
2008-08-12 18:07:53.792 HDHRChan(ffffffff/1), Error: device not found
2008-08-12 18:07:53.802 mythbackend: Problem with capture cards: Card
2failed init

Here is what is in my dhcpd.conf, where I try to give the hdhr a
"fixed" address based on it's MAC:

# A slightly different configuration for an internal subnet.
subnet 192.168.0.0 netmask 255.255.255.0 {
range 192.168.0.100 192.168.0.199;
#option domain-name-servers ns1.internal.example.org;
#option domain-name "internal.example.org";
#option routers 192.168.0.1;
option broadcast-address 192.168.0.255;
default-lease-time 1209600;
max-lease-time 1209600;
}

host hdhomerun {
hardware ethernet 00:18:dd:01:19:75;
fixed-address 192.168.0.198;
}

So it takes over a minute to give the hdhr it's address. I've tried
the script above, and all it does is delay the address assignment that
much longer. Any ideas as to why dhcpd takes over 60 seconds to do
anything?
_______________________________________________
mythtv-users mailing list
mythtv-users [at] mythtv
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users


jim at jamesberwick

Aug 12, 2008, 10:33 PM

Post #23 of 34 (2751 views)
Permalink
Re: HDHomeRun, 2nd NIC and dhcpd bootup issue [In reply to]

scram69 wrote:
> So it takes over a minute to give the hdhr it's address. I've tried
> the script above, and all it does is delay the address assignment that
> much longer. Any ideas as to why dhcpd takes over 60 seconds to do
> anything
Aug 12 18:08:38 mediaserver dhcpd: DHCPDISCOVER from 00:18:dd:01:19:75 via eth1
Aug 12 18:08:38 mediaserver dhcpd: DHCPOFFER on 192.168.0.198 to
00:18:dd:01:19:75 via eth1
Aug 12 18:08:39 mediaserver dhcpd: DHCPREQUEST for 192.168.0.198
(192.168.0.1) from 00:18:dd:01:19:75 via eth1
Aug 12 18:08:39 mediaserver dhcpd: DHCPACK on 192.168.0.198 to
00:18:dd:01:19:75 via eth1

The entire DHCP process completes in 1 second (18:08:38 to 18:08:39). The HDHR doesn't request an IP until 18:08:38. DHCP is more of a pull technology than a push. dhcpd can't assign the address until the device requests it.

_______________________________________________
mythtv-users mailing list
mythtv-users [at] mythtv
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users


mikerice1969 at gmail

Aug 12, 2008, 11:51 PM

Post #24 of 34 (2738 views)
Permalink
Re: HDHomeRun, 2nd NIC and dhcpd bootup issue [In reply to]

On Tue, Aug 12, 2008 at 10:19 PM, scram69 <scram69 [at] gmail> wrote:
> On Tue, Feb 12, 2008 at 6:09 PM, Michael Rice <mikerice1969 [at] gmail> wrote:
>> On 11/5/07, Michael Rice <mikerice1969 [at] gmail> wrote:
>>> On 11/5/07, Harley Peters <harley [at] thepetersclan> wrote:
>>> > Well i gave it a try but i have to set it to 200+ to get it to work.
>>> > So i just installed a second switch instead.
>>> > The real problem is when you reboot the backend the network interface on
>>> > the Hdhomerun goes down. And when it comes back up it tries to get an ip
>>> > address from the dhcp server right away and the server hasn't booted up
>>> > yet so the dhcp server isn't yet available.
>>>
>>> Makes sense and all but after installing the HDHR on the separate NIC
>>> I rebooted several times and haven't seen the problem. Does this
>>> happen everytime or does it find the HDHR on some reboots? I'd like
>>> to know if I am "safe" or if I will have this happen down the road.
>>> My backend is on FC6 now... what distro are you using? I wonder if
>>> the timing issues are distro specific or something else.
>>>
>>
>> I installed a different NIC in my backend and started getting the
>> "HDHR doesn't get an IP address fast enough" problem. In case anyone
>> is still having a problem with this I solved it by adding a few lines
>> to my mythbackend startup scipt. It just pings the HDHR's IP address
>> until successful before starting the backend. I haven't used it a
>> long time yet but it seems better than editing the mythtv source:
>>
>> # Wait for HDHR to come up
>> RESULT=1
>> CNT=0
>> while [ "$RESULT" != "0" ];
>> do
>> /bin/ping -c 1 192.168.2.30
>> RESULT="$?"
>> CNT="`expr $CNT + 1`"
>> if [ "$CNT" = "30" ]; then
>> RESULT=0
>> fi
>> done
>>
>> Any better ideas?
>> _______________________________________________
>> mythtv-users mailing list
>> mythtv-users [at] mythtv
>> http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users
>>
> I'm also having this problem, and would rather not edit the source
> (mostly because I've never been able to successfully compile myth from
> anything). But the HDHR seems to take an inordinate amount of time to
> get an address from my 2nd NIC (eth1). Here are the relevent lines
> from /var/log/messages:
>
> Aug 12 18:07:34 mediaserver kernel: [ 53.246499] eth1: link up,
> 100Mbps, full-duplex, lpa 0x41E1
> Aug 12 18:07:54 mediaserver dhcpd: Internet Systems Consortium DHCP
> Server V3.0.6
> Aug 12 18:07:54 mediaserver dhcpd: Copyright 2004-2007 Internet
> Systems Consortium.
> Aug 12 18:07:54 mediaserver dhcpd: All rights reserved.
> Aug 12 18:07:54 mediaserver dhcpd: For info, please visit
> http://www.isc.org/sw/dhcp/
> Aug 12 18:07:54 mediaserver dhcpd: Internet Systems Consortium DHCP
> Server V3.0.6
> Aug 12 18:07:54 mediaserver dhcpd: Copyright 2004-2007 Internet
> Systems Consortium.
> Aug 12 18:07:54 mediaserver dhcpd: All rights reserved.
> Aug 12 18:07:54 mediaserver dhcpd: For info, please visit
> http://www.isc.org/sw/dhcp/
> Aug 12 18:07:54 mediaserver dhcpd: Wrote 0 deleted host decls to leases file.
> Aug 12 18:07:54 mediaserver dhcpd: Wrote 0 new dynamic host decls to
> leases file.
> Aug 12 18:07:54 mediaserver dhcpd: Wrote 2 leases to leases file.
> Aug 12 18:07:54 mediaserver kernel: [ 78.868019] NET: Registered
> protocol family 17
> Aug 12 18:08:38 mediaserver dhcpd: DHCPDISCOVER from 00:18:dd:01:19:75 via eth1
> Aug 12 18:08:38 mediaserver dhcpd: DHCPOFFER on 192.168.0.198 to
> 00:18:dd:01:19:75 via eth1
> Aug 12 18:08:39 mediaserver dhcpd: DHCPREQUEST for 192.168.0.198
> (192.168.0.1) from 00:18:dd:01:19:75 via eth1
> Aug 12 18:08:39 mediaserver dhcpd: DHCPACK on 192.168.0.198 to
> 00:18:dd:01:19:75 via eth1
>
> and, inevitably, in /var/log/mythbackend.log:
>
> 2008-08-12 18:07:51.322 Current Schema Version: 1214
> Starting up as the master server.
> 2008-08-12 18:07:51.408 mythbackend: MythBackend started as master server
> 2008-08-12 18:07:52.529 HDHRChan(ffffffff/0), Error: device not found
> 2008-08-12 18:07:52.537 New DB connection, total: 3
> 2008-08-12 18:07:52.586 Connected to database 'mythconverg' at host: localhost
> 2008-08-12 18:07:52.589 mythbackend: Problem with capture cards: Card
> 1failed init
> 2008-08-12 18:07:53.792 HDHRChan(ffffffff/1), Error: device not found
> 2008-08-12 18:07:53.802 mythbackend: Problem with capture cards: Card
> 2failed init
>
> Here is what is in my dhcpd.conf, where I try to give the hdhr a
> "fixed" address based on it's MAC:
>
> # A slightly different configuration for an internal subnet.
> subnet 192.168.0.0 netmask 255.255.255.0 {
> range 192.168.0.100 192.168.0.199;
> #option domain-name-servers ns1.internal.example.org;
> #option domain-name "internal.example.org";
> #option routers 192.168.0.1;
> option broadcast-address 192.168.0.255;
> default-lease-time 1209600;
> max-lease-time 1209600;
> }
>
> host hdhomerun {
> hardware ethernet 00:18:dd:01:19:75;
> fixed-address 192.168.0.198;
> }
>
> So it takes over a minute to give the hdhr it's address. I've tried
> the script above, and all it does is delay the address assignment that
> much longer. Any ideas as to why dhcpd takes over 60 seconds to do
> anything?

The script has been working great for me. It usually only needs one
ping but occasionally 2 or 3.
Does it eventually work if you increase the number of pings you try?
Certainly your log shows you are running
mythbackend before you can ping the HDHR. Does it ever come up if you
continue to ping it
before running mythbackend?
_______________________________________________
mythtv-users mailing list
mythtv-users [at] mythtv
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users


scram69 at gmail

Aug 13, 2008, 10:07 PM

Post #25 of 34 (2704 views)
Permalink
Re: HDHomeRun, 2nd NIC and dhcpd bootup issue [In reply to]

On Tue, Aug 12, 2008 at 10:33 PM, James Berwick <jim [at] jamesberwick> wrote:
> scram69 wrote:
>> So it takes over a minute to give the hdhr it's address. I've tried
>> the script above, and all it does is delay the address assignment that
>> much longer. Any ideas as to why dhcpd takes over 60 seconds to do
>> anything
> Aug 12 18:08:38 mediaserver dhcpd: DHCPDISCOVER from 00:18:dd:01:19:75 via eth1
> Aug 12 18:08:38 mediaserver dhcpd: DHCPOFFER on 192.168.0.198 to
> 00:18:dd:01:19:75 via eth1
> Aug 12 18:08:39 mediaserver dhcpd: DHCPREQUEST for 192.168.0.198
> (192.168.0.1) from 00:18:dd:01:19:75 via eth1
> Aug 12 18:08:39 mediaserver dhcpd: DHCPACK on 192.168.0.198 to
> 00:18:dd:01:19:75 via eth1
>
> The entire DHCP process completes in 1 second (18:08:38 to 18:08:39). The HDHR doesn't request an IP until 18:08:38. DHCP is more of a pull technology than a push. dhcpd can't assign the address until the device requests it.
>
> _______________________________________________
> mythtv-users mailing list
> mythtv-users [at] mythtv
> http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users
>

What I don't understand is the delay between the interface coming up
and dhcp beginning the process that takes one second.

dhcp3-server sits right next to mythtv-backend in /etc/init.d, so it
should start up at the same time. Is it starting up and just not
doing anything for a minute, or is it actually taking much longer to
start?
_______________________________________________
mythtv-users mailing list
mythtv-users [at] mythtv
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users

First page Previous page 1 2 Next page Last page  View All MythTV users RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.