impl.serverclient:在服务器列表中找不到可用的服务器:

rqqzpn5f  于 2021-06-02  发布在  Hadoop
关注(0)|答案(1)|浏览(281)

我试图查询测试pc服务器[jarvis](在带有ubuntu服务器14.04.3的pc上使用Apache1.7.0 accumulation-Zookeper3.4.6-Hadoop2.7.1)和windows客户端pc[CasaPC](在eclipse中制作,我使用maven库accumulation-1.7.0和hadoop-core-1.2.1执行了一个项目)是否在同一个局域网上。当我尝试用以下代码询问pc服务器时,pc客户端上的java run eclipse会返回以下列表:
15/11/30 07:14:31 warn client.clientconfiguration:在默认路径中找不到client.conf。使用默认的客户端配置值。15/11/30 07:14:32信息zookeeper.zookeeper:client environment:zookeeper.version=3.4.6-1569965,创建于2014年2月20日09:09 gmt 15/11/30 07:14:32 info zookeeper.zookeeper:client environment:host.name=casa-pc 15/11/30 07:14:32信息zookeeper.zookeeper:client environment:java.version=1.8.0_60 15/11/30 07:14:32信息zookeeper.zookeeper:client environment:java.vendor=oracle 公司15/11/30 07:14:32信息zookeeper.zookeeper:客户恩vironment:java.home=... 15/11/30 07:14:32信息zookeeper.zookeeper:client environment:java.class.path=... 15/11/30 07:14:32信息zookeeper.zookeeper:client environment:java.library.path=...;;. 15/11/30 07:14:32信息zookeeper.zookeeper:client environment:java.io.tmpdir=... 15/11/30 07:14:32信息zookeeper.zookeeper:client environment:java.compiler= 15/11/30 07:14:32信息zookeeper.zookeeper:client environment:os.name=windows 7 15/11/30 07:14:32信息zookeeper.zookeeper:client environment:os.arch=x86 15/11/30 07:14:32信息zookeeper.zookeeper:client environment:os.version=6.1 15/11/30 07:14:32信息zookeeper.zookeeper:客户端environment:user.name=... 15/11/30 07:14:32信息zookeeper.zookeeper:client environment:user.home=... 15/11/30 07:14:32信息zookeeper.zookeeper:client environment:user.dir=... 15/11/30 07:14:32 info zookeeper.zookeeper:启动客户端连接,connectstring=jarvis sessiontimeout=30000 watcher=org.apache.accumulo.fate.zookeeper。zoosession$zoowatcher@1ccaa 15/11/30 07:14:38 info zookeeper.clientcnxn:打开到服务器jarvis的套接字连接/192.168.1.104:2181。不会尝试使用sasl进行身份验证(未知错误)15/11/30 07:14:38 info zookeeper.clientcnxn:已建立到jarvis/192.168.1.104:2181的套接字连接,启动会话15/11/30 07:14:38 info zookeeper.clientcnxn:在服务器jarvis/192.168.1.104:2181上完成会话建立,sessionid=0x15155768163000b,协商超时=30000 15/12/03 17:05:26警告rpc.thriftutil:无法打开到的传输jarvis:9997 15/12/03 17:05:26 warn impl.serverclient:在服务器列表中找不到可用的服务器:[jarvis:9997 (120000)]15/12/03 17:05:27警告rpc.thriftutil:无法打开到的传输jarvis:9997 15/12/03 17:05:28警告rpc.thriftutil:无法打开到的传输jarvis:9997 15/12/03 17:05:29 warn rpc.thriftutil:无法打开到的传输jarvis:9997

import org.apache.accumulo.core.client.AccumuloException;
import org.apache.accumulo.core.client.AccumuloSecurityException;
import org.apache.accumulo.core.client.BatchWriter;
import org.apache.accumulo.core.client.Connector;
import org.apache.accumulo.core.client.Instance;
import org.apache.accumulo.core.client.TableExistsException;
import org.apache.accumulo.core.client.TableNotFoundException;
import org.apache.accumulo.core.client.ZooKeeperInstance;
import org.apache.accumulo.core.client.admin.TableOperations;
import org.apache.accumulo.core.client.security.tokens.KerberosToken;
import org.apache.accumulo.core.data.Mutation;
import org.apache.accumulo.core.data.Value;
import org.apache.accumulo.core.security.ColumnVisibility;
import org.apache.hadoop.io.Text;

public class Accumulo1 {

  public Connector connection;

  @SuppressWarnings("deprecation")
  public static void main(String[] args)throws AccumuloException, AccumuloSecurityException, TableNotFoundException, TableExistsException, IOException {

    String instanceName = "instanceName ";
    String zooServers = "zooServers ";
    String userName = "userName ";
    String password = "password ";

    Instance inst = new ZooKeeperInstance(instanceName,zooServers);
    Connector connection = inst.getConnector(userName, password);

    BatchWriter bw = connection.createBatchWriter("demotable",1000000, 60000, 2);

    Text rowID = new Text("row1");
    Text colFam = new Text("colFam");
    Text colQual = new Text("colQual");

    ColumnVisibility colVis = new ColumnVisibility("public");
    long timestamp = System.currentTimeMillis();

    Value value = new Value("some-value".getBytes());

    Mutation mutation = new Mutation(rowID);
    mutation.put(colFam, colQual, colVis, timestamp, value);

    bw.addMutation(mutation);

    bw.close();
  }

}

我检查了服务器和存储设备http://jarvis:50095/服务器')存在。我不明白是什么问题。也许我把eclipse配置错了。

wz1wpwve

wz1wpwve1#

没有平板电脑服务器:请检查zookeeper和accumulo是否正在运行。
确保提供了正确的zookeeper仲裁字符串和accumulo示例名称。你应该能从accumulo监视器上得到所有这些 http://JARVIS:50095 . 这意味着,根据您提供的属性,accumulo没有运行。
这还应该告诉您accumulo是否真的在运行——查看最近的日志页面以查找任何accumulo错误。

相关问题