[Time] Name | Message |
[15:02] drbobbeaty
|
Question - maybe off-topic, but I thought I'd ask anyway... is the Java Driver for ZeroMQ - the one that's on github at 'zeromq/jzmq'... is it working with the latest ZeroMQ? I ask because I'm working with someone that's getting a simple server going, but the client is giving him a consistent error. Same error as using the Java code in the "cookbook" Java code.
|
[15:02] drbobbeaty
|
Just didn't know if there's something I should know about the Java client.
|
[15:03] drbobbeaty
|
...like you have to be on a specific version of the JDK, or use a specific compiler for the JNI... that kind of stuff.
|
[15:03] drbobbeaty
|
(if it matters, this is all on linux)
|
[15:03] drbobbeaty
|
Thanks for any help anyone can provide.
|
[15:06] sustrik
|
it should work, what's the error?
|
[15:15] drbobbeaty
|
hang on just a sec... I'll get it from him.
|
[15:18] drbobbeaty
|
OK... here it is...
|
[15:18] drbobbeaty
|
the output is:
|
[15:18] drbobbeaty
|
ENTERED Calling COnnect
|
[15:19] drbobbeaty
|
Calling Connect
|
[15:19] drbobbeaty
|
DONE Calling Connect 22
|
[15:19] drbobbeaty
|
Exception in thread "main" java.lang.Exception: 22 - 0x16 - Invalid argument
|
[15:20] drbobbeaty
|
at org.zeromq.ZMQ$Socket.connect(Native Method)
|
[15:20] drbobbeaty
|
at remote_lat.main
|
[15:22] drbobbeaty
|
The logging is his, but the exception is the problem. The code is the simple connection example off the Cookbook.
|
[15:26] drbobbeaty
|
I'm looking at the JNI code and seeing that it appears that the zmq_connect() is returning a 22 as opposed to a 0, and that's what's throwing the exception, but I'm at a loss to know what the 22 returned from zmq_connect() means.
|
[15:26] mato
|
drbobbeaty: it's EINVAL, which you're seeing the strerror() of, "Invalid argument"
|
[15:26] mato
|
drbobbeaty: which example, specifically?
|
[15:27] mato
|
ah
|
[15:28] mato
|
the cookbook is using non-pertable addressing
|
[15:28] drbobbeaty
|
Oh? OK... what needs to change? I believe he's using the Java pub/sub example
|
[15:29] mato
|
i'll go edit the cookbook
|
[15:29] mato
|
drbobbeaty: what platform is he on?
|
[15:29] drbobbeaty
|
My correection... he's using the "perf" directory in the Java codebase.
|
[15:30] mato
|
drbobbeaty: no idea about that. but basically zmq is saying it can't resolve your connect or bind
|
[15:30] mato
|
drbobbeaty: also, if he's on a machine disconnected from the net there's a bug in 2.0.7 that will just stop things from working
|
[15:31] drbobbeaty
|
On CentOS5.1
|
[15:31] drbobbeaty
|
He's connected to the net.
|
[15:32] mato
|
drbobbeaty: well, i can't see what doesn't work w/o his exact code, sorry. can't really help, the answer is EINVAL in zmq_connect() or zmq_bind() means it doesn't like the address you're passing for some reason
|
[15:32] drbobbeaty
|
I'm going to try to get things built on my box and help in the debugging... but if there's something I need to know about the cookbook example, or something with Java, please let me know. I've been using the C++ version for several weeks without a problem.
|
[15:32] drbobbeaty
|
OK, I'll dig and get a more concise problem statement - or a fix.
|
[15:32] mato
|
nothing, what i said about being non-portable just means the examples won't work out of the box on systems other than Linux
|
[15:32] mato
|
which i'll fix in the cookbook
|
[15:33] sustrik
|
aren't you using PGM btw?
|
[15:33] mato
|
for jzmq ask on the mailing list, i'm not the maintainer there
|
[15:33] sustrik
|
if so, 0MQ has to be compiled with --with-pgm option
|
[16:14] drbobbeaty
|
mato, sustrik... thanks for the help and we figured it out. But it might be something that could be put in the Cookbook or docs to make it simpler for new comers. Basically, in using the local_lat and remote_lat the definition of the URL is different. In the local, you need to use a physical NIC to bind to, and in the remote you need to giv it an IP address.
|
[16:14] drbobbeaty
|
So... using the same URL of "tcp://eth0:5555" on both will get you an error on the remote_lat
|
[16:14] mato
|
drbobbeaty: yeah, the perf tests really need more docs...
|
[16:15] drbobbeaty
|
So you need to use the "eth0" on the local and the machine name on the remote.
|
[16:15] drbobbeaty
|
Easy fix to our understanding, but kinda puzzling for a bit.
|
[16:15] mato
|
yes, or use *:5555 on local, or numeric-ip:5555 on both
|
[16:15] drbobbeaty
|
Thanks for a great product... it's really been great so far. Just a little hiccup.
|
[16:16] drbobbeaty
|
True, good use of wildcards, mato.
|
[16:16] drbobbeaty
|
Thanks for the help. The "address" hint was really helpful.
|
[16:17] mato
|
You're welcome.
|