[zeromq-dev] large numbers of PUSHers?

2013-06-26 Thread David Cheney
First, thanks to Pieter for his overnight response to my first Q ("set
socket opts before bind/connect!") on this list, much appreciated. And
thanks/grats/props etc to the team who has built ZeroMQ.. I'm new to the
space but been round long enough to know when to be impressed.

That said, I want to have connect an impressive number of senders to a
single receiver in a "giant star."   The first question I was asked to look
into was re limitations that might be imposed by the use of persistent TCP
connections.  I've looked a bit at the "10k Problem", looked at ulimits,
managed to build 100K connections to a single PULLer, and seen people
discussing >1M tcp connections online.

If we assume that messages are small (avg is roughly 512 bytes) and that a
typical send rate from a single PUSHer is < .25/sec, what ought I to
consider as next challenges to supporting more PULL side connections?   For
simplicity I'm still working under the (clearly invalid) assumption that
the PULLer will always remain available.

Suggestions and pointers much appreciated!

ty,

Dave
___
zeromq-dev mailing list
zeromq-dev@lists.zeromq.org
http://lists.zeromq.org/mailman/listinfo/zeromq-dev


[zeromq-dev] NetMQ: is PUB/SUB filtering done at publisher side?

2013-06-26 Thread Giacomo Tesio
Hello everybody, I'm working to my first ZeroMQ based real-world
application and I have a few questions:

1) I'm working on .NET and I choosed NetMQ instead of CLRZMQ just on the
base of github activity. I've noted there are some differences between the
two API (for example I had to Subscribe("") instead of SubscribeAll()) but
they seem minor differences at a first look. Is there any difference in
functionality that I should be aware of?
2) I have to use a topic based PUB tcp socket: is PUB/SUB filtering done at
publisher side?
3) I noted (in debug) that the publisher blocks while the subscribers
handle each message: I've tried to minimize the impact of this with a queue
of messages of subscriber side, with the subscriber that fills the queue
and another thread consuming it. Is there a better approach?

Thanks a lot!


Giacomo
___
zeromq-dev mailing list
zeromq-dev@lists.zeromq.org
http://lists.zeromq.org/mailman/listinfo/zeromq-dev


Re: [zeromq-dev] C examples do not work on my PC, either with ipc or tcp, except ipc with server & client executed in the same console

2013-06-26 Thread Laurent Alebarde

Thanks a lot Steve, good to know that.


Le 26/06/2013 20:44, Steven McCoy a écrit :
On 26 June 2013 12:20, Laurent Alebarde > wrote:


# grep localhost /etc/hosts
127.0.0.1JANUS localhost
#::1localhost


This is an invalid configuration for many pieces of software as 
127.0.0.1 reverse-resolves to JANUS not localhost, this is why 
Debian/Ubuntu and others use 127.0.1.1 for the hostname on default 
installs.


--
Steve-o


___
zeromq-dev mailing list
zeromq-dev@lists.zeromq.org
http://lists.zeromq.org/mailman/listinfo/zeromq-dev


___
zeromq-dev mailing list
zeromq-dev@lists.zeromq.org
http://lists.zeromq.org/mailman/listinfo/zeromq-dev


Re: [zeromq-dev] C examples do not work on my PC, either with ipc or tcp, except ipc with server & client executed in the same console

2013-06-26 Thread Laurent Alebarde

Thanks a lot Mikko, it works now. Happy to have learned something.

Cheers,

Laurent.


Le 26/06/2013 18:55, Mikko Koppanen a écrit :
On Wed, Jun 26, 2013 at 9:06 PM, Laurent Alebarde > wrote:



console server :
$ ./flserver1 ipc://test.ipc &
[1] 17822
$ I: echo service is ready at ipc://test.ipc


ipc://test.ipc is a relative path. If you working directory is not the 
same then IPC pipe would be created in different directories. Try 
using absolute path such as ipc:///tmp/test.ipc (notice three slashes, 
two for protocol and one starting the path.)


--
Mikko Koppanen


___
zeromq-dev mailing list
zeromq-dev@lists.zeromq.org
http://lists.zeromq.org/mailman/listinfo/zeromq-dev


___
zeromq-dev mailing list
zeromq-dev@lists.zeromq.org
http://lists.zeromq.org/mailman/listinfo/zeromq-dev


Re: [zeromq-dev] C examples do not work on my PC, either with ipc or tcp, except ipc with server & client executed in the same console

2013-06-26 Thread Steven McCoy
On 26 June 2013 12:20, Laurent Alebarde  wrote:

>  # grep localhost /etc/hosts
> 127.0.0.1JANUS localhost
> #::1localhost
>

This is an invalid configuration for many pieces of software as 127.0.0.1
reverse-resolves to JANUS not localhost, this is why Debian/Ubuntu and
others use 127.0.1.1 for the hostname on default installs.

-- 
Steve-o
___
zeromq-dev mailing list
zeromq-dev@lists.zeromq.org
http://lists.zeromq.org/mailman/listinfo/zeromq-dev


Re: [zeromq-dev] Using PHP 5.4

2013-06-26 Thread Mikko Koppanen
On Wed, Jun 26, 2013 at 10:05 PM, James Marcus wrote:

> Hi,
> So I edited the config line in my spec file to add the php-config:
>
> %build
> %ifarch pentium3 pentium4 athlon i386 i486 i586 i686 x86_64
>   %configure --with-pgm --with-php-config=/usr/bin/php-config
> %else
>   %configure
> %endif
>
> I see it being called correctly in the config.status, but still no
> luck, I still have the problem. I'm open to suggestions.
>

Hi,

can you post the spec file somewhere (gist.github.com or so)? I am not
quite sure from which spec file that insert is from because PHP extension
doesn't have --with-pgm option. That looks more like a libzmq spec file.
You can see the reference spec-file for the PHP extension here:
https://github.com/mkoppanen/php-zmq/blob/master/php-zmq.spec




-- 
Mikko Koppanen
___
zeromq-dev mailing list
zeromq-dev@lists.zeromq.org
http://lists.zeromq.org/mailman/listinfo/zeromq-dev


Re: [zeromq-dev] C examples do not work on my PC, either with ipc or tcp, except ipc with server & client executed in the same console

2013-06-26 Thread Mikko Koppanen
On Wed, Jun 26, 2013 at 9:06 PM, Laurent Alebarde wrote:

>
> console server :
> $ ./flserver1 ipc://test.ipc &
> [1] 17822
> $ I: echo service is ready at ipc://test.ipc
>

ipc://test.ipc is a relative path. If you working directory is not the same
then IPC pipe would be created in different directories. Try using absolute
path such as ipc:///tmp/test.ipc (notice three slashes, two for protocol
and one starting the path.)

-- 
Mikko Koppanen
___
zeromq-dev mailing list
zeromq-dev@lists.zeromq.org
http://lists.zeromq.org/mailman/listinfo/zeromq-dev


[zeromq-dev] compilation errors

2013-06-26 Thread Andrew Azman
Hi,

Just wanted to pass on some errors I had when 
compilinghttp://pastie.org/8082785#405

Thanks,
Andrew Azman___
zeromq-dev mailing list
zeromq-dev@lists.zeromq.org
http://lists.zeromq.org/mailman/listinfo/zeromq-dev


[zeromq-dev] installation problem

2013-06-26 Thread panagiotis.zarros
Hi:

I am having problem getting correctly installed the zeromq. 1 out of 20 testes 
fail, the one below:

