Hello,
Sorry, I should have presented the stack trace before. :)
here it is:
SEVERE: Can't read initialisation vector
com.googlecode.jsendnsca.core.NagiosException: Can't read
initialisation vector
at
com.googlecode.jsendnsca.core.NagiosPassiveCheckSender.readInitializationVector
(NagiosPassiveCheckSender.java:132)
at com.googlecode.jsendnsca.core.NagiosPassiveCheckSender.send
(NagiosPassiveCheckSender.java:85)
at com.sicpa.tt009.mibmonitor.model.MIBMonitor$1.run(MIBMonitor.java:
76)
at java.lang.Thread.run(Thread.java:619)
Caused by: java.io.EOFException
at java.io.DataInputStream.readFully(DataInputStream.java:180)
at
com.googlecode.jsendnsca.core.NagiosPassiveCheckSender.readInitializationVector
(NagiosPassiveCheckSender.java:127)
... 3 more
I did try with option = 0 (no encryption) and with option = 1 (XOR
encryption) but the results are the same...
Thanks !
Christian.
On 16 mar, 13:08, Raj Patel <
rajneeshpa...@gmail.com> wrote:
> Very strange,
>
> The NagiosException is only designed to be raised in this circumstance as
> can be seen in the code snippet below
>
> private byte[] readInitializationVector(DataInputStream inputStream) throws
> NagiosException, SocketTimeoutException {
> final byte[] initVector = new byte[INITIALISATION_VECTOR_SIZE];
> try {
> inputStream.readFully(initVector, 0,
> INITIALISATION_VECTOR_SIZE);
> return initVector;
> } catch (SocketTimeoutException ste) {
> throw ste;
> } catch (*Exception e*) {
> throw new NagiosException("Can't read initialisation vector", *e
> *);
> }
> }
>
> In your application, can you see whats being reported in the exception e
> highlighted above. It should yield a stack trace such as below
>
> com.googlecode.jsendnsca.core.NagiosException: Can't read initialisation
> vector
> at
> com.googlecode.jsendnsca.core.NagiosPassiveCheckSender.readInitializationVector(NagiosPassiveCheckSender.java:132)
> at
> com.googlecode.jsendnsca.core.NagiosPassiveCheckSender.send(NagiosPassiveCheckSender.java:85)
> at ......
> *Caused by: java.io.EOFException*
> at java.io.DataInputStream.readFully(DataInputStream.java:178)
> at
> com.googlecode.jsendnsca.core.NagiosPassiveCheckSender.readInitializationVector(NagiosPassiveCheckSender.java:127)
> ... 26 more
>
> With the root cause being EOFException indicating there was not 128 bytes of
> data available to fully read the init vector (the binary data served on
> connection by NSCA)
>
> One thing to check is what encryption mode you have set up on NSCA. The
> JSend NSCA api only works with no encryption or 'XOR encryption'
>
> If the root cause exception is not the EOFException above, can you let me
> know as I may not be fully handling all cases.
>
> Regards
>
> Raj
>
> 2009/3/16 Christian <
chris....@gmail.com>