Re: [Vserver] can't start a rembo server (solved)

From: dmanye <dmanye_at_urv.cat>
Date: Mon 03 Jul 2006 - 12:31:37 BST
Message-ID: <44A90019.9040005@urv.cat>

i've created a new vserver and defined (at creation time) interfaces
'eth0' and 'lo'. now the rembo daemon works ok. beautiful.
 
dmanye wrote:
> Herbert Poetzl wrote:
>> On Fri, Jun 30, 2006 at 01:12:50PM +0200, dmanye wrote:
>>
>>> hi,
>>>
>>> i've a debian etch host with kernel 2.6.16-2-vserver-686 original
>>> from debian. util-vserver version is 0.30.210-10 original from
>>> debian also.
>>>
>>> i've created some vservers (debian sarge) with no problems but now i
>>> want to build a rembo [v]server on a debian sarge guest. rembo is a
>>> comercial/closed-source (sorry) pxe server from www.rembo.com. all
>>> went fine until i tried to start the daemon:
>>>
>>> # ./rembo Rembo Server 2.0 Toolkit (build 058.2)
>>> (c) 1999-2003 Rembo Technology SaRL, Geneva, Switzerland
>>> Error on interface 10.20.102.239
>>> # strace ./rembo -d 2>&1 | tail -n 25
>>> open("./rembo", O_RDONLY) = 3
>>> lseek(3, 0, SEEK_END) = 1238692
>>> lseek(3, 0, SEEK_SET) = 0
>>> mmap2(NULL, 1241088, PROT_READ|PROT_WRITE,
>>> MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7cd6000
>>> read(3,
>>> "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\2\0\3\0\1\0\0\0\0\241\4"...,
>>> 1238692) = 1238692
>>> open("rembo.conf", O_RDONLY) = 4
>>> fstat64(4, {st_mode=S_IFREG|0644, st_size=91, ...}) = 0
>>> mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS,
>>> -1, 0) = 0xb7f87000
>>> fstat64(4, {st_mode=S_IFREG|0644, st_size=91, ...}) = 0
>>> _llseek(4, 0, [0], SEEK_SET) = 0
>>> read(4, "\n BaseDir \"/rembo\"\n "..., 91) = 91
>>> _llseek(4, 91, [91], SEEK_SET) = 0
>>> close(4) = 0
>>> munmap(0xb7f87000, 4096) = 0
>>> socket(PF_INET, SOCK_DGRAM, IPPROTO_UDP) = 4
>>> bind(4, {sa_family=AF_INET, sin_port=htons(0),
>>> sin_addr=inet_addr("127.0.0.1")}, 16) = 0
>>> getsockname(4, {sa_family=AF_INET, sin_port=htons(33007),
>>
>> it looks like it is looking up 'lo' inside the guest,
>> you might try to add 127.0.0.1 as a separate 'nodev'
>> entry to the guest, or to disable the hide_netif flag
>>
> this is what i have on the host:
>
> # cd /etc/vservers/alf/interfaces/
> mosques:/etc/vservers/alf/interfaces# ls
> 0 1
> mosques:/etc/vservers/alf/interfaces# ls 1/
> dev ip mask nodev
> mosques:/etc/vservers/alf/interfaces# cat 1/*
> lo
> 127.0.0.1
> 8
>
> i can ping localhost and 127.0.0.1 inside the vserver but this does
> not work: the rembo daemon does not start. also, i've added
> CAP_NET_ADMIN and got the same result.
>
> what i think may bring some light is the following:
> if i try to execute the server (it is statically linked) on the host
> it works!
> so i've compared the output of strace and i get:
>
> alf (vserver):
> ...
> socket(PF_INET, SOCK_DGRAM, IPPROTO_UDP) = 4
> bind(4, {sa_family=AF_INET, sin_port=htons(0),
> sin_addr=inet_addr("127.0.0.1")}, 16) = 0
> getsockname(4, {sa_family=AF_INET, sin_port=htons(33018),
> sin_addr=inet_addr("10.20.102.239")}, [16]) = 0
> futex(0xb7f5b1f0, FUTEX_WAKE, 2147483647) = 0
> write(2, "Error on interface 10.20.102.239"..., 33Error on interface
> 10.20.102.239
>
> and it dies.
>
> mosques(host):
> ...
> socket(PF_INET, SOCK_DGRAM, IPPROTO_UDP) = 4
> bind(4, {sa_family=AF_INET, sin_port=htons(0),
> sin_addr=inet_addr("127.0.0.1")}, 16) = 0
> getsockname(4, {sa_family=AF_INET, sin_port=htons(33018),
> sin_addr=inet_addr("127.0.0.1")}, [16]) = 0
> close(4) = 0
> uname({sys="Linux", node="mosques", ...}) = 0
> ... and continue ahead.
>
>
> after the 'bind' call, why does alf execute a getsockname with
> 10.20.102.239 (just before die) while mosques pass 127.0.0.1 and
> continues successfully? is it due to chbind?
>
> once more is clear that not having the source code is like selling
> your soul, but we have no other viable alternative.
>
>>> sin_addr=inet_addr("10.20.102.239")}, [16]) = 0
>>> futex(0xb7f3a1f0, FUTEX_WAKE, 2147483647) = 0
>>> write(2, "Error on interface 10.20.102.239"..., 33Error on interface
>>> 10.20.102.239) = 33
>>> write(1, "Rembo Server 2.0 Toolkit (build "..., 96Rembo Server 2.0
>>> Toolkit (build 058.2)
>>> (c) 1999-2003 Rembo Technology SaRL, Geneva, Switzerland) = 96
>>> munmap(0xb7f88000, 4096) = 0
>>> exit_group(0) = ?
>>>
>>> i've have a couple of non-vserver servers with sarge+rembo running
>>> perfectly so i think is a rembo-vserver compatibility issue.
>>>
>>
>> you might also try to 'change' the configuration of
>> that pxe server to _not_ use 127.0.0.1 (and use localhost
>> or the first assigned ip instead)
>>
>>
> don't know why that code looks for 127.0.0.1. on the other 'real'
> rembo servers i have there's nothing in the config about the 'lo'
> interface.
>>> the vserver has a couple of bcapabilities in order to run also a
>>> dhcp server: CAP_NET_RAW and CAP_NET_BROADCAST.
>>>
>>
>> CAP_NET_BROADCAST is not used, so it's unlikely you need
>> that one ... but it doesn't hurt either :)
>>
> i need it because i run a dhcpd server on the same vserser (as i do in
> the 'real' other rembo servers).
>>
>>> thanks in advance.
>>>
>>
>> HTH,
>> Herbert
>>
>>
>>> begin:vcard
>>> fn;quoted-printable:david many=C3=A9
>>> n;quoted-printable:many=C3=A9;david
>>> org;quoted-printable:Universitat Rovira i Virgili;Departament
>>> d'Enginyeria Inform=C3=A0tica i Matem=C3=A0tiques
>>> adr;quoted-printable;dom:;;Av. dels Pa=C3=AFsos Catalans,
>>> 26;Tarragona;;43007
>>> email;internet:dmanye@urv.cat
>>> tel;work:977559706
>>> version:2.1
>>> end:vcard
>>>
>>>
>>
>>
>>> _______________________________________________
>>> Vserver mailing list
>>> Vserver@list.linux-vserver.org
>>> http://list.linux-vserver.org/mailman/listinfo/vserver
>>>
>>
>>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Vserver mailing list
> Vserver@list.linux-vserver.org
> http://list.linux-vserver.org/mailman/listinfo/vserver
>

_______________________________________________
Vserver mailing list
Vserver@list.linux-vserver.org
http://list.linux-vserver.org/mailman/listinfo/vserver
Received on Mon Jul 3 12:32:56 2006

[Next/Previous Months] [Main vserver Project Homepage] [Howto Subscribe/Unsubscribe] [Paul Sladen's vserver stuff]
Generated on Mon 03 Jul 2006 - 12:33:02 BST by hypermail 2.1.8