2017-06-22 4 views
0

Je suis en train d'utiliser YCSb pour charger des données dans Elastic Search, mais je suis toujours une erreur NoNodeAvailableException[None of the configured nodes are available: [{#transport#-1}{gdVShcjUToSDe3eJkHJNxw}{192.168.3.87}{192.168.3.87:9300}]]L'utilisation YCSb sur la recherche élastique

Voici ma configuration pour elasticsearch nœud.

cluster.name: my-application 
node.name: reconf-6 
network.host: 192.168.3.87 
http.port: 9200 
transport.tcp.port: 9300 
transport.host: 0.0.0.0 
discovery.zen.ping.unicast.hosts: ["elasticsearch-1"] 
path.data: data_mount/es 
path.logs: data_mount/es 

j'ai commencé à 10 nœuds comme celui-ci et par curl -XGET 'http://elasticsearch-1:9200/_cluster/state?pretty' je peux voir 10 nœuds sont dans le cluster. Puis j'ai essayé d'exécuter YCSB en mode distant. Ensuite, j'ai essayé d'exécuter YCSB. Ensuite, il a signalé une exception:

Exception in thread "Thread-3" NoNodeAvailableException[None of the configured nodes are available: [{#transport#-1}{gdVShcjUToSDe3eJkHJNxw}{192.168.3.87}{192.168.3.87:9300}]] 
     at org.elasticsearch.client.transport.TransportClientNodesService.ensureNodesAreAvailable(TransportClientNodesService.java:344) 
     at org.elasticsearch.client.transport.TransportClientNodesService.execute(TransportClientNodesService.java:242) 
     at org.elasticsearch.client.transport.TransportProxyClient.execute(TransportProxyClient.java:59) 
     at org.elasticsearch.client.transport.TransportClient.doExecute(TransportClient.java:356) 
     at org.elasticsearch.client.support.AbstractClient.execute(AbstractClient.java:403) 
     at org.elasticsearch.client.support.AbstractClient.execute(AbstractClient.java:392) 
     at org.elasticsearch.client.support.AbstractClient$IndicesAdmin.execute(AbstractClient.java:1220) 
     at org.elasticsearch.client.support.AbstractClient$IndicesAdmin.exists(AbstractClient.java:1242) 
     at com.yahoo.ycsb.db.elasticsearch5.ElasticsearchClient.init(ElasticsearchClient.java:142) 
     at com.yahoo.ycsb.DBWrapper.init(DBWrapper.java:85) 
     at com.yahoo.ycsb.ClientThread.run(Client.java:415) 
     at java.lang.Thread.run(Thread.java:748) 

Une partie du code de client à partir de YCSb est la suivante:

if (remoteMode) { 
    settings.put("client.transport.sniff", true) 
     .put("client.transport.ignore_cluster_name", false) 
     .put("client.transport.ping_timeout", "30s") 
     .put("client.transport.nodes_sampler_interval", "30s"); 
    // Default it to localhost:9300 
    String[] nodeList = props.getProperty("es.hosts.list", DEFAULT_REMOTE_HOST).split(","); 
    System.out.println("Elasticsearch Remote Hosts = " + props.getProperty("es.hosts.list", DEFAULT_REMOTE_HOST)); 
    TransportClient tClient = new PreBuiltTransportClient(settings.build()); 
    for (String h : nodeList) { 
    String[] nodes = h.split(":"); 
    try { 
     tClient.addTransportAddress(new InetSocketTransportAddress(
      InetAddress.getByName(nodes[0]), 
      Integer.parseInt(nodes[1]) 
    )); 
    } catch (NumberFormatException e) { 
     throw new IllegalArgumentException("Unable to parse port number.", e); 
    } catch (UnknownHostException e) { 
     throw new IllegalArgumentException("Unable to Identify host.", e); 
    } 
    } 
    client = tClient; 
} 

Répondre

0

Avez-vous essayé de commenter transport.host dans votre fichier de configuration pour ES? Il lie la couche de transport à l'hôte local et vous avez déjà spécifié l'adresse IP de la machine via network.host. (vous devez redémarrer votre noeud)

Quelle version de ES testez-vous? Je vous ai vu laissé un commentaire sur leur github aussi, donc vous savez déjà que cela ne fonctionnera pas avec ES 5.x.x. La raison en est que ES 5.x.x refuse de se connecter au pilote pour la version précédente.

J'ai réussi à le faire fonctionner avec le version of risdenk.