Thanks Michel,

Deleting the disconnect line actually solved both issue!
Gonzalo Vásquez Sáez
Gerente Investigación y Desarrollo (R&D)
Altiuz Soluciones Tecnológicas de Negocios Ltda.
Av. Nueva Tajamar 555 Of. 802, Las Condes - CP 7550099
+56 2 335 2461
[email protected]
http://www.altiuz.cl
http://www.altiuzreports.com
  


El 26-09-2013, a las 16:10, Michel Pelletier <[email protected]> 
escribió:

> You don't need to call disconnect after you close a socket.  close destroys 
> the socket object and from that point forward it is no longer valid.
> 
> Broken pipe is a standard socket error and not related to zeromq.  It 
> typically means the process on the other side and the error is raised to 
> inform you of that.
> 
> -Michel 
> 
> 
> On Thu, Sep 26, 2013 at 11:44 AM, Gonzalo Vasquez <[email protected]> wrote:
> Hi everybody!
> 
> Testing our implementation under extended periods of time of constant load 
> exposes several problems (exceptions) using the JeroMQ java implementation.
> 
> Right now I'm facing these two issues:
> 
> java.lang.NullPointerException
>       at zmq.YQueue.front_pos(YQueue.java:87)
>       at zmq.YPipe.check_read(YPipe.java:118)
>       at zmq.YPipe.read(YPipe.java:150)
>       at zmq.Mailbox.recv(Mailbox.java:99)
>       at zmq.SocketBase.process_commands(SocketBase.java:794)
>       at zmq.SocketBase.term_endpoint(SocketBase.java:542)
>       at org.zeromq.ZMQ$Socket.disconnect(ZMQ.java:951)
>       at 
> cl.altiuz.reports.zmq.SocketFactory.destroyObject(SocketFactory.java:57)
>       at 
> org.apache.commons.pool.impl.StackObjectPool.invalidateObject(StackObjectPool.java:222)
>       at cl.altiuz.reports.zmq.ZmqConnector.getByte(ZmqConnector.java:601)
>       at cl.altiuz.reports.zmq.ZmqConnector.getBean(ZmqConnector.java:408)
>       at cl.altiuz.reports.zmq.ZmqConnector.getBeans(ZmqConnector.java:488)
>       at cl.altiuz.reports.zmq.ZmqConnector.getDocument(ZmqConnector.java:785)
>       at cl.altiuz.reports.zmq.test.TestZmq.run(TestZmq.java:57)
>       at cl.altiuz.reports.zmq.test.TestJunit3.testZmq(TestJunit3.java:18)
> 
> From:
> 
>     public void destroyObject(final Object obj) throws Exception {
>         if (obj instanceof Socket) {
>             Socket socket = (Socket) obj;
>             socket.setLinger(0);
>             socket.close();
>             socket.disconnect(ENDPOINT);
>             socket = null;
>         }
>     }
> 
> 
> And:
> 
> java.io.IOException: Broken pipe
>       at zmq.Signaler.send (line:108)
>       at zmq.Mailbox.send (line:90)
>       at zmq.Ctx.send_command (line:350)
>       at zmq.ZObject.send_command (line:364)
>       at zmq.ZObject.send_plug (line:172)
>       at zmq.ZObject.send_plug (line:163)
>       at zmq.Own.launch_child (line:125)
>       at zmq.SocketBase.add_endpoint (line:525)
>       at zmq.SocketBase.connect (line:516)
>       at org.zeromq.ZMQ$Socket.connect (line:941)
>       at cl.altiuz.reports.zmq.SocketFactory.makeObject (line:67)
>       at org.apache.commons.pool.impl.StackObjectPool.borrowObject (line:149)
>       at cl.altiuz.reports.zmq.ZmqConnector.getByte (line:567)
>       at cl.altiuz.reports.zmq.ZmqConnector.getBean (line:408)
>       at cl.altiuz.reports.zmq.ZmqConnector.getBeans (line:488)
>       at cl.altiuz.reports.zmq.ZmqConnector.getDocument (line:785)
>       at cl.altiuz.reports.zmq.test.TestZmq.run (line:57)
> 
> Referenced from:
> 
> public Object makeObject() throws Exception {
>         Socket socket = ctx.socket(ZMQ.REQ);
>         socket.connect(ENDPOINT);
>         return socket;
> }
> 
> This is running using jeromq-0.3.0-20130721.175323-20.jar
> 
> What else should I provide to ease solving these issues?
> 
> Regards,
> Gonzalo Vásquez Sáez
> Gerente Investigación y Desarrollo (R&D)
> Altiuz Soluciones Tecnológicas de Negocios Ltda.
> Av. Nueva Tajamar 555 Of. 802, Las Condes - CP 7550099
> +56 2 335 2461
> [email protected]
> http://www.altiuz.cl
> http://www.altiuzreports.com
>   
> 
> 
> 
> _______________________________________________
> zeromq-dev mailing list
> [email protected]
> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
> 
> 
> _______________________________________________
> zeromq-dev mailing list
> [email protected]
> http://lists.zeromq.org/mailman/listinfo/zeromq-dev

_______________________________________________
zeromq-dev mailing list
[email protected]
http://lists.zeromq.org/mailman/listinfo/zeromq-dev

Reply via email to