分类目录归档:其他

ipc.Client: Retrying connect to server错误解决方案

运行Hadoop: The Definitive Guide 2nd Ediction第51页的例子里面的例子出现了如下错误:

  • 12/01/10 16:29:32 INFO ipc.Client: Retrying connect to server: localhost/127.0.0.1:9000. Already tried 0 time(s).
  • 12/01/10 16:29:33 INFO ipc.Client: Retrying connect to server: localhost/127.0.0.1:9000. Already tried 1 time(s).
  • 12/01/10 16:29:34 INFO ipc.Client: Retrying connect to server: localhost/127.0.0.1:9000. Already tried 2 time(s).
  • 12/01/10 16:29:35 INFO ipc.Client: Retrying connect to server: localhost/127.0.0.1:9000. Already tried 3 time(s).
  • 12/01/10 16:29:36 INFO ipc.Client: Retrying connect to server: localhost/127.0.0.1:9000. Already tried 4 time(s).
  • 12/01/10 16:29:37 INFO ipc.Client: Retrying connect to server: localhost/127.0.0.1:9000. Already tried 5 time(s).
  • 12/01/10 16:29:38 INFO ipc.Client: Retrying connect to server: localhost/127.0.0.1:9000. Already tried 6 time(s).
  • 12/01/10 16:29:39 INFO ipc.Client: Retrying connect to server: localhost/127.0.0.1:9000. Already tried 7 time(s).
  • 12/01/10 16:29:40 INFO ipc.Client: Retrying connect to server: localhost/127.0.0.1:9000. Already tried 8 time(s).
  • 12/01/10 16:29:41 INFO ipc.Client: Retrying connect to server: localhost/127.0.0.1:9000. Already tried 9 time(s).

解决方案:

在命令行使用ifconfig查看本机IP,然后进入conf/core-site.xml将hdfs://localhost:9000改为hdfs://你的IP地址:9000

<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>

<!-- Put site-specific property overrides in this file. -->

<configuration>
     <property>
         <name>fs.default.name</name>
         <value>hdfs://192.168.1.101:9000</value>
     </property>
</configuration>