Message ID | 53BD5452.6030902@scalemp.com |
---|---|
State | Not Applicable |
Headers | show |
On 07/09/2014 11:40 AM, Eial Czerwacki wrote: > yes, here it is: > --- /etc/resolv.conf 2014-07-09 17:35:30.420040438 +0300 > +++ yyy/etc/resolv.conf 1970-01-01 02:00:00.000000000 +0200 > @@ -1,3 +0,0 @@ > -; generated by /sbin/dhclient-script > -search cluserdns cluserdnsus > -nameserver 10.100.1.40 > > thing is, I'm not sure who generates the content of that file, is it > part of busybox? other utility? That depends on your network configuration, for static IP scenarios normally you do, for DHCP it's normally done by the dhcp post up script. Regards.
Greetings Gustavo, On 07/09/2014 05:46 PM, Gustavo Zacarias wrote: > On 07/09/2014 11:40 AM, Eial Czerwacki wrote: > >> yes, here it is: >> --- /etc/resolv.conf 2014-07-09 17:35:30.420040438 +0300 >> +++ yyy/etc/resolv.conf 1970-01-01 02:00:00.000000000 +0200 >> @@ -1,3 +0,0 @@ >> -; generated by /sbin/dhclient-script >> -search cluserdns cluserdnsus >> -nameserver 10.100.1.40 >> >> thing is, I'm not sure who generates the content of that file, is it >> part of busybox? other utility? > That depends on your network configuration, for static IP scenarios > normally you do, for DHCP it's normally done by the dhcp post up script. > Regards. > > > did you mean /usr/share/udhcpc/default.script?
Greetings, On 07/09/2014 05:53 PM, Eial Czerwacki wrote: > Greetings Gustavo, > > On 07/09/2014 05:46 PM, Gustavo Zacarias wrote: >> On 07/09/2014 11:40 AM, Eial Czerwacki wrote: >> >>> yes, here it is: >>> --- /etc/resolv.conf 2014-07-09 17:35:30.420040438 +0300 >>> +++ yyy/etc/resolv.conf 1970-01-01 02:00:00.000000000 +0200 >>> @@ -1,3 +0,0 @@ >>> -; generated by /sbin/dhclient-script >>> -search cluserdns cluserdnsus >>> -nameserver 10.100.1.40 >>> >>> thing is, I'm not sure who generates the content of that file, is it >>> part of busybox? other utility? >> That depends on your network configuration, for static IP scenarios >> normally you do, for DHCP it's normally done by the dhcp post up script. >> Regards. >> >> >> > did you mean /usr/share/udhcpc/default.script? I've looked into the resolv.conf of the actual boot (not chroot) and I saw the domain bad issue (bug #3979), applying it gave me valid domain again in resolv.conf but problem still persists. it is like udhcpc cannot find the dns servers. am I right? where do we set dns? Eial.
Dear Eial Czerwacki, On Thu, 10 Jul 2014 15:15:36 +0300, Eial Czerwacki wrote: > > did you mean /usr/share/udhcpc/default.script? > I've looked into the resolv.conf of the actual boot (not chroot) and I > saw the domain bad issue (bug #3979), applying it gave me valid domain > again in resolv.conf but problem still persists. > > it is like udhcpc cannot find the dns servers. am I right? where do we > set dns? In /etc/resolv.conf. But before worrying about DNS, check that your network settings are correct by pinging using directly the IP address of a machine on the same network. Thomas
Greetings Thomas On 07/10/2014 03:23 PM, Thomas Petazzoni wrote: > Dear Eial Czerwacki, > > On Thu, 10 Jul 2014 15:15:36 +0300, Eial Czerwacki wrote: > >>> did you mean /usr/share/udhcpc/default.script? >> I've looked into the resolv.conf of the actual boot (not chroot) and I >> saw the domain bad issue (bug #3979), applying it gave me valid domain >> again in resolv.conf but problem still persists. >> >> it is like udhcpc cannot find the dns servers. am I right? where do we >> set dns? > In /etc/resolv.conf. > > But before worrying about DNS, check that your network settings are > correct by pinging using directly the IP address of a machine on the > same network. > > Thomas pinging an ip works, the problem is when I use an machine alias. Eial
Dear Eial Czerwacki,
On Thu, 10 Jul 2014 15:35:10 +0300, Eial Czerwacki wrote:
> pinging an ip works, the problem is when I use an machine alias.
Then indeed your /etc/resolv.conf is wrong.
Thomas
Greeting Thomas, On 07/10/2014 03:56 PM, Thomas Petazzoni wrote: > Dear Eial Czerwacki, > > On Thu, 10 Jul 2014 15:35:10 +0300, Eial Czerwacki wrote: > >> pinging an ip works, the problem is when I use an machine alias. > Then indeed your /etc/resolv.conf is wrong. > > Thomas I copied the resolv.conf from my desktop to the remote machine and tried to run ping, the problem still persists. are there any specific libs that might be needed? Eial.
Dear Eial Czerwacki, On Thu, 10 Jul 2014 16:02:42 +0300, Eial Czerwacki wrote: > On 07/10/2014 03:56 PM, Thomas Petazzoni wrote: > > Dear Eial Czerwacki, > > > > On Thu, 10 Jul 2014 15:35:10 +0300, Eial Czerwacki wrote: > > > >> pinging an ip works, the problem is when I use an machine alias. > > Then indeed your /etc/resolv.conf is wrong. > > > > Thomas > > I copied the resolv.conf from my desktop to the remote machine and tried > to run ping, the problem still persists. > are there any specific libs that might be needed? Yes, the libnss_dns.so.* library, but normally it gets copied to the rootfs. Can you check you have it? Also, can you ping the DNS server from your embedded system? Thanks, Thomas
Greetings Thomas, On 07/10/2014 04:34 PM, Thomas Petazzoni wrote: > Dear Eial Czerwacki, > > On Thu, 10 Jul 2014 16:02:42 +0300, Eial Czerwacki wrote: > >> On 07/10/2014 03:56 PM, Thomas Petazzoni wrote: >>> Dear Eial Czerwacki, >>> >>> On Thu, 10 Jul 2014 15:35:10 +0300, Eial Czerwacki wrote: >>> >>>> pinging an ip works, the problem is when I use an machine alias. >>> Then indeed your /etc/resolv.conf is wrong. >>> >>> Thomas >> I copied the resolv.conf from my desktop to the remote machine and tried >> to run ping, the problem still persists. >> are there any specific libs that might be needed? > Yes, the libnss_dns.so.* library, but normally it gets copied to the > rootfs. Can you check you have it? > > Also, can you ping the DNS server from your embedded system? > > Thanks, > > Thomas it seems that that file is missing but running LD_TRACE_LOADED_OBJECTS=1 /bin/busybox doesn't shows libnss_dns.so.* is missing. should busybox need that file? Eial.
Dear Eial Czerwacki, On Thu, 10 Jul 2014 16:40:35 +0300, Eial Czerwacki wrote: > it seems that that file is missing but running LD_TRACE_LOADED_OBJECTS=1 > /bin/busybox doesn't shows libnss_dns.so.* is missing. libnss_* files are dlopen()'ed by the glibc, so I'm not sure LD_TRACE_LOADED_OBJECTS will show it. It's clearly not normal that libnss_dns.so is missing. Here is a Buildroot build using the internal toolchain backend with glibc that I did a few days ago: $ ls -l target/lib/libnss_* -rwxr-xr-x 1 thomas thomas 17904 Jul 8 23:34 target/lib/libnss_dns-2.18.so lrwxrwxrwx 1 thomas thomas 18 Jul 8 23:28 target/lib/libnss_dns.so.2 -> libnss_dns-2.18.so -rwxr-xr-x 1 thomas thomas 46668 Jul 8 23:34 target/lib/libnss_files-2.18.so lrwxrwxrwx 1 thomas thomas 20 Jul 8 23:28 target/lib/libnss_files.so.2 -> libnss_files-2.18.so Could you please show: */ The output of 'ls -l output/target/lib' */ The version of Buildroot you're using */ The complete Buildroot configuration (.config file) you're using Thanks, Thomas
Greetings Thomas, On 07/10/2014 05:06 PM, Thomas Petazzoni wrote: > Dear Eial Czerwacki, > > On Thu, 10 Jul 2014 16:40:35 +0300, Eial Czerwacki wrote: > >> it seems that that file is missing but running LD_TRACE_LOADED_OBJECTS=1 >> /bin/busybox doesn't shows libnss_dns.so.* is missing. > libnss_* files are dlopen()'ed by the glibc, so I'm not sure > LD_TRACE_LOADED_OBJECTS will show it. > > It's clearly not normal that libnss_dns.so is missing. Here is a > Buildroot build using the internal toolchain backend with glibc that I > did a few days ago: > > $ ls -l target/lib/libnss_* > -rwxr-xr-x 1 thomas thomas 17904 Jul 8 23:34 target/lib/libnss_dns-2.18.so > lrwxrwxrwx 1 thomas thomas 18 Jul 8 23:28 target/lib/libnss_dns.so.2 -> libnss_dns-2.18.so > -rwxr-xr-x 1 thomas thomas 46668 Jul 8 23:34 target/lib/libnss_files-2.18.so > lrwxrwxrwx 1 thomas thomas 20 Jul 8 23:28 target/lib/libnss_files.so.2 -> libnss_files-2.18.so > > Could you please show: > > */ The output of 'ls -l output/target/lib' > > */ The version of Buildroot you're using > > */ The complete Buildroot configuration (.config file) you're using > > Thanks, > > Thomas I've added libnss_dns-2.18.so to the img and libresolv.so and it seems to be working. the files are missing because I work in a kinda limited size. do I need the other libnss_*.so files? Thanks, Eial.
Dear Eial Czerwacki, On Thu, 10 Jul 2014 17:13:57 +0300, Eial Czerwacki wrote: > I've added libnss_dns-2.18.so to the img and libresolv.so and it seems > to be working. > the files are missing because I work in a kinda limited size. So you removed them manually? I'd like to understand what happened, to fix Buildroot if needed. > do I need the other libnss_*.so files? By default, we only copy libnss_dns (to do DNS resolution) and libnss_files (to do /etc/hosts based resolution), and we don't copy the other libnss_* libraries, which are used for more advanced name resolution that are generally not used on most embedded systems. See 'man nsswitch.conf' for more details. Best regards, Thomas
Hi Eial, On Thu, Jul 10, 2014 at 05:13:57PM +0300, Eial Czerwacki wrote: > I've added libnss_dns-2.18.so to the img and libresolv.so and it seems > to be working. > the files are missing because I work in a kinda limited size. You may consider using uClibc or musl if your storage capacity is that tight. baruch
Greetings Thomas, On 07/10/2014 05:16 PM, Thomas Petazzoni wrote: > Dear Eial Czerwacki, > > On Thu, 10 Jul 2014 17:13:57 +0300, Eial Czerwacki wrote: > >> I've added libnss_dns-2.18.so to the img and libresolv.so and it seems >> to be working. >> the files are missing because I work in a kinda limited size. > So you removed them manually? I'd like to understand what happened, to > fix Buildroot if needed. > >> do I need the other libnss_*.so files? > By default, we only copy libnss_dns (to do DNS resolution) and > libnss_files (to do /etc/hosts based resolution), and we don't copy the > other libnss_* libraries, which are used for more advanced name > resolution that are generally not used on most embedded systems. > > See 'man nsswitch.conf' for more details. > > Best regards, > > Thomas I see, as I don't use /etc/hosts, I think I don't need libnss_files. I hope I get it all to work now, thanks a bunch! Eial.
Greetings Baruch, On 07/10/2014 05:24 PM, Baruch Siach wrote: > Hi Eial, > > On Thu, Jul 10, 2014 at 05:13:57PM +0300, Eial Czerwacki wrote: >> I've added libnss_dns-2.18.so to the img and libresolv.so and it seems >> to be working. >> the files are missing because I work in a kinda limited size. > You may consider using uClibc or musl if your storage capacity is that tight. > > baruch > we were using uclibc but for reasons I cannot disclose, we needed to move to glibc. as said before, adding the two libs above worked in the simulator, now I need to make it work on the actual machine. Thanks, Eial.
Eial, All, I know you solved your issue by copying the missing NSS libs, yet I have a comment about this mail, see below. On 2014-07-10 15:15 +0300, Eial Czerwacki spake thusly: > On 07/09/2014 05:53 PM, Eial Czerwacki wrote: > > Greetings Gustavo, > > > > On 07/09/2014 05:46 PM, Gustavo Zacarias wrote: > >> On 07/09/2014 11:40 AM, Eial Czerwacki wrote: > >> > >>> yes, here it is: > >>> --- /etc/resolv.conf 2014-07-09 17:35:30.420040438 +0300 > >>> +++ yyy/etc/resolv.conf 1970-01-01 02:00:00.000000000 +0200 > >>> @@ -1,3 +0,0 @@ > >>> -; generated by /sbin/dhclient-script > >>> -search cluserdns cluserdnsus > >>> -nameserver 10.100.1.40 > >>> > >>> thing is, I'm not sure who generates the content of that file, is it > >>> part of busybox? other utility? > >> That depends on your network configuration, for static IP scenarios > >> normally you do, for DHCP it's normally done by the dhcp post up script. > >> Regards. > >> > >> > >> > > did you mean /usr/share/udhcpc/default.script? > I've looked into the resolv.conf of the actual boot (not chroot) and I > saw the domain bad issue (bug #3979), applying it gave me valid domain > again in resolv.conf but problem still persists. > > it is like udhcpc cannot find the dns servers. am I right? where do we > set dns? When you are in a chroot, you are still using the IP stack from your non-chroot system, so the network interfaces are already configured. So, no need to run a DHCP client. However, you still need to properly setup the resolver in your chroot, which you did by filling in /etc/resolv.conf and copying the NSS libs. For example, I usually just copy the non-chroot /etc/resolv.conf into my chroot. Regards, Yann E. MORIN.
Eial, All, On 2014-07-10 17:25 +0300, Eial Czerwacki spake thusly: > On 07/10/2014 05:16 PM, Thomas Petazzoni wrote: > > Dear Eial Czerwacki, > > > > On Thu, 10 Jul 2014 17:13:57 +0300, Eial Czerwacki wrote: > > > >> I've added libnss_dns-2.18.so to the img and libresolv.so and it seems > >> to be working. > >> the files are missing because I work in a kinda limited size. > > So you removed them manually? I'd like to understand what happened, to > > fix Buildroot if needed. > > > >> do I need the other libnss_*.so files? > > By default, we only copy libnss_dns (to do DNS resolution) and > > libnss_files (to do /etc/hosts based resolution), and we don't copy the > > other libnss_* libraries, which are used for more advanced name > > resolution that are generally not used on most embedded systems. > > > > See 'man nsswitch.conf' for more details. > > > > Best regards, > > > > Thomas > I see, as I don't use /etc/hosts, I think I don't need libnss_files. The NSS libraries are not used only to provide DNS resolving. They are used to do any kind of name lookups: - IP <-> hostname mapping (as already mentioned), - UID <-> username mapping, - gid <-> group name mapping, - and a bunch more. See the complete list: man nsswitch.conf Regards, Yann E. MORIN.
Greetings Yann, On 07/10/2014 07:30 PM, Yann E. MORIN wrote: > Eial, All, > > I know you solved your issue by copying the missing NSS libs, > yet I have a comment about this mail, see below. > > On 2014-07-10 15:15 +0300, Eial Czerwacki spake thusly: >> On 07/09/2014 05:53 PM, Eial Czerwacki wrote: >>> Greetings Gustavo, >>> >>> On 07/09/2014 05:46 PM, Gustavo Zacarias wrote: >>>> On 07/09/2014 11:40 AM, Eial Czerwacki wrote: >>>> >>>>> yes, here it is: >>>>> --- /etc/resolv.conf 2014-07-09 17:35:30.420040438 +0300 >>>>> +++ yyy/etc/resolv.conf 1970-01-01 02:00:00.000000000 +0200 >>>>> @@ -1,3 +0,0 @@ >>>>> -; generated by /sbin/dhclient-script >>>>> -search cluserdns cluserdnsus >>>>> -nameserver 10.100.1.40 >>>>> >>>>> thing is, I'm not sure who generates the content of that file, is it >>>>> part of busybox? other utility? >>>> That depends on your network configuration, for static IP scenarios >>>> normally you do, for DHCP it's normally done by the dhcp post up script. >>>> Regards. >>>> >>>> >>>> >>> did you mean /usr/share/udhcpc/default.script? >> I've looked into the resolv.conf of the actual boot (not chroot) and I >> saw the domain bad issue (bug #3979), applying it gave me valid domain >> again in resolv.conf but problem still persists. >> >> it is like udhcpc cannot find the dns servers. am I right? where do we >> set dns? > When you are in a chroot, you are still using the IP stack from your > non-chroot system, so the network interfaces are already configured. > So, no need to run a DHCP client. > > However, you still need to properly setup the resolver in your chroot, > which you did by filling in /etc/resolv.conf and copying the NSS libs. > > For example, I usually just copy the non-chroot /etc/resolv.conf into my > chroot. > > Regards, > Yann E. MORIN. > that is correct when to comes to chrooting into the image but I'm not sure that the same resolv.conf will be suited to boot from that same img. Eial.
--- /etc/resolv.conf 2014-07-09 17:35:30.420040438 +0300 +++ yyy/etc/resolv.conf 1970-01-01 02:00:00.000000000 +0200 @@ -1,3 +0,0 @@ -; generated by /sbin/dhclient-script -search cluserdns cluserdnsus -nameserver 10.100.1.40