Some suggestions:
1 - Use port 9300. [9300-9400] is for node-to-node communication, [9200-9300] is for HTTP traffic.
2 - Ensure the version of the Java API you are using matches the version of elasticsearch running on the server.
3 - Ensure that the name of your cluster is foxzen
(check the elasticsearch.yml on the server).
4 - Remove put("node.name", "yu")
, you aren't joining the cluster as a node since you are using the TransportClient
, and even if you were it appears your server node is named yu
so you would want a different node name in any case.