lt-test_last_endpoint: test_last_endpoint.cpp:31: void 
do_bind_and_verify(void*, const char*): Assertion `rc == 0' failed.
/bin/sh: line 5:  5628 Aborted ${dir}$tst
FAIL: test_last_endpoint

1 of 20 tests failed
Please report to zeromq-dev@lists.zeromq.org



In order to proceed with the installation, I also had to insert a newline at 
the end of the file:
./tests/test_connect_delay.cpp


Thearchitecture of the Linux server is:
uname -a
Linux nykdsr8440 2.6.18-348.3.1.el5 #1 SMP Tue Mar 5 13:19:32 EST 2013 x86_64 
x86_64 x86_64 GNU/Linux

The version of gcc I am using is:
Gcc 4.2.3 64 bit build.

Thanks

Panos

Ps steps taken for the installation:
./configure --prefix=/home/nyeartd/cpkgs/zeromq/3.2.3/gcc4_2_3.x64

add a newline at the end at the  file  ./tests/test_connect_delay.cpp
make
make install
make check   <== here fails 1 out of the 20 tests


___

This message is for information purposes only, it is not a recommendation, 
advice, offer or solicitation to buy or sell a product or service nor an 
official confirmation of any transaction. It is directed at persons who are 
professionals and is not intended for retail customer use. Intended for 
recipient only. This message is subject to the terms at: 
www.barclays.com/emaildisclaimer.

For important disclosures, please see: 
www.barclays.com/salesandtradingdisclaimer regarding market commentary from 
Barclays Sales and/or Trading, who are active market participants; and in 
respect of Barclays Research, including disclosures relating to specific 
issuers, please see http://publicresearch.barclays.com.

___
___
zeromq-dev mailing list
zeromq-dev@lists.zeromq.org
http://lists.zeromq.org/mailman/listinfo/zeromq-dev


Re: [zeromq-dev] pyzmq poller performance

2013-06-26 Thread Brian Knox
Min - I merged the poll request on my little laptop and gave it a spin.
Before your pull request:

mps: 28066
mps: 28116
mps: 29745
mps: 28912
mps: 28679

after your pull request:

mps: 78138
mps: 78364
mps: 78411
mps: 78065
mps: 78175

Excellent.

By the way, just for fun I imported zmq.green instead of zmq without
changing anything else

mps: 24738
mps: 24779
mps: 24759
mps: 24630
mps: 24702

And it's performance is well below straight zmq Poller.


Thanks for the quick patch!

Brian


On Tue, Jun 25, 2013 at 8:45 AM, Brian Knox  wrote:

> Thanks!  The 4x degradation is within an acceptable range for what we're
> doing and will allow me to keep some things in python for awhile longer.
> I'll patch locally and take it for a test drive today.
>
> Brian
>
>
> On Mon, Jun 24, 2013 at 11:09 PM, MinRK  wrote:
>
>> From my tests this evening, it looks like zmq_poll does have an
>> appreciable cost (plus the overhead of being wrapped in Python), and will
>> be notably slower than a simple `while True: s.recv()`.  But I did find
>> some inefficiencies in the Poller implementation, which should be addressed
>> by PR #381 , bringing the
>> difference closer to 4x from 10x.
>>
>> Your tests on my laptop:
>>
>> pure recv:
>> mps: 241121
>> mps: 419644
>> mps: 413874
>> mps: 434421
>> mps: 428623
>> mps: 404847
>>
>> poll (master):
>> mps: 48544
>> mps: 54143
>> mps: 51642
>> mps: 4
>> mps: 47591
>> mps: 54218
>>
>> poll (after 381):
>>  mps: 110436
>> mps: 110876
>> mps: 104220
>> mps: 110690
>> mps: 100544
>> mps: 110922
>>
>> -MinRK
>>
>>
>>
>> On Mon, Jun 24, 2013 at 12:18 PM, Brian Knox  wrote:
>>
>>> Thanks Min - additionally if I'm incorrect in my assumption that the
>>> poll look in my example code should perform better, or if there's a better
>>> way to do what I'm doing just let me know.
>>>
>>> The example code polls only one socket (which isn't that useful, hah)
>>> but I wanted to keep the test case dirt simple.  The actual thing I was
>>> working on has one socket that should receive data at a relatively high
>>> rate (say 50k to 100k msgs/s)  , and one socket that receives data at a
>>> much lower rate (say 1 msg/s) (for heartbeating, command and control, etc).
>>>
>>>
>>> Brian
>>>
>>>
>>> On Mon, Jun 24, 2013 at 12:12 PM, Min RK  wrote:
>>>
 Thanks for the report, I will look into whether I have introduced a
 performance degradation in the last few  iterations.

 -MinRK

 On Jun 24, 2013, at 11:27, Brian Knox  wrote:

 > It's been awhile since I've used pyzmq, and I'm running into a
 performance issue using Poller.poll().
 >
 > With a simple blocking recv() in a while True loop, I get ~ 300k
 messages a second.
 >
 > With the simplest case of the same code using a poll on the socket, I
 get ~ 30k messages a second.
 >
 > (pyzeromq)taotetek@Moya:~/src/performance_example$ python
 ./receiver.py
 > mps: 226049
 > mps: 348582
 > mps: 271728
 > mps: 300389
 > mps: 411059
 > mps: 276749
 >
 > (pyzeromq)taotetek@Moya:~/src/performance_example$ python
 ./poll_receiver.py
 > mps: 28066
 > mps: 28116
 > mps: 29745
 > mps: 28912
 > mps: 28679
 >
 > I don't remember a 10x performance degradation last time I used a
 poller - but perhaps I'm remembering something wrong, or making a painfully
 obvious error in my code .. I've been using czmq from C mostly for the last
 while.
 >
 > I'm using pyzmq from git master, and the latest Cython (0.19.1) with
 libzmq 3.2.3.
 >
 > I've attached the test cases I'm using.
 >
 > 
 > ___
 > zeromq-dev mailing list
 > zeromq-dev@lists.zeromq.org
 > http://lists.zeromq.org/mailman/listinfo/zeromq-dev
 ___
 zeromq-dev mailing list
 zeromq-dev@lists.zeromq.org
 http://lists.zeromq.org/mailman/listinfo/zeromq-dev

>>>
>>>
>>> ___
>>> zeromq-dev mailing list
>>> zeromq-dev@lists.zeromq.org
>>> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
>>>
>>>
>>
>> ___
>> zeromq-dev mailing list
>> zeromq-dev@lists.zeromq.org
>> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
>>
>>
>
> ___
> zeromq-dev mailing list
> zeromq-dev@lists.zeromq.org
> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
>
>
___
zeromq-dev mailing list
zeromq-dev@lists.zeromq.org
http://lists.zeromq.org/mailman/listinfo/zeromq-dev


Re: [zeromq-dev] C examples do not work on my PC, either with ipc or tcp, except ipc with server & client executed in the same console

2013-06-26 Thread Laurent Alebarde

If I use tcp://127.0.0.1: instead of tcp://localhost:, it works.
I don't understand since in my /etc/hosts, localhost is declared :

# grep localhost /etc/hosts
127.0.0.1JANUS localhost
#::1localhost

But it is not annoying, so for me the socket issue is closed. Remains 
the ipc transport which still does not work on my PC (except when both 
server & client are runned in the same console).



Le 26/06/2013 16:48, Laurent Alebarde a écrit :
Last message with Python was a test with ipc. Now with tcp, I get 
something that may be interesting, but myself, I don't know what to do 
with it :


$ python flserver1.py "tcp://localhost:" &
[1] 18561
$ Traceback (most recent call last):
  File "flserver1.py", line 18, in 
server.bind(endpoint)
  File "socket.pyx", line 432, in zmq.core.socket.Socket.bind 
(zmq/core/socket.c:4022)
  File "checkrc.pxd", line 21, in zmq.core.checkrc._check_rc 
(zmq/core/socket.c:5838)

zmq.error.ZMQError: No such device



Le 26/06/2013 16:40, Laurent Alebarde a écrit :
I have the same results with the Python examples. So the problem does 
not originate in my C/C++ build chain :
OK if client & server are in the same console, fails in two different 
consoles.



Le 26/06/2013 15:06, Laurent Alebarde a écrit :

Hi list,

I cannot manage to have my code working. It seems that I am sticked 
in zmq_poll. Even in an infinite while, a printf and a 100 ms 
time-out, the printf executes only once, so I conclude that in my 
code, zmq_poll blocks internally.


So I have tried the examples - precisely flclient1 along with 
flserver1 - starting the server first of course. I have tried with 
ipc and tcp and it does not work, probably for the same reasons, 
except with ipc in the same console :


console server :
$ ./flserver1 ipc://test.ipc &
[1] 17822
$ I: echo service is ready at ipc://test.ipc

console client :
$ ./flclient1 ipc://test.ipc
I: trying echo service at ipc://test.ipc...
W: no response from ipc://test.ipc, retrying...
I: trying echo service at ipc://test.ipc...
W: no response from ipc://test.ipc, retrying...
I: trying echo service at ipc://test.ipc...
W: no response from ipc://test.ipc, retrying...


In the same console, it works :
$ ./flserver1 ipc://test.ipc &
[2] 17800
[1]   Fini./flserver1 ipc://test.ipc
$ I: echo service is ready at ipc://test.ipc

$ ../../flclient1/Release/flclient1 ipc://test.ipcI: trying echo 
service at ipc://test.ipc...

Service is running OK

With tcp, it does not work either in the same console or not :
$ ./flserver1 tcp://localhost:&
[1] 17841
$ I: echo service is ready at tcp://localhost:

$ ../../flclient1/Release/flclient1 tcp://localhost:
I: trying echo service at tcp://localhost:...
W: no response from tcp://localhost:, retrying...
I: trying echo service at tcp://localhost:...
W: no response from tcp://localhost:, retrying...
I: trying echo service at tcp://localhost:...
W: no response from tcp://localhost:, retrying...

My iptables authorises inputs on localhost  (if I am not wrong):

# iptables -L -n
Chain INPUT (policy DROP)
target prot opt source   destination
ACCEPT udp  --  127.0.0.0/24 0.0.0.0/0udp dpt:80
ACCEPT tcp  --  127.0.0.0/24 0.0.0.0/0tcp dpt:80
ACCEPT all  --  0.0.0.0/0 0.0.0.0/0state 
RELATED,ESTABLISHED

REJECT tcp  --  0.0.0.0/0 0.0.0.0/0reject-with tcp-reset
REJECT udp  --  0.0.0.0/0 0.0.0.0/0reject-with 
icmp-port-unreachable

ACCEPT all  --  0.0.0.0/00.0.0.0/0
ACCEPT icmp --  0.0.0.0/0 0.0.0.0/0icmptype 0
ACCEPT udp  --  192.168.0.0/24 0.0.0.0/0udp dpt:631
ACCEPT tcp  --  192.168.0.0/24 0.0.0.0/0tcp dpt:631

Chain FORWARD (policy DROP)
target prot opt source   destination
ACCEPT all  --  192.168.99.0/24 !192.168.0.0/24
ACCEPT all  --  0.0.0.0/0 0.0.0.0/0state 
RELATED,ESTABLISHED


Chain OUTPUT (policy ACCEPT)
target prot opt source   destination


Here are for information the compile command (from Eclipse) :
Command : g++-4.7.3
Options :  -O3 -Wall -c -fmessage-length=0  -std=c++11 -march=corei7 
-mtune=corei7


and for the linker :
Command : g++-4.7.3
Options :  -l czmq


Any idea please ?


___
zeromq-dev mailing list
zeromq-dev@lists.zeromq.org
http://lists.zeromq.org/mailman/listinfo/zeromq-dev






___
zeromq-dev mailing list
zeromq-dev@lists.zeromq.org
http://lists.zeromq.org/mailman/listinfo/zeromq-dev


Re: [zeromq-dev] ZMQ TCP optimization

2013-06-26 Thread Ori Barak
Hi,

Thanks for the help Martin,
Enclosed are first couple in pcapng format hope it's fine.

It looks as if windo size scaling factor is -2 (no window scaling used). I've 
tried not using the SND\RECVBUF option and also tried setting it with very high 
value but didn't see any difference.

Thanks,
Ori

-Original Message-
From: zeromq-dev-boun...@lists.zeromq.org 
[mailto:zeromq-dev-boun...@lists.zeromq.org] On Behalf Of Martin Hurton
Sent: Wednesday, June 26, 2013 2:37 PM
To: ZeroMQ development list
Subject: Re: [zeromq-dev] ZMQ TCP optimization

Hi Ori, could you please capture the first 10 packets when you connect to the 
remote server for me. I would like to check something. Thanks.

- mh

On Wed, Jun 26, 2013 at 10:05 AM, Ori Barak  wrote:
> Hi,
>
>
>
> I have an application running on windows using ZMQ Push\Pull TCP sockets.
>
> The client\server machines I use have a 1 GB bandwidth.
>
> When sending messages between 2 close servers (round trip time <1ms) I 
> get a rate of about  ~110MB/sec. When sending messages between two 
> remote servers (round trip ~70ms) I get ~1.5MB/sec. I was under the 
> impression that the RTT shouldn't affect much on the throughput since 
> the TCP window scaling option is enabled in windows by default 
> (http://en.wikipedia.org/wiki/TCP_window_scale_option ) thus window 
> size can increase up to 1,073,725,440 bytes which basically means the 
> RTT should have little effect.
>
>
>
> If I open multiple channels on the client side on the same destination 
> port I can get more utilization but I would rather have a single 
> channel working faster.
>
>
>
> Any ZMQ\TCP configuration I can change to increase network utilization?
>
>
>
> Thanks,
>
> Ori
>
>
>
>
>
>
> ___
> zeromq-dev mailing list
> zeromq-dev@lists.zeromq.org
> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
>
___
zeromq-dev mailing list
zeromq-dev@lists.zeromq.org
http://lists.zeromq.org/mailman/listinfo/zeromq-dev


first10.pcapng
Description: first10.pcapng
___
zeromq-dev mailing list
zeromq-dev@lists.zeromq.org
http://lists.zeromq.org/mailman/listinfo/zeromq-dev


[zeromq-dev] Sending files from client to server using zeromq

2013-06-26 Thread ashwini ramamurthy
Hi,


I want to send a xml file from the client to the server using zeromq . I
was previously using HTTP PUT. I went through the zeromq discussion list
but could not find many discussions on file transfer.My question is :what
are the advantages of using zeromq to transfer files?
How are large files transferred in zeromq and how would it be better than
using HTTP?


Thanks,
Ashwini
___
zeromq-dev mailing list
zeromq-dev@lists.zeromq.org
http://lists.zeromq.org/mailman/listinfo/zeromq-dev


Re: [zeromq-dev] C examples do not work on my PC, either with ipc or tcp, except ipc with server & client executed in the same console

2013-06-26 Thread Laurent Alebarde
Last message with Python was a test with ipc. Now with tcp, I get 
something that may be interesting, but myself, I don't know what to do 
with it :


$ python flserver1.py "tcp://localhost:" &
[1] 18561
$ Traceback (most recent call last):
  File "flserver1.py", line 18, in 
server.bind(endpoint)
  File "socket.pyx", line 432, in zmq.core.socket.Socket.bind 
(zmq/core/socket.c:4022)
  File "checkrc.pxd", line 21, in zmq.core.checkrc._check_rc 
(zmq/core/socket.c:5838)

zmq.error.ZMQError: No such device



Le 26/06/2013 16:40, Laurent Alebarde a écrit :
I have the same results with the Python examples. So the problem does 
not originate in my C/C++ build chain :
OK if client & server are in the same console, fails in two different 
consoles.



Le 26/06/2013 15:06, Laurent Alebarde a écrit :

Hi list,

I cannot manage to have my code working. It seems that I am sticked 
in zmq_poll. Even in an infinite while, a printf and a 100 ms 
time-out, the printf executes only once, so I conclude that in my 
code, zmq_poll blocks internally.


So I have tried the examples - precisely flclient1 along with 
flserver1 - starting the server first of course. I have tried with 
ipc and tcp and it does not work, probably for the same reasons, 
except with ipc in the same console :


console server :
$ ./flserver1 ipc://test.ipc &
[1] 17822
$ I: echo service is ready at ipc://test.ipc

console client :
$ ./flclient1 ipc://test.ipc
I: trying echo service at ipc://test.ipc...
W: no response from ipc://test.ipc, retrying...
I: trying echo service at ipc://test.ipc...
W: no response from ipc://test.ipc, retrying...
I: trying echo service at ipc://test.ipc...
W: no response from ipc://test.ipc, retrying...


In the same console, it works :
$ ./flserver1 ipc://test.ipc &
[2] 17800
[1]   Fini./flserver1 ipc://test.ipc
$ I: echo service is ready at ipc://test.ipc

$ ../../flclient1/Release/flclient1 ipc://test.ipcI: trying echo 
service at ipc://test.ipc...

Service is running OK

With tcp, it does not work either in the same console or not :
$ ./flserver1 tcp://localhost:&
[1] 17841
$ I: echo service is ready at tcp://localhost:

$ ../../flclient1/Release/flclient1 tcp://localhost:
I: trying echo service at tcp://localhost:...
W: no response from tcp://localhost:, retrying...
I: trying echo service at tcp://localhost:...
W: no response from tcp://localhost:, retrying...
I: trying echo service at tcp://localhost:...
W: no response from tcp://localhost:, retrying...

My iptables authorises inputs on localhost  (if I am not wrong):

# iptables -L -n
Chain INPUT (policy DROP)
target prot opt source   destination
ACCEPT udp  --  127.0.0.0/24 0.0.0.0/0 udp dpt:80
ACCEPT tcp  --  127.0.0.0/24 0.0.0.0/0 tcp dpt:80
ACCEPT all  --  0.0.0.0/00.0.0.0/0 state 
RELATED,ESTABLISHED

REJECT tcp  --  0.0.0.0/00.0.0.0/0 reject-with tcp-reset
REJECT udp  --  0.0.0.0/00.0.0.0/0 reject-with 
icmp-port-unreachable

ACCEPT all  --  0.0.0.0/00.0.0.0/0
ACCEPT icmp --  0.0.0.0/00.0.0.0/0 icmptype 0
ACCEPT udp  --  192.168.0.0/24   0.0.0.0/0 udp dpt:631
ACCEPT tcp  --  192.168.0.0/24   0.0.0.0/0 tcp dpt:631

Chain FORWARD (policy DROP)
target prot opt source   destination
ACCEPT all  --  192.168.99.0/24 !192.168.0.0/24
ACCEPT all  --  0.0.0.0/00.0.0.0/0 state 
RELATED,ESTABLISHED


Chain OUTPUT (policy ACCEPT)
target prot opt source   destination


Here are for information the compile command (from Eclipse) :
Command : g++-4.7.3
Options :  -O3 -Wall -c -fmessage-length=0  -std=c++11 -march=corei7 
-mtune=corei7


and for the linker :
Command : g++-4.7.3
Options : -l czmq


Any idea please ?


___
zeromq-dev mailing list
zeromq-dev@lists.zeromq.org
http://lists.zeromq.org/mailman/listinfo/zeromq-dev




___
zeromq-dev mailing list
zeromq-dev@lists.zeromq.org
http://lists.zeromq.org/mailman/listinfo/zeromq-dev


Re: [zeromq-dev] C examples do not work on my PC, either with ipc or tcp, except ipc with server & client executed in the same console

2013-06-26 Thread Laurent Alebarde
I have the same results with the Python examples. So the problem does 
not originate in my C/C++ build chain :
OK if client & server are in the same console, fails in two different 
consoles.



Le 26/06/2013 15:06, Laurent Alebarde a écrit :

Hi list,

I cannot manage to have my code working. It seems that I am sticked in 
zmq_poll. Even in an infinite while, a printf and a 100 ms time-out, 
the printf executes only once, so I conclude that in my code, zmq_poll 
blocks internally.


So I have tried the examples - precisely flclient1 along with 
flserver1 - starting the server first of course. I have tried with ipc 
and tcp and it does not work, probably for the same reasons, except 
with ipc in the same console :


console server :
$ ./flserver1 ipc://test.ipc &
[1] 17822
$ I: echo service is ready at ipc://test.ipc

console client :
$ ./flclient1 ipc://test.ipc
I: trying echo service at ipc://test.ipc...
W: no response from ipc://test.ipc, retrying...
I: trying echo service at ipc://test.ipc...
W: no response from ipc://test.ipc, retrying...
I: trying echo service at ipc://test.ipc...
W: no response from ipc://test.ipc, retrying...


In the same console, it works :
$ ./flserver1 ipc://test.ipc &
[2] 17800
[1]   Fini./flserver1 ipc://test.ipc
$ I: echo service is ready at ipc://test.ipc

$ ../../flclient1/Release/flclient1 ipc://test.ipcI: trying echo 
service at ipc://test.ipc...

Service is running OK

With tcp, it does not work either in the same console or not :
$ ./flserver1 tcp://localhost:&
[1] 17841
$ I: echo service is ready at tcp://localhost:

$ ../../flclient1/Release/flclient1 tcp://localhost:
I: trying echo service at tcp://localhost:...
W: no response from tcp://localhost:, retrying...
I: trying echo service at tcp://localhost:...
W: no response from tcp://localhost:, retrying...
I: trying echo service at tcp://localhost:...
W: no response from tcp://localhost:, retrying...

My iptables authorises inputs on localhost  (if I am not wrong):

# iptables -L -n
Chain INPUT (policy DROP)
target prot opt source   destination
ACCEPT udp  --  127.0.0.0/24 0.0.0.0/0 udp dpt:80
ACCEPT tcp  --  127.0.0.0/24 0.0.0.0/0 tcp dpt:80
ACCEPT all  --  0.0.0.0/00.0.0.0/0 state 
RELATED,ESTABLISHED

REJECT tcp  --  0.0.0.0/00.0.0.0/0 reject-with tcp-reset
REJECT udp  --  0.0.0.0/00.0.0.0/0 reject-with 
icmp-port-unreachable

ACCEPT all  --  0.0.0.0/00.0.0.0/0
ACCEPT icmp --  0.0.0.0/00.0.0.0/0 icmptype 0
ACCEPT udp  --  192.168.0.0/24   0.0.0.0/0 udp dpt:631
ACCEPT tcp  --  192.168.0.0/24   0.0.0.0/0 tcp dpt:631

Chain FORWARD (policy DROP)
target prot opt source   destination
ACCEPT all  --  192.168.99.0/24 !192.168.0.0/24
ACCEPT all  --  0.0.0.0/00.0.0.0/0 state 
RELATED,ESTABLISHED


Chain OUTPUT (policy ACCEPT)
target prot opt source   destination


Here are for information the compile command (from Eclipse) :
Command : g++-4.7.3
Options :  -O3 -Wall -c -fmessage-length=0  -std=c++11 -march=corei7 
-mtune=corei7


and for the linker :
Command : g++-4.7.3
Options : -l czmq


Any idea please ?


___
zeromq-dev mailing list
zeromq-dev@lists.zeromq.org
http://lists.zeromq.org/mailman/listinfo/zeromq-dev


___
zeromq-dev mailing list
zeromq-dev@lists.zeromq.org
http://lists.zeromq.org/mailman/listinfo/zeromq-dev


[zeromq-dev] Problem compiling Zyre examples

2013-06-26 Thread Renato Samperio
Hi,

As a result of our developers meeting at Brussels. I tried to give a shot to 
Zyre and I have a problem when compiling "examples" from Zyre GitHub. I did the 
same in an ubuntu Debian GNU/Linux 7.0 and Ubuntu 12.04:

1) Install, compile, run everythin as in script ".travis.yml" from Zyre git. 
Except libzmq that I guess I had already installed previously from TAR file 
when I installed ZMQ.

2) Modify header of "listener.c" and "sender.c" with "#include " 
instead of "#include ".

As a result I have this error in both files (listerner and sender):
 error: unknown type name ‘zre_interface_t’

Complete error:
http://www.heypasteit.com/clip/0V0Rc


After some more minimal iterations (all give similar results), I compiled using:

$ gcc listener.c -o listener -lzre -lzmq -L/usr/local/include -I/usr/local/lib


The content of my system is:

/usr/local/lib
http://www.heypasteit.com/clip/0V0T


/usr/local/include
http://www.heypasteit.com/clip/0V0V


I can't find the "zre_interface_t" in any of the packages that I compiled and 
installed. Any feedback is very welcome.

Renato.
  ___
zeromq-dev mailing list
zeromq-dev@lists.zeromq.org
http://lists.zeromq.org/mailman/listinfo/zeromq-dev


Re: [zeromq-dev] Using PHP 5.4

2013-06-26 Thread James Marcus
Hi,
So I edited the config line in my spec file to add the php-config:

%build
%ifarch pentium3 pentium4 athlon i386 i486 i586 i686 x86_64
  %configure --with-pgm --with-php-config=/usr/bin/php-config
%else
  %configure
%endif

I see it being called correctly in the config.status, but still no
luck, I still have the problem. I'm open to suggestions.

Thanks,
James

On Wed, Jun 26, 2013 at 7:24 AM, Mikko Koppanen
 wrote:
>
>
>
>
> On 26 Jun 2013, at 05:30, James Marcus  wrote:
>
>> the thing is... I need to deploy this to 400 servers. I'll keep
>> looking.  thanks for the suggestion.
>>
>
> During ./configure process check which php-config is picked. ./configure 
> --with-php-config=/path/to/correct/zendapi/php-config should do the trick.
>
> Thanks,
> Mikko
>
>
> Sent from my iPhone
>
>
>
>> James
>>
>> On Tue, Jun 25, 2013 at 4:59 PM, Ian Barber  wrote:
>>> Maybe try building from pecl (via pear.zero.mq) rather than the RPM?
>>>
>>> Ian
>>>
>>>
>>> On Tue, Jun 25, 2013 at 8:20 PM, James Marcus 
>>> wrote:

 Hi,
 I haven't gotten any further on this issue, anyone have any ideas how
 I change/update/downgrade the Zend API version when compiling ZeroMQ
 3.2.2?

 Thanks
 James

 On Mon, Jun 24, 2013 at 12:37 PM, James Marcus 
 wrote:
> I think I have found some stuff on PECL that my point me in the right
> direction.
>
> James
>
> On Mon, Jun 24, 2013 at 12:32 PM, James Marcus 
> wrote:
>> Hi,
>> When running phpize
>>
>> build machine:
>> [jmarcus@ohitu001 SPECS]$ phpize -v
>> Configuring for:
>> PHP Api Version: 20100412
>> Zend Module Api No:  20100525
>> Zend Extension Api No:   220100525
>>
>> target install machine:
>> [root@ws300 x86_64]# phpize -v
>> Configuring for:
>> PHP Api Version: 20100412
>> Zend Module Api No:  20100525
>> Zend Extension Api No:   220100525
>>
>> I rebuilt the zeromq rpm, but I can't run phpize before because there
>> is no config.m4 in the source directory.
>>
>> [jmarcus@ohitu001 zeromq-3.2.2]$ phpize
>> Cannot find config.m4.
>> Make sure that you run '/usr/bin/phpize' in the top level source
>> directory of the module.
>>
>> Are there any environment variables I can set to force the Zend Module
>> Api No:
>>
>> Thanks
>> James
>>
>>
>>
>> On Mon, Jun 24, 2013 at 12:03 PM, Ian Barber 
>> wrote:
>>> Watch out for phpize etc. being from the older version - that's an
>>> easy
>>> mistake to make. Maybe uninstall the previously installed version to
>>> clear
>>> out any associated components.
>>>
>>>
>>> On Mon, Jun 24, 2013 at 5:01 PM, James Marcus 
>>> wrote:

 Hi Ian,
 Thanks for the quick reply.  So Built PHP 5.4.16 and then installed
 it
 on my build server and then created the ZeroMQ binaries.  I'll give
 it
 another go incase I did something out of order.

 Thanks
 James

 On Mon, Jun 24, 2013 at 11:45 AM, Ian Barber 
 wrote:
> You'll need to build php-zmq with the version you're running -
> looked
> like
> the ZMQ extension was built with an older version of PHP.
>
> Ian
>
>
> On Mon, Jun 24, 2013 at 4:36 PM, James Marcus
> 
> wrote:
>>
>> Hi,
>> I have compiled my own PHP version, 5.4.16 and ZeroMQ 3.2.2, and
>> rolled my own RPMs.  When I start php-fpm I get the following
>> message:
>>
>> Starting php-fpm: [24-Jun-2013 11:01:49] NOTICE: PHP message: PHP
>> Warning:  PHP Startup: zmq: Unable to initialize module
>> Module compiled with module API=20090626
>> PHPcompiled with module API=20100525
>>
>> I'm assuming this is related to Zend, anyone know how to get rid
>> of
>> this message?
>>
>> Thanks,
>> James
>> ___
>> zeromq-dev mailing list
>> zeromq-dev@lists.zeromq.org
>> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
>
>
>
> ___
> zeromq-dev mailing list
> zeromq-dev@lists.zeromq.org
> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
 ___
 zeromq-dev mailing list
 zeromq-dev@lists.zeromq.org
 http://lists.zeromq.org/mailman/listinfo/zeromq-dev
>>>
>>>
>>>
>>> ___
>>> zeromq-dev mailing list
>>> zeromq-dev@lists.zeromq.org
>>> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
 ___
 zeromq-dev 

Re: [zeromq-dev] C examples do not work on my PC, either with ipc or tcp, except ipc with server & client executed in the same console

2013-06-26 Thread Laurent Alebarde

Thanks Steven, modified with:
BEFORE:
iptables -A INPUT -i lo -j ACCEPT
AFTER:
iptables -I INPUT 1 -s 127.0.0.0/24 -p tcp --dport 80:65535 -j ACCEPT
iptables -I INPUT 1 -s 127.0.0.0/24 -p udp --dport 80:65535 -j ACCEPT


It changes nothing to the result anyway. Even if I stop completly iptables.

# iptables -L -n
Chain INPUT (policy DROP)
target prot opt source   destination
ACCEPT udp  --  127.0.0.0/24 0.0.0.0/0udp 
dpts:80:65535
ACCEPT tcp  --  127.0.0.0/24 0.0.0.0/0tcp 
dpts:80:65535

ACCEPT udp  --  127.0.0.0/24 0.0.0.0/0udp dpt:80
ACCEPT tcp  --  127.0.0.0/24 0.0.0.0/0tcp dpt:80
ACCEPT all  --  0.0.0.0/00.0.0.0/0 state RELATED,ESTABLISHED
REJECT tcp  --  0.0.0.0/00.0.0.0/0 reject-with tcp-reset
REJECT udp  --  0.0.0.0/00.0.0.0/0 reject-with 
icmp-port-unreachable

ACCEPT all  --  0.0.0.0/00.0.0.0/0
ACCEPT icmp --  0.0.0.0/00.0.0.0/0 icmptype 0
ACCEPT udp  --  192.168.0.0/24   0.0.0.0/0udp dpt:631
ACCEPT tcp  --  192.168.0.0/24   0.0.0.0/0tcp dpt:631

Chain FORWARD (policy DROP)
target prot opt source   destination
ACCEPT all  --  192.168.99.0/24 !192.168.0.0/24
ACCEPT all  --  0.0.0.0/00.0.0.0/0 state RELATED,ESTABLISHED

Chain OUTPUT (policy ACCEPT)
target prot opt source   destination



Le 26/06/2013 15:17, Steven McCoy a écrit :
On 26 June 2013 09:06, Laurent Alebarde > wrote:


target prot opt source   destination
ACCEPT tcp  -- 127.0.0.0/24  0.0.0.0/0
tcp dpt:80


That's clearly only destination port 80.


___
zeromq-dev mailing list
zeromq-dev@lists.zeromq.org
http://lists.zeromq.org/mailman/listinfo/zeromq-dev


___
zeromq-dev mailing list
zeromq-dev@lists.zeromq.org
http://lists.zeromq.org/mailman/listinfo/zeromq-dev


Re: [zeromq-dev] C examples do not work on my PC, either with ipc or tcp, except ipc with server & client executed in the same console

2013-06-26 Thread Steven McCoy
On 26 June 2013 09:06, Laurent Alebarde  wrote:

> target prot opt source   destination
> ACCEPT tcp  --  127.0.0.0/24 0.0.0.0/0tcp dpt:80
>

That's clearly only destination port 80.
___
zeromq-dev mailing list
zeromq-dev@lists.zeromq.org
http://lists.zeromq.org/mailman/listinfo/zeromq-dev


[zeromq-dev] C examples do not work on my PC, either with ipc or tcp, except ipc with server & client executed in the same console

2013-06-26 Thread Laurent Alebarde

Hi list,

I cannot manage to have my code working. It seems that I am sticked in 
zmq_poll. Even in an infinite while, a printf and a 100 ms time-out, the 
printf executes only once, so I conclude that in my code, zmq_poll 
blocks internally.


So I have tried the examples - precisely flclient1 along with flserver1 
- starting the server first of course. I have tried with ipc and tcp and 
it does not work, probably for the same reasons, except with ipc in the 
same console :


console server :
$ ./flserver1 ipc://test.ipc &
[1] 17822
$ I: echo service is ready at ipc://test.ipc

console client :
$ ./flclient1 ipc://test.ipc
I: trying echo service at ipc://test.ipc...
W: no response from ipc://test.ipc, retrying...
I: trying echo service at ipc://test.ipc...
W: no response from ipc://test.ipc, retrying...
I: trying echo service at ipc://test.ipc...
W: no response from ipc://test.ipc, retrying...


In the same console, it works :
$ ./flserver1 ipc://test.ipc &
[2] 17800
[1]   Fini./flserver1 ipc://test.ipc
$ I: echo service is ready at ipc://test.ipc

$ ../../flclient1/Release/flclient1 ipc://test.ipcI: trying echo service 
at ipc://test.ipc...

Service is running OK

With tcp, it does not work either in the same console or not :
$ ./flserver1 tcp://localhost:&
[1] 17841
$ I: echo service is ready at tcp://localhost:

$ ../../flclient1/Release/flclient1 tcp://localhost:
I: trying echo service at tcp://localhost:...
W: no response from tcp://localhost:, retrying...
I: trying echo service at tcp://localhost:...
W: no response from tcp://localhost:, retrying...
I: trying echo service at tcp://localhost:...
W: no response from tcp://localhost:, retrying...

My iptables authorises inputs on localhost  (if I am not wrong):

# iptables -L -n
Chain INPUT (policy DROP)
target prot opt source   destination
ACCEPT udp  --  127.0.0.0/24 0.0.0.0/0udp dpt:80
ACCEPT tcp  --  127.0.0.0/24 0.0.0.0/0tcp dpt:80
ACCEPT all  --  0.0.0.0/00.0.0.0/0 state RELATED,ESTABLISHED
REJECT tcp  --  0.0.0.0/00.0.0.0/0 reject-with tcp-reset
REJECT udp  --  0.0.0.0/00.0.0.0/0 reject-with 
icmp-port-unreachable

ACCEPT all  --  0.0.0.0/00.0.0.0/0
ACCEPT icmp --  0.0.0.0/00.0.0.0/0 icmptype 0
ACCEPT udp  --  192.168.0.0/24   0.0.0.0/0udp dpt:631
ACCEPT tcp  --  192.168.0.0/24   0.0.0.0/0tcp dpt:631

Chain FORWARD (policy DROP)
target prot opt source   destination
ACCEPT all  --  192.168.99.0/24 !192.168.0.0/24
ACCEPT all  --  0.0.0.0/00.0.0.0/0 state RELATED,ESTABLISHED

Chain OUTPUT (policy ACCEPT)
target prot opt source   destination


Here are for information the compile command (from Eclipse) :
Command : g++-4.7.3
Options :  -O3 -Wall -c -fmessage-length=0  -std=c++11 -march=corei7 
-mtune=corei7


and for the linker :
Command : g++-4.7.3
Options :  -l czmq


Any idea please ?
___
zeromq-dev mailing list
zeromq-dev@lists.zeromq.org
http://lists.zeromq.org/mailman/listinfo/zeromq-dev


Re: [zeromq-dev] building examples fails though czmq is standardly installed : undefined reference to `zsocket_new'

