Hazelcast REST API

Azimuts picture Azimuts · May 6, 2016 · Viewed 7.2k times · Source

I don't get to work REST API of Hazelcast, receiving always :

  1. at client side : ERR_EMPTY_RESPONSE via Browser or java.net.SocketException: Unexpected end of file from server via a Java Test Program.
  2. at hazelcast node:

    INFO: [myIP]:5701 [dev] [3.6] Established socket connection between /127.0.0.1:5701 and /127.0.0.1:62816
    06-may-2016 13:04:20 com.hazelcast.nio.tcp.TcpIpConnection
    INFO: [myIP]:5701 [dev] [3.6] Connection [/127.0.0.1:62816] lost. Reason: Socket explicitly closed
    

The used code is just hazaelcast multimap sample: and the REST API uri http://localhost:5701/hazelcast/rest/maps/my-distributed-map/key

Answer

magulla picture magulla · Dec 6, 2016

i think that REST interface was disabled by default until certain version. add jvm argument for your application.

-Dhazelcast.rest.enabled=true