Can't get local IP address in getaddrinfo

Hi all,

I am working with SIP protocol and am using SIPp to generate SIP traffic.

But the call is not going through since I get the error;

2015-02-24	14:09:39:330	1424804979.330517: Can't get local IP address in getaddrinfo, local_host='NODE-01', local_ip=''.

My ifconfig output is;

eth0      Link encap:Ethernet  HWaddr 00:0C:29:50:BC:76  
          inet addr:172.18.174.102  Bcast:172.18.174.127  Mask:255.255.255.192
          inet6 addr: fe80::20c:29ff:fe50:bc76/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:10640 errors:0 dropped:0 overruns:0 frame:0
          TX packets:17613 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:943115 (921.0 KiB)  TX bytes:5985238 (5.7 MiB)

eth1      Link encap:Ethernet  HWaddr 00:0C:29:50:BC:80  
          inet addr:192.168.2.102  Bcast:192.168.2.255  Mask:255.255.255.0
          inet6 addr: fe80::20c:29ff:fe50:bc80/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:2 errors:0 dropped:0 overruns:0 frame:0
          TX packets:13 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:120 (120.0 b)  TX bytes:830 (830.0 b)

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:126 errors:0 dropped:0 overruns:0 frame:0
          TX packets:126 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:10584 (10.3 KiB)  TX bytes:10584 (10.3 KiB)

Any idea how I can get the local_ip to be assigned a value ?

Try /etc/hosts you can define adhoc useful address names in there. I think in this case it wants local_ip to be the IP of the server.

Yes thats right. I just added the server entry in /etc/hosts and it worked.

172.18.174.102 NODE-01

Thanks