2013-06-26 Thread Laurent Alebarde
Under the Eclipse CDT, it works. The only difference I can see is that 
under the console, I use gcc v. 4.5.4, and under Eclipse gcc v 4.7.1 
with c++11


This should not make a difference since paths are the same ?


Le 26/06/2013 14:19, Laurent Alebarde a écrit :

Hi list,

Though czmq is installed and installed in standard locations, building 
examples fails. Any idea please ?


My CZMQ install :

/usr/lib64/pkgconfig/libczmq.pc
/usr/lib64/libczmq.so.1.0.0
/usr/share/doc/czmq-1.3.2/AUTHORS.bz2
/usr/share/doc/czmq-1.3.2/NEWS.bz2
/usr/share/man/man7/zclock.7.bz2
/usr/share/man/man7/zlist.7.bz2
/usr/share/man/man7/zctx.7.bz2
/usr/share/man/man7/czmq.7.bz2
/usr/share/man/man7/zthread.7.bz2
/usr/share/man/man7/zsocket.7.bz2
/usr/share/man/man7/zhash.7.bz2
/usr/share/man/man7/zloop.7.bz2
/usr/share/man/man7/zframe.7.bz2
/usr/share/man/man7/zstr.7.bz2
/usr/share/man/man7/zsockopt.7.bz2
/usr/share/man/man7/zfile.7.bz2
/usr/share/man/man7/zmutex.7.bz2
/usr/share/man/man7/zmsg.7.bz2
/usr/include/zloop.h
/usr/include/zstr.h
/usr/include/zctx.h
/usr/include/zhash.h
/usr/include/zfile.h
/usr/include/zclock.h
/usr/include/czmq_prelude.h
/usr/include/zsockopt.h
/usr/include/zsocket.h
/usr/include/zmutex.h
/usr/include/czmq.h
/usr/include/zmsg.h
/usr/include/zlist.h
/usr/include/zframe.h
/usr/include/zthread.h
/usr/lib64/libczmq.so.1
/usr/lib64/libczmq.so

