Kafka-Connect-Hdfs - 无法启动HdfsSinkConnector

时间:2016-09-12 21:54:32

标签: hdfs apache-kafka apache-kafka-connect

我已经从http://docs.confluent.io/2.0.0/quickstart.html#quickstart

下载了kafka connect

我试图运行hdfs连接器。 以下是设置:

connect-standalone.properties:

bootstrap.servers=lvpi00658.s:9092,lvpi00659.s:9092,lvpi00660.s:9092

key.converter=org.apache.kafka.connect.storage.StringConverter
value.converter=org.apache.kafka.connect.storage.StringConverter

internal.key.converter=org.apache.kafka.connect.storage.StringConverter
internal.value.converter=org.apache.kafka.connect.storage.StringConverter

offset.storage.file.filename=/tmp/connect.offsets
# Flush much faster than normal, which is useful for testing/debugging
offset.flush.interval.ms=10000

key.deserializer=org.apache.kafka.common.serialization.StringDeserializer
 value.deserializer=org.apache.kafka.common.serialization.StringDeserializer

quickstart-hdfs.properties:

name=hdfs-sink
connector.class=io.confluent.connect.hdfs.HdfsSinkConnector
tasks.max=1
topics=eightball-stuff11
hdfs.url=hdfs://localhost:9000
flush.size=3

我像这样运行hdfs连接器:
cd /home/fclvappi005561/confluent-3.0.0/bin
./connect-standalone ../etc/kafka-connect-hdfs/connect-standalone.properties ../etc/kafka-connect-hdfs/quickstart-hdfs.properties

但是我收到了错误:

  

