[zeromq-dev] ZMQ 2.0.6 connect SUB socket error
Matthew Giedt
mgiedt at gmail.com
Thu Mar 18 23:45:29 CET 2010
I'm not sure what the problem was on my machine but after fooling the
network interface into thinking that eth0 was a static IP and restarting,
the C_API is now happy to return 0 from getaddrinfo.
Apologies for the run-around.
Regards,
-Matt
On Wed, Mar 17, 2010 at 4:44 PM, Matthew Giedt <mgiedt at gmail.com> wrote:
> I traced the application to the point where it calls getaddrinfo which is
> failing on my linux machine. It's returning 1, with the error:
>
> Name or service not known
>
> I boiled down everything to: (copied straight from ip.cpp)
>
> int main( int argc, char *argv[] )
> {
> addrinfo req;
> memset (&req, 0, sizeof (req));
>
> req.ai_family = AF_INET;
>
> req.ai_socktype = SOCK_STREAM;
> req.ai_flags = AI_NUMERICSERV | AI_ADDRCONFIG;
> addrinfo *res;
> int rc = getaddrinfo ( "127.0.0.1", "5555", &req, &res);
>
> if (rc) {
> cout << gai_strerror( rc ) << endl; // returns --> Name or service
> not known
> }
>
> return 0;
> }
>
> I've tried ifconfig down / up, rebooting, to no avail. Would very much
> appreciate any further advice, although it's obviously not a zmq issue.
>
> Regards,
> -Matt
>
>
> On Wed, Mar 17, 2010 at 1:13 PM, Martin Sustrik <sustrik at 250bpm.com>wrote:
>
>> Matthew,
>>
>> The settings on your computer look OK.
>>
>> Your test program doesn't induce the problem on my box.
>>
>> Can you run it under debugger and step through zmq::resolve_ip_hostname
>> function to see what's happening?
>>
>> Thanks.
>> Martin
>>
>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20100318/d66b2cea/attachment.htm>
More information about the zeromq-dev
mailing list