[zeromq-dev] Question for Python example in Perf folder

Martin Sustrik sustrik at fastmq.com
Wed Apr 22 09:08:02 CEST 2009


> Ok, I got it working. For some reason, maybe someone can explain, 
> "localhost:portnumber" did not work, but "*:portnumber" worked. So i 
> tried "*:1234" and it worked.

The problem here is that while the first argument is the name of the 
*box* zmq_server is running on, the second argument is name of the 
*network interface* that the global service is exposed on.

Aamir's system is presumably configured so that it resolves "localhost" 
to IP address (on Linux, more correct way to specify the 
loopback interface would be "lo" though).

As you are running Windows you have to enter IP address of the network 
interface card you want to use for your global service manually. The 
problem is that while *nix systems network interfaces have reasonable 
names (like "lo", "eth0" etc.) on Win32 the names are "Intel(R) 
82566DM-2 Gigabit Network" and similar. Thus entering numeric value 
makes more sense.

In short, to create a global service use say "" to host it 
on loopback interface or say "" (or whatever the 
address of your NIC is) to host it on actual network interface card.

> But  another problem came up, the message size transmitted is incorrect 
> and thus the assertion for checking the message size on the local side 
> fails. I tried sending various messages and the messsages themselves 
> come through fine, but the size does not match.

Are you sure you haven't mixed message size and message count parameters?

I've tried following on WinXP:


python py_local_thr.py localhost 1 100

python py_remote_thr.py localhost 1 100

And everything seems to work fine. If you are still experiencing problem 
can you let us know exact command lines you are using?


More information about the zeromq-dev mailing list