OpenVZ Forum


Home » Mailing lists » Users » problem with snmpd on veth
problem with snmpd on veth [message #27128] Sun, 10 February 2008 13:51 Go to next message
Alex Prinsier is currently offline  Alex Prinsier
Messages: 16
Registered: January 2007
Junior Member
Hello,

I'm seeing these error messages appear in my error log:

Feb 10 14:37:04 h01 snmpd[18514]: ioctl 35123 returned -1

I tried to get the cause of this error message:

strace /usr/sbin/snmpd -Le -f -u snmp -I -smux -p /var/run/snmpd.pid
127.0.0.1 > /root/snmpd.log 2>&1

I could find this in the strace.log:

socket(PF_INET, SOCK_DGRAM, IPPROTO_IP) = 10
ioctl(10, SIOCGIFINDEX, {ifr_name="eth0", ifr_index=6}) = 0
close(10)                               = 0
socket(PF_INET, SOCK_DGRAM, IPPROTO_IP) = 10
ioctl(10, SIOCGIFINDEX, {ifr_name="veth3003", ???}) = -1 ENODEV (No such
device)
write(2, "ioctl 35123 returned -1\n", 24ioctl 35123 returned -1
) = 24
close(10)                               = 0

veth3003 is associated with VE 3003, in which runs openvpn (don't think
that's relevant though).

Anyone knows what this ioctl is for, and why it fails for veth3003?

Thanks,

Alexander
Re: problem with snmpd on veth [message #27157 is a reply to message #27128] Mon, 11 February 2008 12:52 Go to previous messageGo to next message
Kirill Korotaev is currently offline  Kirill Korotaev
Messages: 137
Registered: January 2006
Senior Member
this ioctl() return ifindex by device name.
where do you run this snpmd/strace? in host or in VE?
obviously, there is no veth3003 device found, so the error was returned.

what 'ip a l' commands shows when this happens?

Kirill

Alexander Prinsier wrote:
> Hello,
> 
> I'm seeing these error messages appear in my error log:
> 
> Feb 10 14:37:04 h01 snmpd[18514]: ioctl 35123 returned -1
> 
> I tried to get the cause of this error message:
> 
> strace /usr/sbin/snmpd -Le -f -u snmp -I -smux -p /var/run/snmpd.pid
> 127.0.0.1 > /root/snmpd.log 2>&1
> 
> I could find this in the strace.log:
> 
> socket(PF_INET, SOCK_DGRAM, IPPROTO_IP) = 10
> ioctl(10, SIOCGIFINDEX, {ifr_name="eth0", ifr_index=6}) = 0
> close(10)                               = 0
> socket(PF_INET, SOCK_DGRAM, IPPROTO_IP) = 10
> ioctl(10, SIOCGIFINDEX, {ifr_name="veth3003", ???}) = -1 ENODEV (No such
> device)
> write(2, "ioctl 35123 returned -1\n", 24ioctl 35123 returned -1
> ) = 24
> close(10)                               = 0
> 
> veth3003 is associated with VE 3003, in which runs openvpn (don't think
> that's relevant though).
> 
> Anyone knows what this ioctl is for, and why it fails for veth3003?
> 
> Thanks,
> 
> Alexander
Re: problem with snmpd on veth [message #27180 is a reply to message #27157] Mon, 11 February 2008 18:05 Go to previous messageGo to next message
Alex Prinsier is currently offline  Alex Prinsier
Messages: 16
Registered: January 2007
Junior Member
I'm running snmpd/strace in the host.

ip a l lists the interface 'veth3003.0'.

Could this '.0' make a difference?

Alexander

Kirill Korotaev wrote:
> this ioctl() return ifindex by device name.
> where do you run this snpmd/strace? in host or in VE?
> obviously, there is no veth3003 device found, so the error was returned.
> 
> what 'ip a l' commands shows when this happens?
> 
> Kirill
> 
> Alexander Prinsier wrote:
>> Hello,
>>
>> I'm seeing these error messages appear in my error log:
>>
>> Feb 10 14:37:04 h01 snmpd[18514]: ioctl 35123 returned -1
>>
>> I tried to get the cause of this error message:
>>
>> strace /usr/sbin/snmpd -Le -f -u snmp -I -smux -p /var/run/snmpd.pid
>> 127.0.0.1 > /root/snmpd.log 2>&1
>>
>> I could find this in the strace.log:
>>
>> socket(PF_INET, SOCK_DGRAM, IPPROTO_IP) = 10
>> ioctl(10, SIOCGIFINDEX, {ifr_name="eth0", ifr_index=6}) = 0
>> close(10)                               = 0
>> socket(PF_INET, SOCK_DGRAM, IPPROTO_IP) = 10
>> ioctl(10, SIOCGIFINDEX, {ifr_name="veth3003", ???}) = -1 ENODEV (No such
>> device)
>> write(2, "ioctl 35123 returned -1\n", 24ioctl 35123 returned -1
>> ) = 24
>> close(10)                               = 0
>>
>> veth3003 is associated with VE 3003, in which runs openvpn (don't think
>> that's relevant though).
>>
>> Anyone knows what this ioctl is for, and why it fails for veth3003?
>>
>> Thanks,
>>
>> Alexander
Re: problem with snmpd on veth [message #27181 is a reply to message #27180] Mon, 11 February 2008 18:13 Go to previous messageGo to next message
Kirill Korotaev is currently offline  Kirill Korotaev
Messages: 137
Registered: January 2006
Senior Member
is it VLAN or you just gave veth that name?
I guess snpmd tries to be too smart and assumes it is a VLAN... But maybe I'm wrong.


Alexander Prinsier wrote:
> I'm running snmpd/strace in the host.
> 
> ip a l lists the interface 'veth3003.0'.
> 
> Could this '.0' make a difference?
> 
> Alexander
> 
> Kirill Korotaev wrote:
>> this ioctl() return ifindex by device name.
>> where do you run this snpmd/strace? in host or in VE?
>> obviously, there is no veth3003 device found, so the error was returned.
>>
>> what 'ip a l' commands shows when this happens?
>>
>> Kirill
>>
>> Alexander Prinsier wrote:
>>> Hello,
>>>
>>> I'm seeing these error messages appear in my error log:
>>>
>>> Feb 10 14:37:04 h01 snmpd[18514]: ioctl 35123 returned -1
>>>
>>> I tried to get the cause of this error message:
>>>
>>> strace /usr/sbin/snmpd -Le -f -u snmp -I -smux -p /var/run/snmpd.pid
>>> 127.0.0.1 > /root/snmpd.log 2>&1
>>>
>>> I could find this in the strace.log:
>>>
>>> socket(PF_INET, SOCK_DGRAM, IPPROTO_IP) = 10
>>> ioctl(10, SIOCGIFINDEX, {ifr_name="eth0", ifr_index=6}) = 0
>>> close(10)                               = 0
>>> socket(PF_INET, SOCK_DGRAM, IPPROTO_IP) = 10
>>> ioctl(10, SIOCGIFINDEX, {ifr_name="veth3003", ???}) = -1 ENODEV (No such
>>> device)
>>> write(2, "ioctl 35123 returned -1\n", 24ioctl 35123 returned -1
>>> ) = 24
>>> close(10)                               = 0
>>>
>>> veth3003 is associated with VE 3003, in which runs openvpn (don't think
>>> that's relevant though).
>>>
>>> Anyone knows what this ioctl is for, and why it fails for veth3003?
>>>
>>> Thanks,
>>>
>>> Alexander
Re: problem with snmpd on veth [message #27184 is a reply to message #27128] Mon, 11 February 2008 18:25 Go to previous messageGo to next message
Kirill Korotaev is currently offline  Kirill Korotaev
Messages: 137
Registered: January 2006
Senior Member
you are welcome!

Kirill

Alexander Prinsier wrote:
> It's not a VLAN. I don't remember giving it a name myself. I thought
> openvz somehow choose the name (since it's for VE 3003).
> 
> I edited the host_ifname in /etc/vz/conf/3003.conf to veth3003 instead
> of veth3003.0 and it fixed it. Thanks for helping finding the error.
> 
> Alexander
> 
> Kirill Korotaev wrote:
>> is it VLAN or you just gave veth that name?
>> I guess snpmd tries to be too smart and assumes it is a VLAN... But maybe I'm wrong.
>>
>>
>> Alexander Prinsier wrote:
>>> I'm running snmpd/strace in the host.
>>>
>>> ip a l lists the interface 'veth3003.0'.
>>>
>>> Could this '.0' make a difference?
>>>
>>> Alexander
>>>
>>> Kirill Korotaev wrote:
>>>> this ioctl() return ifindex by device name.
>>>> where do you run this snpmd/strace? in host or in VE?
>>>> obviously, there is no veth3003 device found, so the error was returned.
>>>>
>>>> what 'ip a l' commands shows when this happens?
>>>>
>>>> Kirill
>>>>
>>>> Alexander Prinsier wrote:
>>>>> Hello,
>>>>>
>>>>> I'm seeing these error messages appear in my error log:
>>>>>
>>>>> Feb 10 14:37:04 h01 snmpd[18514]: ioctl 35123 returned -1
>>>>>
>>>>> I tried to get the cause of this error message:
>>>>>
>>>>> strace /usr/sbin/snmpd -Le -f -u snmp -I -smux -p /var/run/snmpd.pid
>>>>> 127.0.0.1 > /root/snmpd.log 2>&1
>>>>>
>>>>> I could find this in the strace.log:
>>>>>
>>>>> socket(PF_INET, SOCK_DGRAM, IPPROTO_IP) = 10
>>>>> ioctl(10, SIOCGIFINDEX, {ifr_name="eth0", ifr_index=6}) = 0
>>>>> close(10)                               = 0
>>>>> socket(PF_INET, SOCK_DGRAM, IPPROTO_IP) = 10
>>>>> ioctl(10, SIOCGIFINDEX, {ifr_name="veth3003", ???}) = -1 ENODEV (No such
>>>>> device)
>>>>> write(2, "ioctl 35123 returned -1\n", 24ioctl 35123 returned -1
>>>>> ) = 24
>>>>> close(10)                               = 0
>>>>>
>>>>> veth3003 is associated with VE 3003, in which runs openvpn (don't think
>>>>> that's relevant though).
>>>>>
>>>>> Anyone knows what this ioctl is for, and why it fails for veth3003?
>>>>>
>>>>> Thanks,
>>>>>
>>>>> Alexander
Re: problem with snmpd on veth [message #27186 is a reply to message #27181] Mon, 11 February 2008 18:23 Go to previous messageGo to next message
Alex Prinsier is currently offline  Alex Prinsier
Messages: 16
Registered: January 2007
Junior Member
It's not a VLAN. I don't remember giving it a name myself. I thought
openvz somehow choose the name (since it's for VE 3003).

I edited the host_ifname in /etc/vz/conf/3003.conf to veth3003 instead
of veth3003.0 and it fixed it. Thanks for helping finding the error.

Alexander

Kirill Korotaev wrote:
> is it VLAN or you just gave veth that name?
> I guess snpmd tries to be too smart and assumes it is a VLAN... But maybe I'm wrong.
> 
> 
> Alexander Prinsier wrote:
>> I'm running snmpd/strace in the host.
>>
>> ip a l lists the interface 'veth3003.0'.
>>
>> Could this '.0' make a difference?
>>
>> Alexander
>>
>> Kirill Korotaev wrote:
>>> this ioctl() return ifindex by device name.
>>> where do you run this snpmd/strace? in host or in VE?
>>> obviously, there is no veth3003 device found, so the error was returned.
>>>
>>> what 'ip a l' commands shows when this happens?
>>>
>>> Kirill
>>>
>>> Alexander Prinsier wrote:
>>>> Hello,
>>>>
>>>> I'm seeing these error messages appear in my error log:
>>>>
>>>> Feb 10 14:37:04 h01 snmpd[18514]: ioctl 35123 returned -1
>>>>
>>>> I tried to get the cause of this error message:
>>>>
>>>> strace /usr/sbin/snmpd -Le -f -u snmp -I -smux -p /var/run/snmpd.pid
>>>> 127.0.0.1 > /root/snmpd.log 2>&1
>>>>
>>>> I could find this in the strace.log:
>>>>
>>>> socket(PF_INET, SOCK_DGRAM, IPPROTO_IP) = 10
>>>> ioctl(10, SIOCGIFINDEX, {ifr_name="eth0", ifr_index=6}) = 0
>>>> close(10)                               = 0
>>>> socket(PF_INET, SOCK_DGRAM, IPPROTO_IP) = 10
>>>> ioctl(10, SIOCGIFINDEX, {ifr_name="veth3003", ???}) = -1 ENODEV (No such
>>>> device)
>>>> write(2, "ioctl 35123 returned -1\n", 24ioctl 35123 returned -1
>>>> ) = 24
>>>> close(10)                               = 0
>>>>
>>>> veth3003 is associated with VE 3003, in which runs openvpn (don't think
>>>> that's relevant though).
>>>>
>>>> Anyone knows what this ioctl is for, and why it fails for veth3003?
>>>>
>>>> Thanks,
>>>>
>>>> Alexander
Re: problem with snmpd on veth [message #27353 is a reply to message #27181] Tue, 12 February 2008 12:21 Go to previous message
Roman Kagan is currently offline  Roman Kagan
Messages: 1
Registered: February 2008
Junior Member
On Mon, Feb 11, 2008 at 09:13:28PM +0300, Kirill Korotaev wrote:
> is it VLAN or you just gave veth that name?

Believe it or not but this is what vzctl assigns to the VE0 end of the
veth pair by default ;)

> I guess snpmd tries to be too smart and assumes it is a VLAN...

Seems so, except that it is too dumb and relies on the naming convention
to figure out VLAN parentship.  It should rather query the kernel for
that.

Roman.
Previous Topic: virtual machine not able to ping out side netwrok
Next Topic: openvz in domu (xen)
Goto Forum:
  


Current Time: Sat Jul 27 04:30:21 GMT 2024

Total time taken to generate the page: 0.02998 seconds