Re: [zeromq-dev] Assertion failed: !more (src/fq.cpp:117)
Yes, I had used zsocket_set_router_handover( self->router, 1); in my code. On Thu, Oct 20, 2016 at 7:21 PM, Doron Somech <somdo...@gmail.com> wrote: > Is the handover option enabled? > > On Fri, Sep 16, 2016 at 11:13 AM, Ranjeet Kumar <xs2ranj...@gmail.com> > wrote: > > Hi Martin, > > > > Yes, it is very often. I am having 100k clients connecting with my > server. > > So in order to run the application i had commented the line from fq.cpp > 117 > > zmq_assert (!more); > > > > And now it is working for me. > > > > > > Thanks > > (Ranjeet Kumar) > > > > > > On Fri, Sep 16, 2016 at 12:18 AM, Martin Hurton <hurt...@gmail.com> > wrote: > >> > >> Hi Ranjeet, > >> > >> Is this easy to reproduce? Thanks. > >> > >> - Martin > >> > >> On Sat, Sep 10, 2016 at 3:17 PM, Ranjeet Kumar <xs2ranj...@gmail.com> > >> wrote: > >>> > >>> Hi, > >>> > >>> I am using zeromq 4.1.5 and czmq 3.0.2. I am using the server-client as > >>> router dealer. I am getting this Assertion failed: !more > (src/fq.cpp:117) > >>> issue while 50k clients starts making connecting with the server. > >>> > >>> stack trace is below: > >>> Assertion failed: !more (src/fq.cpp:117) > >>> > >>> Program received signal SIGABRT, Aborted. > >>> [Switching to Thread 0x7490d700 (LWP 24885)] > >>> 0x768f15f7 in raise () from /lib64/libc.so.6 > >>> Missing separate debuginfos, use: debuginfo-install > >>> glibc-2.17-106.el7_2.6.x86_64 libgcc-4.8.5-4.el7.x86_64 > >>> libstdc++-4.8.5-4.el7.x86_64 > >>> (gdb) bt > >>> #0 0x768f15f7 in raise () from /lib64/libc.so.6 > >>> #1 0x768f2ce8 in abort () from /lib64/libc.so.6 > >>> #2 0x77b8f769 in zmq::zmq_abort > >>> (errmsg_=errmsg_@entry=0x77bc1eca "!more") at src/err.cpp:83 > >>> #3 0x77b8fccd in zmq::fq_t::recvpipe (this=this@entry > =0x60bdc0, > >>> msg_=msg_@entry=0x7490ce60, pipe_=pipe_@entry=0x7490cd08) at > >>> src/fq.cpp:117 > >>> #4 0x77ba3423 in zmq::router_t::xrecv (this=0x60b8d0, > >>> msg_=0x7490ce60) at src/router.cpp:301 > >>> #5 0x77ba878b in zmq::socket_base_t::recv > >>> (this=this@entry=0x60b8d0, msg_=msg_@entry=0x7490ce60, > >>> flags_=flags_@entry=0) at src/socket_base.cpp:910 > >>> #6 0x77ba1015 in forward (from_=from_@entry=0x60b8d0, > >>> to_=to_@entry=0x60c0b0, capture_=capture_@entry=0x0, msg_=...) at > >>> src/proxy.cpp:81 > >>> #7 0x77ba11e7 in zmq::proxy (frontend_=0x60b8d0, > >>> backend_=0x60c0b0, capture_=0x0, control_=0x0) at src/proxy.cpp:188 > >>> #8 0x00403fcf in broker_task (args=0x0) at > push_server.cpp:1348 > >>> #9 0x7791978f in s_thread_shim (args=0x60d590) at > >>> src/zthread.c:84 > >>> #10 0x776b6dc5 in start_thread () from /lib64/libpthread.so.0 > >>> #11 0x769b2ced in clone () from /lib64/libc.so.6 > >>> > >>> Any suggestion to fix this issue. > >>> > >>> Thanks > >>> (Ranjeet Kumar) > >>> > >>> > >>> > >>> ___ > >>> 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] Assertion failed: !more (src/fq.cpp:117)
Hi Martin, Yes, it is very often. I am having 100k clients connecting with my server. So in order to run the application i had commented the line from fq.cpp 117 zmq_assert (!more); And now it is working for me. Thanks (Ranjeet Kumar) On Fri, Sep 16, 2016 at 12:18 AM, Martin Hurton <hurt...@gmail.com> wrote: > Hi Ranjeet, > > Is this easy to reproduce? Thanks. > > - Martin > > On Sat, Sep 10, 2016 at 3:17 PM, Ranjeet Kumar <xs2ranj...@gmail.com> > wrote: > >> Hi, >> >> I am using zeromq 4.1.5 and czmq 3.0.2. I am using the server-client as >> router dealer. I am getting this *Assertion failed: !more >> (src/fq.cpp:117*) issue while 50k clients starts making connecting with >> the server. >> >> stack trace is below: >> Assertion failed: !more (src/fq.cpp:117) >> >> Program received signal SIGABRT, Aborted. >> [Switching to Thread 0x7490d700 (LWP 24885)] >> 0x768f15f7 in raise () from /lib64/libc.so.6 >> Missing separate debuginfos, use: debuginfo-install >> glibc-2.17-106.el7_2.6.x86_64 libgcc-4.8.5-4.el7.x86_64 >> libstdc++-4.8.5-4.el7.x86_64 >> (gdb) bt >> #0 0x768f15f7 in raise () from /lib64/libc.so.6 >> #1 0x768f2ce8 in abort () from /lib64/libc.so.6 >> #2 0x77b8f769 in zmq::zmq_abort >> (errmsg_=errmsg_@entry=0x77bc1eca >> "!more") at src/err.cpp:83 >> #3 0x77b8fccd in zmq::fq_t::recvpipe (this=this@entry=0x60bdc0, >> msg_=msg_@entry=0x7490ce60, pipe_=pipe_@entry=0x7490cd08) at >> src/fq.cpp:117 >> #4 0x77ba3423 in zmq::router_t::xrecv (this=0x60b8d0, >> msg_=0x7490ce60) at src/router.cpp:301 >> #5 0x77ba878b in zmq::socket_base_t::recv (this=this@entry=0x60b8d0, >> msg_=msg_@entry=0x7490ce60, flags_=flags_@entry=0) at >> src/socket_base.cpp:910 >> #6 0x77ba1015 in forward (from_=from_@entry=0x60b8d0, >> to_=to_@entry=0x60c0b0, capture_=capture_@entry=0x0, msg_=...) at >> src/proxy.cpp:81 >> #7 0x77ba11e7 in zmq::proxy (frontend_=0x60b8d0, >> backend_=0x60c0b0, capture_=0x0, control_=0x0) at src/proxy.cpp:188 >> #8 0x00403fcf in broker_task (args=0x0) at push_server.cpp:1348 >> #9 0x7791978f in s_thread_shim (args=0x60d590) at >> src/zthread.c:84 >> #10 0x776b6dc5 in start_thread () from /lib64/libpthread.so.0 >> #11 0x769b2ced in clone () from /lib64/libc.so.6 >> >> Any suggestion to fix this issue. >> >> Thanks >> (Ranjeet Kumar) >> >> >> >> ___ >> 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] Assertion failed: !more (src/fq.cpp:117)
Hi, I am using zeromq 4.1.5 and czmq 3.0.2. I am using the server-client as router dealer. I am getting this *Assertion failed: !more (src/fq.cpp:117*) issue while 50k clients starts making connecting with the server. stack trace is below: Assertion failed: !more (src/fq.cpp:117) Program received signal SIGABRT, Aborted. [Switching to Thread 0x7490d700 (LWP 24885)] 0x768f15f7 in raise () from /lib64/libc.so.6 Missing separate debuginfos, use: debuginfo-install glibc-2.17-106.el7_2.6.x86_64 libgcc-4.8.5-4.el7.x86_64 libstdc++-4.8.5-4.el7.x86_64 (gdb) bt #0 0x768f15f7 in raise () from /lib64/libc.so.6 #1 0x768f2ce8 in abort () from /lib64/libc.so.6 #2 0x77b8f769 in zmq::zmq_abort (errmsg_=errmsg_@entry=0x77bc1eca "!more") at src/err.cpp:83 #3 0x77b8fccd in zmq::fq_t::recvpipe (this=this@entry=0x60bdc0, msg_=msg_@entry=0x7490ce60, pipe_=pipe_@entry=0x7490cd08) at src/fq.cpp:117 #4 0x77ba3423 in zmq::router_t::xrecv (this=0x60b8d0, msg_=0x7490ce60) at src/router.cpp:301 #5 0x77ba878b in zmq::socket_base_t::recv (this=this@entry=0x60b8d0, msg_=msg_@entry=0x7490ce60, flags_=flags_@entry=0) at src/socket_base.cpp:910 #6 0x77ba1015 in forward (from_=from_@entry=0x60b8d0, to_=to_@entry=0x60c0b0, capture_=capture_@entry=0x0, msg_=...) at src/proxy.cpp:81 #7 0x77ba11e7 in zmq::proxy (frontend_=0x60b8d0, backend_=0x60c0b0, capture_=0x0, control_=0x0) at src/proxy.cpp:188 #8 0x00403fcf in broker_task (args=0x0) at push_server.cpp:1348 #9 0x7791978f in s_thread_shim (args=0x60d590) at src/zthread.c:84 #10 0x776b6dc5 in start_thread () from /lib64/libpthread.so.0 #11 0x769b2ced in clone () from /lib64/libc.so.6 Any suggestion to fix this issue. Thanks (Ranjeet Kumar) ___ zeromq-dev mailing list zeromq-dev@lists.zeromq.org http://lists.zeromq.org/mailman/listinfo/zeromq-dev
[zeromq-dev] Resource temporarily unavailable") at src/err.cpp:83
Hi, I am using Zeromq 4.1.5 and czmq 3.0.2 version. I am getting below exception every time when i am sending message to 100k zmq dealer clients. In my zmq server application I am having 2 threads. In main thread I am listening via zmq router socket using poll, getting HB. And from other thread I am getting message that i need to send 100k zmq dealer clients. But as soon as count reach near to 4-5k clients to send app get crashed. Please suggest I am in deep trouble. #0 0x768f15f7 in raise () from /lib64/libc.so.6 #1 0x768f2ce8 in abort () from /lib64/libc.so.6 #2 0x77b8f769 in zmq::zmq_abort (errmsg_=errmsg_@entry=0x76a3af60 "Resource temporarily unavailable") at src/err.cpp:83 #3 0x77ba72f9 in zmq::signaler_t::recv (this=this@entry=0x60b8a0) at src/signaler.cpp:282 #4 0x77b92f30 in zmq::mailbox_t::recv (this=this@entry=0x60b840, cmd_=cmd_@entry=0x7490cbc0, timeout_=timeout_@entry=0) at src/mailbox.cpp:87 #5 0x77ba8249 in zmq::socket_base_t::process_commands (this=this@entry=0x60b480, timeout_=timeout_@entry=0, throttle_=throttle_@entry=true) at src/socket_base.cpp:1044 #6 0x77ba856b in zmq::socket_base_t::send (this=this@entry=0x60b480, msg_=msg_@entry=0x7fffe800d714, flags_=flags_@entry=2) at src/socket_base.cpp:829 #7 0x77bbe09c in s_sendmsg (s_=s_@entry=0x60b480, msg_=msg_@entry=0x7fffe800d714, flags_=flags_@entry=2) at src/zmq.cpp:346 #8 0x77bbe41a in zmq_msg_send (msg_=msg_@entry=0x7fffe800d714, s_=s_@entry=0x60b480, flags_=flags_@entry=2) at src/zmq.cpp:590 #9 0x77bbe42e in zmq_sendmsg (s_=s_@entry=0x60b480, msg_=msg_@entry=0x7fffe800d714, flags_=flags_@entry=2) at src/zmq.cpp:355 #10 0x778ee693 in zframe_send (self_p=self_p@entry=0x7490cce8, dest=dest@entry=0x60b480, flags=) at src/zframe.c:158 #11 0x778f7e1f in zmsg_send (self_p=0x7490cdc0, dest=) at src/zmsg.c:140 Thanks Ranjeet ___ zeromq-dev mailing list zeromq-dev@lists.zeromq.org http://lists.zeromq.org/mailman/listinfo/zeromq-dev
[zeromq-dev] How to run Zeromq service as daemon process?
Hi, Is there any way to run the zeromq service in backend as a daemon service? Please suggest. Thanks (Ranjeet Kumar) ___ zeromq-dev mailing list zeromq-dev@lists.zeromq.org http://lists.zeromq.org/mailman/listinfo/zeromq-dev
[zeromq-dev] zframe_send crashes
Hi, Iam facing crash in zframe_send when I am sending the frames to client. Please suggest. stack trace is below: (gdb) bt #0 0x768c50d5 in raise () from /lib/x86_64-linux-gnu/libc.so.6 #1 0x768c883b in abort () from /lib/x86_64-linux-gnu/libc.so.6 #2 0x77b910f9 in zmq::zmq_abort (errmsg_=optimized out) at src/err.cpp:74 #3 0x77baaa1e in zmq::signaler_t::recv (this=0x64fd50) at src/signaler.cpp:272 #4 0x77b95174 in zmq::mailbox_t::recv (this=0x64fcf0, cmd_=0x7ffdbc58fbb0, timeout_=optimized out) at src/mailbox.cpp:77 #5 0x77bab882 in zmq::socket_base_t::process_commands (this=0x64f930, timeout_=optimized out, throttle_=true) at src/socket_base.cpp:1001 #6 0x77bab92b in zmq::socket_base_t::send (this=0x64f930, msg_=0x7ffdbc58fc60, flags_=2) at src/socket_base.cpp:786 #7 0x77bc2efa in s_sendmsg (s_=0x64f930, msg_=0x7ffdbc58fc60, flags_=2) at src/zmq.cpp:336 #8 0x778ed533 in zframe_send (self_p=0x7ffdbc58fd10, dest=optimized out, flags=optimized out) at src/zframe.c:152 Thanks (Ranjeet Kumar) (+91) 9718-727-616 (+91) 8287-703-933 ___ zeromq-dev mailing list zeromq-dev@lists.zeromq.org http://lists.zeromq.org/mailman/listinfo/zeromq-dev
[zeromq-dev] Zeromq on IBM Mainframe server ?
Hi All, Please guide how can I compile the ZeroMQ on IBM Mainframe Server. Thanks and with regards Ranjeet ___ zeromq-dev mailing list zeromq-dev@lists.zeromq.org http://lists.zeromq.org/mailman/listinfo/zeromq-dev
Re: [zeromq-dev] Zeromq on IBM Mainframe server ?
Thanks M I am a newbie. And I have to compile the ZMQ on OS400/IBM iseries V6.1 / V6R1 server. Is there any different step need to follow to compile on this server. Thanks Ranjeet On Tue, Sep 2, 2014 at 9:39 AM, A. Mark gougol...@gmail.com wrote: Hello, I have compiled and used ZMQ on AIX6.1 64 bit OS if that helps. The difficulty may be in setting up the build system, after that it builds without issues. If you let us know what you are having trouble with someone may be able to help you. M. On Mon, Sep 1, 2014 at 9:03 PM, Ranjeet Kumar xs2ranj...@gmail.com wrote: Hi All, Please guide how can I compile the ZeroMQ on IBM Mainframe Server. Thanks and with regards Ranjeet ___ 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] ZeroMQ : Issue with PUB-SUB
Hi All, Currently we are using PUB-SUB and PUSH-PULL . Our server is on Linux ( C/C++ ) and clients are on JAVA Android. Server Version : ZeroMq 3.3.0 Client Version : JeroMq 3.2.2 *Design we are using : * Client queries server using PUSH. Server receives this query on PULL. Now server responds to the client via PUB. On the other hand clients are waiting with SUB ids. *Issues : * 1. After sometime some of the subscribers are NOT receiving the message, when client is re-started , they start getting the message . 2. After some time , we have observed , subscribers start receiving the old message multiple times , where as server has published different message . Both the issues are frequent , please let us know How to fix the issue . Thanks And With Regards Ranjeet Kumar ___ zeromq-dev mailing list zeromq-dev@lists.zeromq.org http://lists.zeromq.org/mailman/listinfo/zeromq-dev
[zeromq-dev] Unable to use ZeroMQ 3.2 in my Android application
Dear Sir I am trying to use the ZeroMQ-Jzmq in my Android project. I had followed the all steps suggested in http://www.zeromq.org/build:android. I had successfully created the zmq.jar and libjzmq.so on the fedora linux os. But when I use these in my Android application I am getting following error. 05-15 12:26:15.034: I/dalvikvm(781): Could not find method org.zeromq.ZMQ.getVersionString, referenced from method com.example.zmq2test.MainActivity.onCreate 05-15 12:26:15.054: W/dalvikvm(781): VFY: unable to resolve static method 3570: Lorg/zeromq/ZMQ;.getVersionString ()Ljava/lang/String; 05-15 12:26:15.054: D/dalvikvm(781): VFY: replacing opcode 0x71 at 0x000a 05-15 12:26:15.114: D/AndroidRuntime(781): Shutting down VM 05-15 12:26:15.124: W/dalvikvm(781): threadid=1: thread exiting with uncaught exception (group=0x40a71930) 05-15 12:26:15.155: E/AndroidRuntime(781): FATAL EXCEPTION: main 05-15 12:26:15.155: E/AndroidRuntime(781): java.lang.NoClassDefFoundError: org.zeromq.ZMQ 05-15 12:26:15.155: E/AndroidRuntime(781): at com.example.zmq2test.MainActivity.onCreate(MainActivity.java:15) 05-15 12:26:15.155: E/AndroidRuntime(781): at android.app.Activity.performCreate(Activity.java:5104) 05-15 12:26:15.155: E/AndroidRuntime(781): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1080) 05-15 12:26:15.155: E/AndroidRuntime(781): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2144) 05-15 12:26:15.155: E/AndroidRuntime(781): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2230) 05-15 12:26:15.155: E/AndroidRuntime(781): at android.app.ActivityThread.access$600(ActivityThread.java:141) 05-15 12:26:15.155: E/AndroidRuntime(781): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1234) 05-15 12:26:15.155: E/AndroidRuntime(781): at android.os.Handler.dispatchMessage(Handler.java:99) 05-15 12:26:15.155: E/AndroidRuntime(781): at android.os.Looper.loop(Looper.java:137) 05-15 12:26:15.155: E/AndroidRuntime(781): at android.app.ActivityThread.main(ActivityThread.java:5041) 05-15 12:26:15.155: E/AndroidRuntime(781): at java.lang.reflect.Method.invokeNative(Native Method) 05-15 12:26:15.155: E/AndroidRuntime(781): at java.lang.reflect.Method.invoke(Method.java:511) 05-15 12:26:15.155: E/AndroidRuntime(781): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793) 05-15 12:26:15.155: E/AndroidRuntime(781): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:560) 05-15 12:26:15.155: E/AndroidRuntime(781): at dalvik.system.NativeStart.main(Native Method) Please help. I did lot of research on google from last 10 days. Thanks Ranjeet Kumar ___ zeromq-dev mailing list zeromq-dev@lists.zeromq.org http://lists.zeromq.org/mailman/listinfo/zeromq-dev
Re: [zeromq-dev] Unable to use ZeroMQ 3.2 in my Android application
Hi Peter, Thanks for your reply. But does it mean that we can't use ZeroMQ/JZMQ in Android? As per your suggestion, I also used the JeroMQ from https://github.com/zeromq/jeromq i used the source code of this JeroMQ in my Android app. When I compile my code it get successfully compiled. I am able to get the ZMQ version. But when i tried to run this part of code ZMQ.Socket socket = context.socket(ZMQ.REQ); socket.connect (tcp://localhost:); I am getting a runtime exception. On debugging I found that on the following line of code JeroMq throws exception. SocketBase.java public boolean connect (String addr_) {... paddr.resolved().resolve ( address, options.ipv4only != 0 ? true : false); ... } Please suggest what I can do to resolve the issue. Thanks Ranjeet Kumar On Wed, May 15, 2013 at 1:02 PM, Pieter Hintjens p...@imatix.com wrote: Hi Ranjeet, You may find it easier to use JeroMQ, which is pure Java ZeroMQ stack and fully compatible. -Pieter On Wed, May 15, 2013 at 9:14 AM, Ranjeet Kumar xs2ranj...@gmail.com wrote: Dear Sir I am trying to use the ZeroMQ-Jzmq in my Android project. I had followed the all steps suggested in http://www.zeromq.org/build:android. I had successfully created the zmq.jar and libjzmq.so on the fedora linux os. But when I use these in my Android application I am getting following error. 05-15 12:26:15.034: I/dalvikvm(781): Could not find method org.zeromq.ZMQ.getVersionString, referenced from method com.example.zmq2test.MainActivity.onCreate 05-15 12:26:15.054: W/dalvikvm(781): VFY: unable to resolve static method 3570: Lorg/zeromq/ZMQ;.getVersionString ()Ljava/lang/String; 05-15 12:26:15.054: D/dalvikvm(781): VFY: replacing opcode 0x71 at 0x000a 05-15 12:26:15.114: D/AndroidRuntime(781): Shutting down VM 05-15 12:26:15.124: W/dalvikvm(781): threadid=1: thread exiting with uncaught exception (group=0x40a71930) 05-15 12:26:15.155: E/AndroidRuntime(781): FATAL EXCEPTION: main 05-15 12:26:15.155: E/AndroidRuntime(781): java.lang.NoClassDefFoundError: org.zeromq.ZMQ 05-15 12:26:15.155: E/AndroidRuntime(781): at com.example.zmq2test.MainActivity.onCreate(MainActivity.java:15) 05-15 12:26:15.155: E/AndroidRuntime(781): at android.app.Activity.performCreate(Activity.java:5104) 05-15 12:26:15.155: E/AndroidRuntime(781): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1080) 05-15 12:26:15.155: E/AndroidRuntime(781): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2144) 05-15 12:26:15.155: E/AndroidRuntime(781): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2230) 05-15 12:26:15.155: E/AndroidRuntime(781): at android.app.ActivityThread.access$600(ActivityThread.java:141) 05-15 12:26:15.155: E/AndroidRuntime(781): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1234) 05-15 12:26:15.155: E/AndroidRuntime(781): at android.os.Handler.dispatchMessage(Handler.java:99) 05-15 12:26:15.155: E/AndroidRuntime(781): at android.os.Looper.loop(Looper.java:137) 05-15 12:26:15.155: E/AndroidRuntime(781): at android.app.ActivityThread.main(ActivityThread.java:5041) 05-15 12:26:15.155: E/AndroidRuntime(781): at java.lang.reflect.Method.invokeNative(Native Method) 05-15 12:26:15.155: E/AndroidRuntime(781): at java.lang.reflect.Method.invoke(Method.java:511) 05-15 12:26:15.155: E/AndroidRuntime(781): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793) 05-15 12:26:15.155: E/AndroidRuntime(781): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:560) 05-15 12:26:15.155: E/AndroidRuntime(781): at dalvik.system.NativeStart.main(Native Method) Please help. I did lot of research on google from last 10 days. Thanks Ranjeet Kumar ___ 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] Unable to use ZeroMQ 3.2 in my Android application
Dear Sir, I did compile the JeroMQ with Android. I changed the localhost to my server's IP address. I also make changes in AndroidManifest.xml and allowed the internet access permission. android:theme=@style/AppTheme android:permission=android.permission.INTERNET But still I am getting the exception and app is crashing. PFB the details. zmq.Signaler.java public void send () { ... nbytes = w.write(dummy); - throws android.os.NetworkOnMainThreadException } 05-16 05:37:15.874: I/System.out(883): android.os.NetworkOnMainThreadException 05-16 05:37:36.003: W/System.err(883): android.os.NetworkOnMainThreadException 05-16 05:37:36.023: W/System.err(883): at android.os.StrictMode$AndroidBlockGuardPolicy.onNetwork(StrictMode.java:1117) 05-16 05:37:36.023: W/System.err(883): at libcore.io.BlockGuardOs.sendto(BlockGuardOs.java:168) 05-16 05:37:36.033: W/System.err(883): at libcore.io.IoBridge.sendto(IoBridge.java:487) 05-16 05:37:36.043: W/System.err(883): at java.nio.SocketChannelImpl.writeImpl(SocketChannelImpl.java:378) 05-16 05:37:36.043: W/System.err(883): at java.nio.SocketChannelImpl.write(SocketChannelImpl.java:336) 05-16 05:37:36.053: W/System.err(883): at java.nio.PipeImpl$PipeSinkChannel.write(PipeImpl.java:114) 05-16 05:37:36.063: W/System.err(883): at zmq.Signaler.send(Signaler.java:106) 05-16 05:37:36.063: W/System.err(883): at zmq.Mailbox.send(Mailbox.java:90) 05-16 05:37:36.073: W/System.err(883): at zmq.Ctx.send_command(Ctx.java:351) 05-16 05:37:36.073: W/System.err(883): at zmq.ZObject.send_command(ZObject.java:364) 05-16 05:37:36.083: W/System.err(883): at zmq.ZObject.send_plug(ZObject.java:172) 05-16 05:37:36.093: W/System.err(883): at zmq.ZObject.send_plug(ZObject.java:163) 05-16 05:37:36.093: W/System.err(883): at zmq.Own.launch_child(Own.java:125) 05-16 05:37:36.103: W/System.err(883): at zmq.SocketBase.add_endpoint(SocketBase.java:535) 05-16 05:37:36.113: W/System.err(883): at zmq.SocketBase.connect(SocketBase.java:526) 05-16 05:37:36.124: W/System.err(883): at org.jeromq.ZMQ$Socket.connect(ZMQ.java:917) 05-16 05:37:36.124: W/System.err(883): at com.example.jmqtest.MainActivity.onCreate(MainActivity.java:25) 05-16 05:37:36.133: W/System.err(883): at android.app.Activity.performCreate(Activity.java:5104) 05-16 05:37:36.133: W/System.err(883): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1080) 05-16 05:37:36.146: W/System.err(883): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2144) 05-16 05:37:36.153: W/System.err(883): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2230) 05-16 05:37:36.163: W/System.err(883): at android.app.ActivityThread.access$600(ActivityThread.java:141) 05-16 05:37:36.163: W/System.err(883): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1234) 05-16 05:37:36.173: W/System.err(883): at android.os.Handler.dispatchMessage(Handler.java:99) 05-16 05:37:36.173: W/System.err(883): at android.os.Looper.loop(Looper.java:137) 05-16 05:37:36.183: W/System.err(883): at android.app.ActivityThread.main(ActivityThread.java:5041) 05-16 05:37:36.193: W/System.err(883): at java.lang.reflect.Method.invokeNative(Native Method) 05-16 05:37:36.193: W/System.err(883): at java.lang.reflect.Method.invoke(Method.java:511) 05-16 05:37:36.203: W/System.err(883): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793) 05-16 05:37:36.213: W/System.err(883): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:560) 05-16 05:37:36.213: W/System.err(883): at dalvik.system.NativeStart.main(Native Method) Thanks and with regards Ranjeet Kumar On Wed, May 15, 2013 at 6:34 PM, Pieter Hintjens p...@imatix.com wrote: On Wed, May 15, 2013 at 11:11 AM, Ranjeet Kumar xs2ranj...@gmail.com wrote: Thanks for your reply. But does it mean that we can't use ZeroMQ/JZMQ in Android? You can use it, and many people do, but building it has always been tricky because the toolchain is complex and changes over time. when i tried to run this part of code ZMQ.Socket socket = context.socket(ZMQ.REQ); socket.connect (tcp://localhost:); I am getting a runtime exception. Sounds like localhost isn't resolving; try 127.0.0.1. -Pieter ___ 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