[2016-09-12 17:19:28,039] INFO无法启动HdfsSinkConnector:   (io.confluent.connect.hdfs.HdfsSinkTask:72)   org.apache.kafka.connect.errors.ConnectException:   org.apache.hadoop.security.AccessControlException:权限被拒绝:   user = lvpi005561,access = WRITE,   索引节点=" /主题":根:超组的。drwxr-XR-X           在org.apache.hadoop.hdfs.server.namenode.FSPermissionChecker.check(FSPermissionChecker.java:319)           在org.apache.hadoop.hdfs.server.namenode.FSPermissionChecker.check(FSPermissionChecker.java:292)           在org.apache.hadoop.hdfs.server.namenode.FSPermissionChecker.checkPermission(FSPermissionChecker.java:213)           在org.apache.hadoop.hdfs.server.namenode.FSPermissionChecker.checkPermission(FSPermissionChecker.java:190)           在org.apache.hadoop.hdfs.server.namenode.FSDirectory.checkPermission(FSDirectory.java:1698)           在org.apache.hadoop.hdfs.server.namenode.FSDirectory.checkPermission(FSDirectory.java:1682)           在org.apache.hadoop.hdfs.server.namenode.FSDirectory.checkAncestorAccess(FSDirectory.java:1665)           在org.apache.hadoop.hdfs.server.namenode.FSDirMkdirOp.mkdirs(FSDirMkdirOp.java:71)           在org.apache.hadoop.hdfs.server.namenode.FSNamesystem.mkdirs(FSNamesystem.java:3900)           在org.apache.hadoop.hdfs.server.namenode.NameNodeRpcServer.mkdirs(NameNodeRpcServer.java:978)           at org.apache.hadoop.hdfs.protocolPB.ClientNamenodeProtocolServerSideTranslatorPB.mkdirs(ClientNamenodeProtocolServerSideTranslatorPB.java:622)           at org.apache.hadoop.hdfs.protocol.proto.ClientNamenodeProtocolProtos $ ClientNamenodeProtocol $ 2.callBlockingMethod(ClientNamenodeProtocolProtos.java)           在org.apache.hadoop.ipc.ProtobufRpcEngine $ Server $ ProtoBufRpcInvoker.call(ProtobufRpcEngine.java:616)           在org.apache.hadoop.ipc.RPC $ Server.call(RPC.java:969)           在org.apache.hadoop.ipc.Server $ Handler $ 1.run(Server.java:2049)           在org.apache.hadoop.ipc.Server $ Handler $ 1.run(Server.java:2045)           at java.security.AccessController.doPrivileged(Native Method)           在javax.security.auth.Subject.doAs(Subject.java:415)           在org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1657)           在org.apache.hadoop.ipc.Server $ Handler.run(Server.java:2043)           在io.confluent.connect.hdfs.DataWriter。(DataWriter.java:202)           at io.confluent.connect.hdfs.HdfsSinkTask.start(HdfsSinkTask.java:64)           在org.apache.kafka.connect.runtime.WorkerSinkTask.initializeAndStart(WorkerSinkTask.java:207)           在org.apache.kafka.connect.runtime.WorkerSinkTask.execute(WorkerSinkTask.java:139)           在org.apache.kafka.connect.runtime.WorkerTask.doRun(WorkerTask.java:140)           在org.apache.kafka.connect.runtime.WorkerTask.run(WorkerTask.java:175)           at java.util.concurrent.Executors $ RunnableAdapter.call(Executors.java:511)           at java.util.concurrent.FutureTask.run(FutureTask.java:266)           在java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)           at java.util.concurrent.ThreadPoolExecutor $ Worker.run(ThreadPoolExecutor.java:617)           at java.lang.Thread.run(Thread.java:745)引起:org.apache.hadoop.security.AccessControlException:权限被拒绝:   user = fclvappi005561,access = WRITE,   索引节点=" /主题":根:超组的。drwxr-XR-X           在org.apache.hadoop.hdfs.server.namenode.FSPermissionChecker.check(FSPermissionChecker.java:319)           在org.apache.hadoop.hdfs.server.namenode.FSPermissionChecker.check(FSPermissionChecker.java:292)           在org.apache.hadoop.hdfs.server.namenode.FSPermissionChecker.checkPermission(FSPermissionChecker.java:213)           在org.apache.hadoop.hdfs.server.namenode.FSPermissionChecker.checkPermission(FSPermissionChecker.java:190)           在org.apache.hadoop.hdfs.server.namenode.FSDirectory.checkPermission(FSDirectory.java:1698)           在org.apache.hadoop.hdfs.server.namenode.FSDirectory.checkPermission(FSDirectory.java:1682)           在org.apache.hadoop.hdfs.server.namenode.FSDirectory.checkAncestorAccess(FSDirectory.java:1665)           在org.apache.hadoop.hdfs.server.namenode.FSDirMkdirOp.mkdirs(FSDirMkdirOp.java:71)           在org.apache.hadoop.hdfs.server.namenode.FSNamesystem.mkdirs(FSNamesystem.java:3900)           在org.apache.hadoop.hdfs.server.namenode.NameNodeRpcServer.mkdirs(NameNodeRpcServer.java:978)           at org.apache.hadoop.hdfs.protocolPB.ClientNamenodeProtocolServerSideTranslatorPB.mkdirs(ClientNamenodeProtocolServerSideTranslatorPB.java:622)           at org.apache.hadoop.hdfs.protocol.proto.ClientNamenodeProtocolProtos $ ClientNamenodeProtocol $ 2.callBlockingMethod(ClientNamenodeProtocolProtos.java)           在org.apache.hadoop.ipc.ProtobufRpcEngine $ Server $ ProtoBufRpcInvoker.call(ProtobufRpcEngine.java:616)           在org.apache.hadoop.ipc.RPC $ Server.call(RPC.java:969)           在org.apache.hadoop.ipc.Server $ Handler $ 1.run(Server.java:2049)           在org.apache.hadoop.ipc.Server $ Handler $ 1.run(Server.java:2045)           at java.security.AccessController.doPrivileged(Native Method)           在javax.security.auth.Subject.doAs(Subject.java:415)           在org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1657)           在org.apache.hadoop.ipc.Server $ Handler.run(Server.java:2043)           at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)           at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)           at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)           at java.lang.reflect.Constructor.newInstance(Constructor.java:423)           at org.apache.hadoop.ipc.RemoteException.instantiateException(RemoteException.java:106)           在org.apache.hadoop.ipc.RemoteException.unwrapRemoteException(RemoteException.java:73)           在org.apache.hadoop.hdfs.DFSClient.primitiveMkdir(DFSClient.java:2755)           在org.apache.hadoop.hdfs.DFSClient.mkdirs(DFSClient.java:2724)           在org.apache.hadoop.hdfs.DistributedFileSystem $ 17.doCall(DistributedFileSystem.java:870)           在org.apache.hadoop.hdfs.DistributedFileSystem $ 17.doCall(DistributedFileSystem.java:866)           在org.apache.hadoop.fs.FileSystemLinkResolver.resolve(FileSystemLinkResolver.java:81)           在org.apache.hadoop.hdfs.DistributedFileSystem.mkdirsInternal(DistributedFileSystem.java:866)           在org.apache.hadoop.hdfs.DistributedFileSystem.mkdirs(DistributedFileSystem.java:859)           在org.apache.hadoop.fs.FileSystem.mkdirs(FileSystem.java:1817)           在io.confluent.connect.hdfs.storage.HdfsStorage.mkdirs(HdfsStorage.java:61)           at io.confluent.connect.hdfs.DataWriter.createDir(DataWriter.java:369)           在io.confluent.connect.hdfs.DataWriter。(DataWriter.java:170)           ... 10更多引起:org.apache.hadoop.ipc.RemoteException(org.apache.hadoop.security.AccessControlException):   权限被拒绝:user = fclvappi005561,access = WRITE,   索引节点=" /主题":根:超组的。drwxr-XR-X           在org.apache.hadoop.hdfs.server.namenode.FSPermissionChecker.check(FSPermissionChecker.java:319)           在org.apache.hadoop.hdfs.server.namenode.FSPermissionChecker.check(FSPermissionChecker.java:292)           在org.apache.hadoop.hdfs.server.namenode.FSPermissionChecker.checkPermission(FSPermissionChecker.java:213)           在org.apache.hadoop.hdfs.server.namenode.FSPermissionChecker.checkPermission(FSPermissionChecker.java:190)           在org.apache.hadoop.hdfs.server.namenode.FSDirectory.checkPermission(FSDirectory.java:1698)           在org.apache.hadoop.hdfs.server.namenode.FSDirectory.checkPermission(FSDirectory.java:1682)           在org.apache.hadoop.hdfs.server.namenode.FSDirectory.checkAncestorAccess(FSDirectory.java:1665)           在org.apache.hadoop.hdfs.server.namenode.FSDirMkdirOp.mkdirs(FSDirMkdirOp.java:71)           在org.apache.hadoop.hdfs.server.namenode.FSNamesystem.mkdirs(FSNamesystem.java:3900)           在org.apache.hadoop.hdfs.server.namenode.NameNodeRpcServer.mkdirs(NameNodeRpcServer.java:978)           at org.apache.hadoop.hdfs.protocolPB.ClientNamenodeProtocolServerSideTranslatorPB.mkdirs(ClientNamenodeProtocolServerSideTranslatorPB.java:622)           at org.apache.hadoop.hdfs.protocol.proto.ClientNamenodeProtocolProtos $ ClientNamenodeProtocol $ 2.callBlockingMethod(ClientNamenodeProtocolProtos.java)           在org.apache.hadoop.ipc.ProtobufRpcEngine $ Server $ ProtoBufRpcInvoker.call(ProtobufRpcEngine.java:616)           在org.apache.hadoop.ipc.RPC $ Server.call(RPC.java:969)           在org.apache.hadoop.ipc.Server $ Handler $ 1.run(Server.java:2049)           在org.apache.hadoop.ipc.Server $ Handler $ 1.run(Server.java:2045)           at java.security.AccessController.doPrivileged(Native Method)           在javax.security.auth.Subject.doAs(Subject.java:415)           在org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1657)           在org.apache.hadoop.ipc.Server $ Handler.run(Server.java:2043)           在org.apache.hadoop.ipc.Client.call(Client.java:1468)           在org.apache.hadoop.ipc.Client.call(Client.java:1399)           在org.apache.hadoop.ipc.ProtobufRpcEngine $ Invoker.invoke(ProtobufRpcEngine.java:232)           在com.sun.proxy。$ Proxy47.mkdirs(未知来源)           at org.apache.hadoop.hdfs.protocolPB.ClientNamenodeProtocolTranslatorPB.mkdirs(ClientNamenodeProtocolTranslatorPB.java:539)           at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)           at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)           at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)           at java.lang.reflect.Method.invoke(Method.java:498)           在org.apache.hadoop.io.retry.RetryInvocationHandler.invokeMethod(RetryInvocationHandler.java:187)           在org.apache.hadoop.io.retry.RetryInvocationHandler.invoke(RetryInvocationHandler.java:102)           在com.sun.proxy。$ Proxy48.mkdirs(未知来源)           在org.apache.hadoop.hdfs.DFSClient.primitiveMkdir(DFSClient.java:2753)           ......还有20个

我应该提一下,我在127.0.0.1本地运行hadoop的docker镜像:docker run -d -p 9000:9000 sequenceiq/hadoop-docker:2.7.1

我看到的这个权限被拒绝错误是什么?我与bootstrap.servers

下提到的主持人不同

1 个答案:

答案 0 :(得分:4)

权限被拒绝错误在hdfs端。用户“root”没有对hdfs目录“/ topics”的写访问权。