Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ohai WARN: unable to detect ipaddress, macaddress #397

Closed
ghost opened this issue Aug 24, 2014 · 12 comments
Closed

ohai WARN: unable to detect ipaddress, macaddress #397

ghost opened this issue Aug 24, 2014 · 12 comments
Labels
Type: Bug Does not work as expected.

Comments

@ghost
Copy link

ghost commented Aug 24, 2014

Ohai: 7.2.4
app chef # ohai > test.ohai
[2014-08-23T05:08:39+03:00] WARN: unable to detect ipaddress
[2014-08-23T05:08:39+03:00] WARN: unable to detect macaddress
app chef #

it did at least detect the gateway:

"network": {
    "interfaces": {
      "eth0:": {
        "type": "eth",
        "number": "0:"
      },
      "lo:": {

      },
      "sit0:": {
        "type": "sit",
        "number": "0:"
      }
    },
    "default_gateway": "172.16.20.1",
    "default_interface": "eth0"
  },
  "counters": {
    "network": {
      "interfaces": {

      }
    }
  },

network info :

app chef # ip link 
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT 
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP mode DEFAULT qlen 1000
    link/ether 52:54:00:70:26:0b brd ff:ff:ff:ff:ff:ff
3: sit0: <NOARP> mtu 1480 qdisc noop state DOWN mode DEFAULT 
    link/sit 0.0.0.0 brd 0.0.0.0

app chef # ip addr      
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN 
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
    link/ether 52:54:00:70:26:0b brd ff:ff:ff:ff:ff:ff
    inet 172.16.20.2/24 brd 172.16.20.255 scope global eth0
       valid_lft forever preferred_lft forever
    inet6 fe80::5054:ff:fe70:260b/64 scope link 
       valid_lft forever preferred_lft forever
3: sit0: <NOARP> mtu 1480 qdisc noop state DOWN 
    link/sit 0.0.0.0 brd 0.0.0.0
app chef # 

