Nutch 2.2.1 编译安装后,执行 nutch inject
命令后报错信息如下:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
micmiu@micmiu-mbp: ~/tmp/nutch $ nutch inject urls -crawlId micmiublog InjectorJob: starting at 2014-12-31 14:13:19 InjectorJob: Injecting urlDir: urls InjectorJob: org.apache.gora.util.GoraException: java.lang.RuntimeException: java.lang.IllegalArgumentException: Not a host:port pair: ?6460@micmiu-mbp.local192.168.1.100,62142,1420001742333 at org.apache.gora.store.DataStoreFactory.createDataStore(DataStoreFactory.java:167) at org.apache.gora.store.DataStoreFactory.createDataStore(DataStoreFactory.java:135) at org.apache.nutch.storage.StorageUtils.createWebStore(StorageUtils.java:75) at org.apache.nutch.crawl.InjectorJob.run(InjectorJob.java:221) at org.apache.nutch.crawl.InjectorJob.inject(InjectorJob.java:251) at org.apache.nutch.crawl.InjectorJob.run(InjectorJob.java:273) at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:65) at org.apache.nutch.crawl.InjectorJob.main(InjectorJob.java:282) Caused by: java.lang.RuntimeException: java.lang.IllegalArgumentException: Not a host:port pair: ?6460@micmiu-mbp.local192.168.1.100,62142,1420001742333 at org.apache.gora.hbase.store.HBaseStore.initialize(HBaseStore.java:127) at org.apache.gora.store.DataStoreFactory.initializeDataStore(DataStoreFactory.java:102) at org.apache.gora.store.DataStoreFactory.createDataStore(DataStoreFactory.java:161) ... 7 more Caused by: java.lang.IllegalArgumentException: Not a host:port pair: ?6460@micmiu-mbp.local192.168.1.100,62142,1420001742333 at org.apache.hadoop.hbase.HServerAddress.<init>(HServerAddress.java:60) at org.apache.hadoop.hbase.MasterAddressTracker.getMasterAddress(MasterAddressTracker.java:63) at org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation.getMaster(HConnectionManager.java:354) at org.apache.hadoop.hbase.client.HBaseAdmin.<init>(HBaseAdmin.java:94) at org.apache.gora.hbase.store.HBaseStore.initialize(HBaseStore.java:109) ... 9 more |
一般这样的错误信息是由于 $NUTCH_HOME/lib/
hbase-x.y.z.jar 的版本和当前环境中HBase的版本不一致造成的,只要把 hbase-x.y.z*.jar 替换成实际 $HBASE_HOME/lib/
下对应的 hbase-a.b.c.jar 即可。
ps: 目前nutch2.2.1 编译后 $NUTCH_SRC_HOME/runtime/deploy/lib
下hbase为 hbase-0.90.4.jar,不过官方推荐的hbase为0.94.14,我替换为0.94.14仍然有问题(这个据说要修改源码重新编译才能解决),后来把hbase版本降到 hbase-0.92.2.jar 运行正常。
—————– EOF @Michael Sun —————–
现在这个问题解决了,出来个新的,
InjectorJob: Using class org.apache.gora.hbase.store.HBaseStore as the Gora storage class.
java.lang.RuntimeException: java.lang.ClassNotFoundException: org.apache.gora.mapreduce.GoraOutputFormat
at org.apache.hadoop.conf.Configuration.getClass(Configuration.java:857)
at org.apache.hadoop.mapreduce.JobContext.getOutputFormatClass(JobContext.java:235)
at org.apache.hadoop.mapred.Task.initialize(Task.java:513)
at org.apache.hadoop.mapred.MapTask.run(MapTask.java:347)
at org.apache.hadoop.mapred.Child$4.run(Child.java:255)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAs(Subject.java:396)
at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1190)
想问下,你的hbase 是0.92.2么,我用hbase 0.92.2 nutch2.2.1还是报Not a host:port pair
Not a host:port pair: �24784@ktbigdata1ktbigdata1,60000,1438653643661
奇怪的是我显示来个主机名:ktbigdata1,还有我的hadoop是1.2.1