Search code examples
ignitebeta

Apache Ignite 3 Beta 1 examples fail in ClientMessageDecoder.readMagic() checking for the MAGIC_BYTES


I'm running a new instance of the Apache Ignite 3 beta on Windows and am hoping someone might recognize the error reading the MAGIC_BYTES I'm seeing trying to run the examples.

The cluster starts successfully and I can connect via the CLI; e.g.: 'node status' shows [name: defaultNode, state: started]

However, when I attempt to run any of the examples, such as SqlJdbcExample, it fails in ClientMessageDecoder.readMagic(). In there it is attempting to read the 4 MAGIC_BYTES (representing the 4 ASCII characters 'INGI').

What I see instead are the bytes 0x01, 0x00, 0x03, 0x00

This ultimately results in an IgniteException:

IGN-CMN-65535 TraceId:xxxx Invalid magic header in thin client connection. Expected 'IGNI', but was '▯▯'.

(Note: in debug, if I read more bytes out of the buffer I can see those 4 bytes are followed by an ASCII newline character (0x12) then the ASCII 'defaultNode'.)

In the SqlJdbcExample when it is initializing the JDBC connection, I can see that is has called socket.send() with those MAGIC_BYTES IN TcpClientChannel.handshakeReq().

I am running the examples with no change to any configuration files and have set up the environment as per the documentation.

Set up Apache Ignite 3 beta and ran samples. They failed with

IgniteException: IGN-CMN-65535 TraceId:xxxx Invalid magic header in thin client connection. Expected 'IGNI', but was '▯▯'.

Verified as best I can that everything is configured correctly, but can't determine why I'm not picking up these bytes.


Solution

  • Ignite examples use port 10800 by default. Looks like something else is using that port on your machine, so Ignite server is on a different port.

    Look into the log file in ignite3-db-3.0.0-beta1 directory (ignite3db-0.log file name), and search for Thin client protocol started successfully[port=10800] line. The port is likely different. Copy the port number and update the connection string in the example accordingly