cannot get ip address from dhcp

Bug #340437 reported by Sebastian Martinez
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
dhcp3 (Ubuntu)
Fix Released
Undecided
Jamie Strandboge

Bug Description

cannot get ip from network manager or dhclient command.

the error was

sebas@jaunty:~$ sudo dhclient eth3
Internet Systems Consortium DHCP Client V3.1.1
Copyright 2004-2008 Internet Systems Consortium.
All rights reserved.
For info, please visit http://www.isc.org/sw/dhcp/

Can't create addrlist socket
sebas@jaunty:~$

sebas@jaunty:~$ cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=9.04
DISTRIB_CODENAME=jaunty
DISTRIB_DESCRIPTION="Ubuntu jaunty (development branch)"

Revision history for this message
Sebastian Martinez (tychocity) wrote :

i removed apparmor apparmor-utils packages and it works ok!

Revision history for this message
Jamie Strandboge (jdstrand) wrote :

Can you please post the contents of your /var/log/kern.log when you were having the problem? Please see https://wiki.ubuntu.com/DebuggingApparmor for details.

I highly recommend you reinstall apparmor-utils otherwise all apparmor protected programs are no longer protected. A better alternative is to leave apparmor enabled and put the profile in complain mode. See the above link for details.

Changed in dhcp3:
assignee: nobody → jdstrand
status: New → Incomplete
Revision history for this message
Jamie Strandboge (jdstrand) wrote :

Actually, just removing apparmor-utils should not prevent apparmor from protecting applications, but it also shouldn't have helped your problem. Please make sure you have the following installed when reporting back with the problem:
apparmor
apparmor-utils
libapparmor-perl
libapparmor1

Simply doing 'apt-get install apparmor apparmor-utils' should give you everything you need.

Revision history for this message
Sebastian Martinez (tychocity) wrote :

i run sudo aa-complain /sbin/dhclient and it works in this mode.

this logs are generated when i run de command sudo dhclient eth3

The kern.log when the policy in enforce mode

Mar 18 07:31:03 sebas-desktop kernel: [ 3390.631622] type=1503 audit(1237372263.
138:35): operation="socket_create" family="inet" sock_type="dgram" protocol=17 p
id=6983 profile="/sbin/dhclient3"

in complain mode

Mar 18 07:32:13 sebas-desktop kernel: [ 3460.880724] type=1502 audit(1237372333.
391:48): operation="socket_create" family="inet" sock_type="dgram" protocol=17 p
id=7014 profile="/sbin/dhclient3"
Mar 18 07:32:13 sebas-desktop kernel: [ 3460.880735] type=1502 audit(1237372333.
391:49): operation="socket_post_create" family="inet" sock_type="dgram" protocol
=17 pid=7014 profile="/sbin/dhclient3"
Mar 18 07:32:14 sebas-desktop kernel: [ 3461.952225] type=1502 audit(1237372334.
462:50): operation="socket_create" family="inet" sock_type="dgram" protocol=17 p
id=7014 profile="/sbin/dhclient3"
Mar 18 07:32:14 sebas-desktop kernel: [ 3461.952240] type=1502 audit(1237372334.
462:51): operation="socket_post_create" family="inet" sock_type="dgram" protocol
=17 pid=7014 profile="/sbin/dhclient3"
Mar 18 07:32:14 sebas-desktop kernel: [ 3461.952733] type=1502 audit(1237372334.
462:52): operation="socket_create" family="inet" sock_type="dgram" protocol=17 p
id=7014 profile="/sbin/dhclient3"
Mar 18 07:32:14 sebas-desktop kernel: [ 3461.952743] type=1502 audit(1237372334.
462:53): operation="socket_post_create" family="inet" sock_type="dgram" protocol
=17 pid=7014 profile="/sbin/dhclient3"
Mar 18 07:32:14 sebas-desktop kernel: [ 3461.952753] type=1502 audit(1237372334.
462:54): operation="socket_setsockopt" family="inet" sock_type="dgram" protocol=
17 pid=7014 profile="/sbin/dhclient3"
Mar 18 07:32:14 sebas-desktop kernel: [ 3461.952763] type=1502 audit(1237372334.
462:55): operation="socket_bind" family="inet" sock_type="dgram" protocol=17 pid
=7014 profile="/sbin/dhclient3"

Revision history for this message
Jamie Strandboge (jdstrand) wrote :

Thanks for your response. Can you update /etc/apparmor.d/sbin.dhclient3 to have in it's '/sbin/dhclient3' section:
  network udp,

Then do:
sudo /etc/init.d/apparmor force-reload

and report back if that works for you?

Revision history for this message
Sebastian Martinez (tychocity) wrote :

after today updates including dhcp3-client dhcp3-common the dhcp work ok.

Revision history for this message
Jamie Strandboge (jdstrand) wrote :

For clarity, you did NOT add 'network udp,' as suggested and today's update fixed it for you?

Revision history for this message
Sebastian Martinez (tychocity) wrote : Re: [Bug 340437] Re: cannot get ip address from dhcp

no

2009/3/18 Jamie Strandboge <email address hidden>

> For clarity, you did NOT add 'network udp,' as suggested and today's
> update fixed it for you?
>
> --
> cannot get ip address from dhcp
> https://bugs.launchpad.net/bugs/340437
> You received this bug notification because you are a direct subscriber
> of the bug.
>

Revision history for this message
Jamie Strandboge (jdstrand) wrote :

Marking Fix Released per reporter's comments.

Changed in dhcp3:
status: Incomplete → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.