Build attempt :

$ ./build flclient1
flclient1
Compiling flclient1 (gcc -c   -O2 -D_REENTRANT -D_GNU_SOURCE -Wall 
-Wno-unused -fno-strict-aliasing  -DBASE_THREADSAFE -I. flclient1.c)...
Linking flclient1 (gcc   -O2 -D_REENTRANT -D_GNU_SOURCE -Wall 
-Wno-unused -fno-strict-aliasing  -DBASE_THREADSAFE flclient1.o -o 
flclient1 -Wl,--start-group  -lpthread -lm -lrt -lcrypt -luuid  
-Wl,--end-group -L. -L. -L. -lpthread -lm -lrt -lcrypt -luuid)...

flclient1.o: In function `s_try_request':
flclient1.c:(.text+0x3e): undefined reference to `zsocket_new'
flclient1.c:(.text+0x51): undefined reference to `zsocket_connect'
flclient1.c:(.text+0x59): undefined reference to `zmsg_dup'
flclient1.c:(.text+0x6b): undefined reference to `zmsg_send'
flclient1.c:(.text+0x97): undefined reference to `zmq_poll'
flclient1.c:(.text+0xa6): undefined reference to `zmsg_recv'
flclient1.c:(.text+0xb4): undefined reference to `zsocket_destroy'
flclient1.o: In function `main':
flclient1.c:(.text+0xf1): undefined reference to `zctx_new'
flclient1.c:(.text+0xfb): undefined reference to `zmsg_new'
flclient1.c:(.text+0x10f): undefined reference to `zmsg_addstr'
flclient1.c:(.text+0x18e): undefined reference to `zmsg_destroy'
flclient1.c:(.text+0x198): undefined reference to `zmsg_destroy'
flclient1.c:(.text+0x1a2): undefined reference to `zctx_destroy'
collect2: ld a retourné 1 code d'état d'exécution



___
zeromq-dev mailing list
zeromq-dev@lists.zeromq.org
http://lists.zeromq.org/mailman/listinfo/zeromq-dev


___
zeromq-dev mailing list
zeromq-dev@lists.zeromq.org
http://lists.zeromq.org/mailman/listinfo/zeromq-dev


[zeromq-dev] building examples fails though czmq is standardly installed : undefined reference to `zsocket_new'

