Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#3 Problem with encryption

open
nobody
None
5
2011-06-27
2011-06-27
Francesco Dalan
No

Using simple XOR encryption, the server reports this error "Received invalid packet type/version from client - possibly due to client using wrong password or crypto algorithm?".

This is due to the encryption_method variable in NagiosAppender class: i.e. if I use the configuration file to sets the encryption_method parameter, when the send_nsca(String, int) method have been invoked, it use the global encryption_method variable, but nobody's sets it.

To resolve it,
- adds the getEncryption_method getter in Nsca class
- in setConfigFile(String) method, after nagiosClient.setConfigFile(value), adds encryption_method = nagiosClient.getEncryption_method()

I attach a zip file with the java source modified surround by mbm099 comments

Discussion

  • Source file mdified

     
    Attachments
  • There is a simpler workaround for the bug: Ditch the ConfigFile parameter from the appender and add this line:

    <param name="EncryptionMethod" value="1" />