RE: [jade-develop] NotYetConnectedException

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Quoting Caire Giovanni <giovanni.caire@xxxxxxxxxxxxxxxx>:

> This is quite surprising and honestly speaking I've never seen this
> exception. Can you provide more details about your environment (JVM, JADE or
> JADE-LEAP, containers and hosts, split execution?...) and the situation where
> it happens?

I am running JADE-LEAP 3.5 on JamVM 1.4.5 + Classpath 0.95 + Linux 2.6.21
 + Xscale cpu (an ARM-architecture cpu) on the hosts which encounter
the NotYetConnectedException. These hosts are trying to send messages
to PC's which are running JADE-LEAP 3.5 + Sun JVM 1.5.0 + Linux 2.6.something
 + i686 cpu. On every host there is an ordinary container (no split
containers).

The exceptions seem to be thrown only after an ARM host has
been running for a while (maybe 1 hour to several hours).
Restarting the JVM seems to make the problem go away.
I say "seem" because it's not clear to me what are the
circumstances in which the exceptions are thrown.

Probing into the Classpath source code, it appears that the
NotYetConnectedException originates from gnu.java.nio.SocketChannelImpl.
(The exception is never thrown from JADE, to the best of my
knowledge; grepping for NotYetConnectedException in the JADE
source code turns up nothing.) In SocketChannelImpl,
the exception is thrown if the method isConnected returns false.
Here is the definition of isConnected:

  public boolean isConnected()
  {
    // Wait until finishConnect is called before transitioning to
    // connected.
    if (connectionPending)
      return false;
    try
      {
        InetSocketAddress remote = channel.getPeerAddress();
        return remote != null;
      }
    catch (IOException ioe)
      {
        ioe.printStackTrace(System.out);
        return false;
      }
  }

I do not know whether the false return value comes from
the "return false" or "return remote != null".
I guess I'll keep digging. If anyone has any comments
about this I would appreciate it a lot.

All the best & thanks for your help,

Robert Dodier


> -----Original Message-----
> From: jade-develop-bounces@xxxxxxxxxxxxxxxx
> [mailto:jade-develop-bounces@xxxxxxxxxxxxxxxx] On Behalf Of
> robert@xxxxxxxxxxxxxx
> Sent: venerdì 14 settembre 2007 18.43
> To: jade-develop@xxxxxxxxxxxxxxxx
> Subject: [jade-develop] NotYetConnectedException
>
> Hello,
>
> I have an agent which is supposed to send messages to other
> agents, but sometimes I get this message:
>
> WARNING: MessageManager cannot deliver message (INFORM sender: ....
> java.nio.channels.NotYetConnectedException
>
> I found the place in MessageManager.java whence this originates,
> but I still don't understand what is going on.
> (1) What does "NotYetConnectedException" mean anyway?
> (2) Is there a way for the sender to be notified that the
> attempt failed? The above warning doesn't seem to cause
> an exception to be thrown back to the sender. (But I could
> easily be missing something here.)
>
> I searched through the mailing list archive but I wasn't
> able to find anything about this problem.
> Thanks for any information.
>
> Robert Dodier




[Index of Archives]     [Linux Kernel]     [Linux Cryptography]     [Fedora]     [Fedora Directory]     [Red Hat Development]

  Powered by Linux