2013-06-26 Thread Laurent Alebarde

Hi list,

Though czmq is installed and installed in standard locations, building 
examples fails. Any idea please ?


My CZMQ install :

/usr/lib64/pkgconfig/libczmq.pc
/usr/lib64/libczmq.so.1.0.0
/usr/share/doc/czmq-1.3.2/AUTHORS.bz2
/usr/share/doc/czmq-1.3.2/NEWS.bz2
/usr/share/man/man7/zclock.7.bz2
/usr/share/man/man7/zlist.7.bz2
/usr/share/man/man7/zctx.7.bz2
/usr/share/man/man7/czmq.7.bz2
/usr/share/man/man7/zthread.7.bz2
/usr/share/man/man7/zsocket.7.bz2
/usr/share/man/man7/zhash.7.bz2
/usr/share/man/man7/zloop.7.bz2
/usr/share/man/man7/zframe.7.bz2
/usr/share/man/man7/zstr.7.bz2
/usr/share/man/man7/zsockopt.7.bz2
/usr/share/man/man7/zfile.7.bz2
/usr/share/man/man7/zmutex.7.bz2
/usr/share/man/man7/zmsg.7.bz2
/usr/include/zloop.h
/usr/include/zstr.h
/usr/include/zctx.h
/usr/include/zhash.h
/usr/include/zfile.h
/usr/include/zclock.h
/usr/include/czmq_prelude.h
/usr/include/zsockopt.h
/usr/include/zsocket.h
/usr/include/zmutex.h
/usr/include/czmq.h
/usr/include/zmsg.h
/usr/include/zlist.h
/usr/include/zframe.h
/usr/include/zthread.h
/usr/lib64/libczmq.so.1
/usr/lib64/libczmq.so