app chef # ifconfig
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 172.16.20.2  netmask 255.255.255.0  broadcast 172.16.20.255
        inet6 fe80::5054:ff:fe70:260b  prefixlen 64  scopeid 0x20<link>
        ether 52:54:00:70:26:0b  txqueuelen 1000  (Ethernet)
        RX packets 368449  bytes 169286648 (161.4 MiB)
        RX errors 0  dropped 201227  overruns 0  frame 0
        TX packets 132059  bytes 68529387 (65.3 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 0  (Local Loopback)
        RX packets 2556  bytes 249426 (243.5 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 2556  bytes 249426 (243.5 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

app chef # 

other info

ruby 1.9.3p547 (2014-05-14 revision 45962) [x86_64-linux]
app chef # gem --version
2.2.2
app chef # gem list --local

*** LOCAL GEMS ***

bigdecimal (1.1.0)
bundler (1.7.2)
bundler-unload (1.0.2)
chef (11.14.6)
chef-zero (2.2)
coderay (1.1.0)
diff-lcs (1.2.5)
erubis (2.7.0)
executable-hooks (1.3.2)
ffi (1.9.3)
ffi-yajl (1.0.2)
gem-wrappers (1.2.5)
hashie (2.1.2)
highline (1.6.21)
io-console (0.3)
ipaddress (0.8.0)
json (1.5.5)
libyajl2 (1.0.1)
method_source (0.8.2)
mime-types (1.25.1)
minitest (2.5.1)
mixlib-authentication (1.3.0)
mixlib-cli (1.5.0)
mixlib-config (2.1.0)
mixlib-log (1.6.0)
mixlib-shellout (1.6.0.rc.0)
net-ssh (2.9.1)
net-ssh-gateway (1.2.0)
net-ssh-multi (1.2.0)
ohai (7.2.4)
plist (3.1.0)
pry (0.10.1)
rack (1.6.0.beta)
rake (0.9.2.2)
rdoc (3.9.5)
rest-client (1.6.7)
rubygems-bundler (1.4.4)
rvm (1.11.3.9)
slop (3.6.0)
systemu (2.6.4)
wmi-lite (1.0.0)
app chef # 
@juliandunn
Copy link
Contributor

What operating system platform and version is this?

@mooney6023
Copy link

Same issue on Gentoo using the portage ebuild for ohai 7.0.4. IP address detection stops functioning.

I realize gentoo is not a supported platform, but thought it might provide a further hint.

dcuidev1 ohai # ruby -v
ruby 1.9.3p547 (2014-05-14 revision 45962) [x86_64-linux]

dcuidev1 ohai # gem -v
2.0.14

dcuidev1 ohai # gem list --local

*** LOCAL GEMS ***

abstract (1.0.0)
activesupport (4.1.5, 3.2.19, 3.2.16)
ai4r (1.11, 1.9)
allison (2.0.3)
amq-protocol (1.9.2)
bacon (1.1.0)
blockenspiel (0.4.5)
bluepill (0.0.66)
builder (3.2.2)
bundler (1.5.3, 1.1.3)
bunny (1.4.0)
chef (12.0.0.alpha.1)
chef-zero (3.1.2)
coderay (1.1.0)
daemon_controller (1.0.0)
daemons (1.1.8, 1.1.3)
diff-lcs (1.2.5, 1.1.3, 1.1.2)
docile (1.1.5)
echoe (4.6.6, 4.6.3, 4.5.6)
erubis (2.7.0)
eventmachine (0.12.10)
fastthread (1.0.7)
ffi (1.9.3, 1.0.11)
ffi-rzmq (0.9.3)
ffi-yajl (1.1.0)
gemcutter (0.7.1, 0.7.0)
hashie (2.1.2)
highline (1.6.21, 1.6.20)
hiredis (0.4.5, 0.3.1)
i18n (0.6.11, 0.6.9)
ipaddress (0.8.0)
json (1.8.1, 1.7.0, 1.5.1)
json_pure (1.7.0, 1.5.1)
libyajl2 (1.0.1)
mail (2.6.1)
method_source (0.8.2)
mime-types (2.3, 1.25.1)
minitest (5.4.1)
mixlib-authentication (1.3.0)
mixlib-cli (1.5.0)
mixlib-config (2.1.0)
mixlib-log (1.6.0, 1.4.1)
mixlib-shellout (1.4.0)
moneta (0.6.0)
multi_json (1.10.1, 1.8.2)
net-scp (1.1.2)
net-ssh (2.9.1, 2.9.0, 2.4.0, 2.3.0, 2.1.4)
net-ssh-gateway (1.2.0)
net-ssh-multi (1.2.0, 1.1)
network_interface (0.0.1)
ohai (7.2.4, 7.0.4)
passenger (3.0.12)
pg (0.13.2)
plist (3.1.0)
polyglot (0.3.5)
pry (0.10.1)
public_suffix (1.1.0)
public_suffix_service (0.9.1, 0.8.2)
racc (1.4.12, 1.4.8)
rack (1.5.2, 1.4.1, 1.3.5)
rake (10.3.2, 10.1.1, 0.8.7)
rdoc (4.0.1, 3.12, 3.5.3)
redis (3.0.7, 2.2.2, 2.2.0)
request-log-analyzer (1.12.10)
rest-client (1.6.7)
rmmseg-cpp-huacnlee (0.2.9, 0.2.8)
rspec (2.14.1, 2.9.0, 2.5.0)
rspec-core (2.14.8, 2.9.0, 2.5.1)
rspec-expectations (2.14.5, 2.9.1, 2.5.0)
rspec-mocks (2.14.6, 2.9.0, 2.5.0)
rspec_junit_formatter (0.1.6)
ruby-prof (0.10.8)
ruby-shadow (2.3.4)
rubyforge (2.0.4)
sequel (3.34.1, 3.22.0)
sifi (1.17.2)
sifi_parsing (1.1.0)
sifi_shared (1.2.0)
sifi_viewability (0.1.0)
sigar (0.7.2)
simplecov (0.9.0)
simplecov-html (0.8.0)
slop (3.6.0)
state_machine (1.2.0)
string-eater (1.0.0)
systemu (2.6.4)
test-unit (2.5.5)
thin (1.3.1)
thor (0.18.1)
thread_safe (0.3.4)
tokyotyrant (1.13)
treetop (1.4.15)
tzinfo (1.2.2)
uuidtools (2.1.5)
versionomy (0.4.4)
wmi-lite (1.0.0)
xmlparser (0.7.2.1)
yajl-ruby (1.2.1)
yard (0.8.7.4)

@btm
Copy link
Contributor

btm commented Sep 11, 2014

Could you run ohai -l debug and look for the section of output where the plugin starts to run to see if there are any useful error messages?

@mooney6023
Copy link

not much

dcuidev1 portage # ohai -l debug
[2014-10-01T10:53:06-05:00] DEBUG: No data to collect for plugin SystemProfile. Continuing...
[2014-10-01T10:53:06-05:00] WARN: unable to detect ipaddress
[2014-10-01T10:53:06-05:00] WARN: unable to detect macaddress
[2014-10-01T10:53:06-05:00] DEBUG: unable to detect ip6address
[2014-10-01T10:53:06-05:00] DEBUG: Skipping LSB, cannot find /etc/lsb-release or /usr/bin/lsb_release
[2014-10-01T10:53:06-05:00] DEBUG: Plugin GCE threw #<SocketError: getaddrinfo: Name or service not known>

@mooney6023
Copy link

FIX: On Gentoo, at least, /sbin/ip does not exist. Gentoo's ebuild for iproute2 places "ip" in "/bin/". Softlink addresses the issue for now. Perhaps Ohai can check for the executable in both /bin and /sbin

@lamont-granquist
Copy link
Contributor

should probably just invoke ip and let the PATH pick it up. if we don't have /sbin in the PATH on platforms then that should get fixed somewhere very early in ohai.

@sersut sersut added the Bug label Oct 10, 2014
@BugRoger
Copy link
Contributor

Same trouble on CoreOS. Not surprisingly since it is based on Gentoo packages too.

@jmara
Copy link

jmara commented Feb 19, 2015

Slightly different but ipaddress/macaddress and the whole network Mash is not detected on XenServer 6.5 which is Centos 5.10 based. Interface names have not changed, but "ip addr" acts weird :-/

# ip -V
ip utility, iproute2-ss121001

Any ideas?

@lamont-granquist
Copy link
Contributor

XenServer 6.5 is probably #343

Please try to keep issues on one track.

@jmara
Copy link

jmara commented Feb 20, 2015

@lamont-granquist Sorry you are totally right, I only searched for Xen and #343 didn't pop up. I'll be more carefully in the future :)

@tas50
Copy link
Contributor

tas50 commented Mar 24, 2015

I'd love if someone with a Gentoo box would try out #510 and let me know if that fixes your issue. The fix is based on the path that @BugRoger gave.

@cmluciano
Copy link

A fix for gentoo/coreos is merged in #510. Can this issue be closed?

@mcquin mcquin closed this as completed Jul 14, 2015
@thommay thommay added Type: Bug Does not work as expected. and removed Bug labels Jan 24, 2017
@chef chef locked and limited conversation to collaborators Nov 16, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Type: Bug Does not work as expected.
Projects
None yet
Development

Successfully merging a pull request may close this issue.