Build attempt :

$ ./build flclient1
flclient1
Compiling flclient1 (gcc -c   -O2 -D_REENTRANT -D_GNU_SOURCE -Wall 
-Wno-unused -fno-strict-aliasing  -DBASE_THREADSAFE -I. flclient1.c)...
Linking flclient1 (gcc   -O2 -D_REENTRANT -D_GNU_SOURCE -Wall 
-Wno-unused -fno-strict-aliasing  -DBASE_THREADSAFE flclient1.o -o 
flclient1 -Wl,--start-group  -lpthread -lm -lrt -lcrypt -luuid 
-Wl,--end-group -L. -L. -L. -lpthread -lm -lrt -lcrypt -luuid)...

flclient1.o: In function `s_try_request':
flclient1.c:(.text+0x3e): undefined reference to `zsocket_new'
flclient1.c:(.text+0x51): undefined reference to `zsocket_connect'
flclient1.c:(.text+0x59): undefined reference to `zmsg_dup'
flclient1.c:(.text+0x6b): undefined reference to `zmsg_send'
flclient1.c:(.text+0x97): undefined reference to `zmq_poll'
flclient1.c:(.text+0xa6): undefined reference to `zmsg_recv'
flclient1.c:(.text+0xb4): undefined reference to `zsocket_destroy'
flclient1.o: In function `main':
flclient1.c:(.text+0xf1): undefined reference to `zctx_new'
flclient1.c:(.text+0xfb): undefined reference to `zmsg_new'
flclient1.c:(.text+0x10f): undefined reference to `zmsg_addstr'
flclient1.c:(.text+0x18e): undefined reference to `zmsg_destroy'
flclient1.c:(.text+0x198): undefined reference to `zmsg_destroy'
flclient1.c:(.text+0x1a2): undefined reference to `zctx_destroy'
collect2: ld a retourné 1 code d'état d'exécution

___
zeromq-dev mailing list
zeromq-dev@lists.zeromq.org
http://lists.zeromq.org/mailman/listinfo/zeromq-dev


[zeromq-dev] czmq : what about zbeacon_t using a shadow zctxt_t

2013-06-26 Thread Jean-François Smigielski
Dear all,

I am currently working on peers discovery for ZeroMQ sockets, and the
zbeacon set of features from CZMQ is a real good point for local discovery.

It seems the zbeacon feature could easily work with a zctx_t shadowed from
an original "main" context used by the remaining of the application. This
would save a whole set of internal threads, and apparently only force a
liberation order between the contexts.

I maybe missed something. What is your opinion?

Best regards.
--
Jean-François SMIGIELSKI
___
zeromq-dev mailing list
zeromq-dev@lists.zeromq.org
http://lists.zeromq.org/mailman/listinfo/zeromq-dev


Re: [zeromq-dev] ZMQ TCP optimization

2013-06-26 Thread Martin Hurton
Hi Ori, could you please capture the first 10 packets when you connect
to the remote server for me. I would like to check something. Thanks.

- mh

On Wed, Jun 26, 2013 at 10:05 AM, Ori Barak  wrote:
> Hi,
>
>
>
> I have an application running on windows using ZMQ Push\Pull TCP sockets.
>
> The client\server machines I use have a 1 GB bandwidth.
>
> When sending messages between 2 close servers (round trip time <1ms) I get a
> rate of about  ~110MB/sec. When sending messages between two remote servers
> (round trip ~70ms) I get ~1.5MB/sec. I was under the impression that the RTT
> shouldn’t affect much on the throughput since the TCP window scaling option
> is enabled in windows by default
> (http://en.wikipedia.org/wiki/TCP_window_scale_option ) thus window size can
> increase up to 1,073,725,440 bytes which basically means the RTT should have
> little effect.
>
>
>
> If I open multiple channels on the client side on the same destination port
> I can get more utilization but I would rather have a single channel working
> faster.
>
>
>
> Any ZMQ\TCP configuration I can change to increase network utilization?
>
>
>
> Thanks,
>
> Ori
>
>
>
>
>
>
> ___
> zeromq-dev mailing list
> zeromq-dev@lists.zeromq.org
> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
>
___
zeromq-dev mailing list
zeromq-dev@lists.zeromq.org
http://lists.zeromq.org/mailman/listinfo/zeromq-dev


Re: [zeromq-dev] Using PHP 5.4

2013-06-26 Thread Mikko Koppanen




On 26 Jun 2013, at 05:30, James Marcus  wrote:

> the thing is... I need to deploy this to 400 servers. I'll keep
> looking.  thanks for the suggestion.
> 

During ./configure process check which php-config is picked. ./configure 
--with-php-config=/path/to/correct/zendapi/php-config should do the trick.

Thanks,
Mikko


Sent from my iPhone



> James
> 
> On Tue, Jun 25, 2013 at 4:59 PM, Ian Barber  wrote:
>> Maybe try building from pecl (via pear.zero.mq) rather than the RPM?
>> 
>> Ian
>> 
>> 
>> On Tue, Jun 25, 2013 at 8:20 PM, James Marcus 
>> wrote:
>>> 
>>> Hi,
>>> I haven't gotten any further on this issue, anyone have any ideas how
>>> I change/update/downgrade the Zend API version when compiling ZeroMQ
>>> 3.2.2?
>>> 
>>> Thanks
>>> James
>>> 
>>> On Mon, Jun 24, 2013 at 12:37 PM, James Marcus 
>>> wrote:
 I think I have found some stuff on PECL that my point me in the right
 direction.
 
 James
 
 On Mon, Jun 24, 2013 at 12:32 PM, James Marcus 
 wrote:
> Hi,
> When running phpize
> 
> build machine:
> [jmarcus@ohitu001 SPECS]$ phpize -v
> Configuring for:
> PHP Api Version: 20100412
> Zend Module Api No:  20100525
> Zend Extension Api No:   220100525
> 
> target install machine:
> [root@ws300 x86_64]# phpize -v
> Configuring for:
> PHP Api Version: 20100412
> Zend Module Api No:  20100525
> Zend Extension Api No:   220100525
> 
> I rebuilt the zeromq rpm, but I can't run phpize before because there
> is no config.m4 in the source directory.
> 
> [jmarcus@ohitu001 zeromq-3.2.2]$ phpize
> Cannot find config.m4.
> Make sure that you run '/usr/bin/phpize' in the top level source
> directory of the module.
> 
> Are there any environment variables I can set to force the Zend Module
> Api No:
> 
> Thanks
> James
> 
> 
> 
> On Mon, Jun 24, 2013 at 12:03 PM, Ian Barber 
> wrote:
>> Watch out for phpize etc. being from the older version - that's an
>> easy
>> mistake to make. Maybe uninstall the previously installed version to
>> clear
>> out any associated components.
>> 
>> 
>> On Mon, Jun 24, 2013 at 5:01 PM, James Marcus 
>> wrote:
>>> 
>>> Hi Ian,
>>> Thanks for the quick reply.  So Built PHP 5.4.16 and then installed
>>> it
>>> on my build server and then created the ZeroMQ binaries.  I'll give
>>> it
>>> another go incase I did something out of order.
>>> 
>>> Thanks
>>> James
>>> 
>>> On Mon, Jun 24, 2013 at 11:45 AM, Ian Barber 
>>> wrote:
 You'll need to build php-zmq with the version you're running -
 looked
 like
 the ZMQ extension was built with an older version of PHP.
 
 Ian
 
 
 On Mon, Jun 24, 2013 at 4:36 PM, James Marcus
 
 wrote:
> 
> Hi,
> I have compiled my own PHP version, 5.4.16 and ZeroMQ 3.2.2, and
> rolled my own RPMs.  When I start php-fpm I get the following
> message:
> 
> Starting php-fpm: [24-Jun-2013 11:01:49] NOTICE: PHP message: PHP
> Warning:  PHP Startup: zmq: Unable to initialize module
> Module compiled with module API=20090626
> PHPcompiled with module API=20100525
> 
> I'm assuming this is related to Zend, anyone know how to get rid
> of
> this message?
> 
> Thanks,
> James
> ___
> zeromq-dev mailing list
> zeromq-dev@lists.zeromq.org
> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
 
 
 
 ___
 zeromq-dev mailing list
 zeromq-dev@lists.zeromq.org
 http://lists.zeromq.org/mailman/listinfo/zeromq-dev
>>> ___
>>> zeromq-dev mailing list
>>> zeromq-dev@lists.zeromq.org
>>> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
>> 
>> 
>> 
>> ___
>> zeromq-dev mailing list
>> zeromq-dev@lists.zeromq.org
>> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
>>> ___
>>> zeromq-dev mailing list
>>> zeromq-dev@lists.zeromq.org
>>> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
>> 
>> 
>> 
>> ___
>> zeromq-dev mailing list
>> zeromq-dev@lists.zeromq.org
>> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
> ___
> zeromq-dev mailing list
> zeromq-dev@lists.zeromq.org
> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
___
zeromq-dev mailing list
zeromq-dev@lists.zeromq.org
http://lists.z

[zeromq-dev] ZMQ TCP optimization

2013-06-26 Thread Ori Barak
Hi,

I have an application running on windows using ZMQ Push\Pull TCP sockets.
The client\server machines I use have a 1 GB bandwidth.
When sending messages between 2 close servers (round trip time <1ms) I get a 
rate of about  ~110MB/sec. When sending messages between two remote servers 
(round trip ~70ms) I get ~1.5MB/sec. I was under the impression that the RTT 
shouldn't affect much on the throughput since the TCP window scaling option is 
enabled in windows by default 
(http://en.wikipedia.org/wiki/TCP_window_scale_option ) thus window size can 
increase up to 1,073,725,440 bytes which basically means the RTT should have 
little effect.

If I open multiple channels on the client side on the same destination port I 
can get more utilization but I would rather have a single channel working 
faster.

Any ZMQ\TCP configuration I can change to increase network utilization?

Thanks,
Ori


___
zeromq-dev mailing list
zeromq-dev@lists.zeromq.org
http://lists.zeromq.org/mailman/listinfo/zeromq-dev