2017-05-24 41 views
0

我與開放的轉變在我的本地機器上玩,內卡夫卡節點時,當我嘗試部署使用此recipe卡夫卡節點,但我得到這個異常:有關錯誤的實例openshift

我不知道發生了什麼,Kafka成功地與Zookeeper交談,我可以在這個日誌中看到,但在此之後,這個例外顯然是不夠的,我的意思是,Kafka試圖寫什麼?哪個用戶正在嘗試寫入?

[2017-05-24 13:06:28,835] INFO Opening socket connection to server zookeeper.myproject.svc.cluster.local/172.30.106.154:2181. Will not attempt to authenticate using SASL (unknown error) (org.apache.zookeeper.ClientCnxn) 
[2017-05-24 13:06:28,839] INFO Socket connection established to zookeeper.myproject.svc.cluster.local/172.30.106.154:2181, initiating session (org.apache.zookeeper.ClientCnxn) 
[2017-05-24 13:06:28,859] INFO Session establishment complete on server zookeeper.myproject.svc.cluster.local/172.30.106.154:2181, sessionid = 0x15c39c42ce00074, negotiated timeout = 6000 (org.apache.zookeeper.ClientCnxn) 
[2017-05-24 13:06:28,862] INFO zookeeper state changed (SyncConnected) (org.I0Itec.zkclient.ZkClient) 
[2017-05-24 13:06:28,957] INFO Cluster ID = E-glEZdXQvq9joWC2IsGmg (kafka.server.KafkaServer) 
[2017-05-24 13:06:28,961] WARN No meta.properties file under dir /tmp/kafka-logs/meta.properties (kafka.server.BrokerMetadataCheckpoint) 
[2017-05-24 13:06:29,004] INFO [ThrottledRequestReaper-Fetch], Starting (kafka.server.ClientQuotaManager$ThrottledRequestReaper) 
[2017-05-24 13:06:29,006] INFO [ThrottledRequestReaper-Produce], Starting (kafka.server.ClientQuotaManager$ThrottledRequestReaper) 
[2017-05-24 13:06:29,032] FATAL [Kafka Server 1117], Fatal error during KafkaServer startup. Prepare to shutdown (kafka.server.KafkaServer) 
java.io.IOException: Permission denied 
at java.io.UnixFileSystem.createFileExclusively(Native Method) 
at java.io.File.createNewFile(File.java:1012) 
at kafka.utils.FileLock.<init>(FileLock.scala:28) 
at kafka.log.LogManager$$anonfun$lockLogDirs$1.apply(LogManager.scala:104) 
at kafka.log.LogManager$$anonfun$lockLogDirs$1.apply(LogManager.scala:103) 
at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:234) 
at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:234) 
at scala.collection.IndexedSeqOptimized$class.foreach(IndexedSeqOptimized.scala:33) 
at scala.collection.mutable.WrappedArray.foreach(WrappedArray.scala:35) 
at scala.collection.TraversableLike$class.map(TraversableLike.scala:234) 
at scala.collection.AbstractTraversable.map(Traversable.scala:104) 
at kafka.log.LogManager.lockLogDirs(LogManager.scala:103) 
at kafka.log.LogManager.<init>(LogManager.scala:65) 
at kafka.server.KafkaServer.createLogManager(KafkaServer.scala:646) 
at kafka.server.KafkaServer.startup(KafkaServer.scala:208) 
at kafka.server.KafkaServerStartable.startup(KafkaServerStartable.scala:39) 
at kafka.Kafka$.main(Kafka.scala:67) 
at kafka.Kafka.main(Kafka.scala) 

我運行OS X 10.12.4,安裝移開放跟隨此guide和運行我的地方開後移,我可以看到這樣的輸出:

MacBook-Pro-de-Alonso:openShift-local aisidoro$ docker images 
REPOSITORY           TAG      IMAGE ID   CREATED    SIZE 
172.30.1.1:5000/myproject/kafka-openstack-poc  latest    06113811f186  4 hours ago   542 MB 
172.30.1.1:5000/myproject/cassandra-openstack-poc latest    d6a3bb84956b  4 hours ago   728 MB 
spotify/kafka          latest    7ded2905de20  6 days ago   444 MB 
openshift/origin-docker-builder      v1.5.1    34e347b08dc0  7 days ago   617 MB 
openshift/origin-deployer       v1.5.1    0f23b83cad80  7 days ago   617 MB 
openshift/origin-docker-registry     v1.5.1    345b59149571  7 days ago   428 MB 
openshift/origin-haproxy-router      v1.5.1    02a2dd43884b  7 days ago   739 MB 
openshift/origin         v1.5.1    a23dc456ea10  7 days ago   617 MB 
openshift/origin-pod        v1.5.1    aad02d5e14b9  7 days ago   1.14 MB 
ejercicio3           latest    a1ad64693ca2  12 days ago   542 MB 
jboss/base-jdk          8     f8920ff5aaa7  12 days ago   421 MB 
centos            7     8140d0c64310  12 days ago   193 MB 
java            openjdk-8-jre  e44d62cf8862  4 months ago  311 MB 
elasticsearch          2.4.1    8e3cf79edcc3  6 months ago  346 MB 
MacBook-Pro-de-Alonso:openShift-local aisidoro$ docker ps 
CONTAINER ID  IMAGE                              COMMAND     CREATED    STATUS    PORTS                NAMES 
89bce253d069  openshift/origin-pod:v1.5.1                         "/pod"     3 hours ago   Up 3 hours                    k8s_POD.c39dfe94_kafka-3-8r2rf_myproject_51c884f2-4066-11e7-902e-26367c308d68_a35c5bbe 
147ae4711fec  openshift/origin-pod:v1.5.1                         "/pod"     3 hours ago   Up 3 hours                    k8s_POD.c39dfe94_kafka-1-mvndq_myproject_9b37291e-4065-11e7-902e-26367c308d68_7fc571d7 
9725400152e7  172.30.1.1:5000/myproject/[email protected]:cb4cbb6894503c5c9050b9ee15300574004db29143e22e8d2d753e1c09f90410  "bin/zookeeper-ser..." 4 hours ago   Up 4 hours                    k8s_zookeeper.a006fb2a_zookeeper-1-4t1mr_myproject_90ca45c5-4062-11e7-902e-26367c308d68_12a5819c 
a3cf5a956d90  openshift/origin-pod:v1.5.1                         "/pod"     4 hours ago   Up 4 hours                    k8s_POD.b461fe8c_zookeeper-1-4t1mr_myproject_90ca45c5-4062-11e7-902e- 26367c308d68_96e8436f 
a714059c8ab6  172.30.1.1:5000/myproject/[email protected]:f26bbb253e2cf6e0fb097d47a4a6ee45472e66fbdc90e562261bf5d18d14aafc "/opt/apache-cassa..." 4 hours ago   Up 4 hours                    k8s_cassandra-cql.6c15e0a5_cassandra-openstack-poc-1-8lpcd_myproject_eafc8ab5-4061-11e7-902e-26367c308d68_c100a39f 
016962774c6a  openshift/origin-pod:v1.5.1                         "/pod"     4 hours ago   Up 4 hours                    k8s_POD.cfb87698_cassandra-openstack-poc-1-8lpcd_myproject_eafc8ab5-4061-11e7-902e-26367c308d68_e7986c04 
e2efa94aaa6f  openshift/origin-haproxy-router:v1.5.1                      "/usr/bin/openshif..." 4 hours ago   Up 4 hours                    k8s_router.ccc6298a_router-1-mn6b1_default_b386f79d-405c-11e7-902e-26367c308d68_2bdaaa5b 
a197561fb08d  openshift/origin-docker-registry:v1.5.1                      "/bin/sh -c 'DOCKE..." 4 hours ago   Up 4 hours                    k8s_registry.10a5d462_docker-registry-1-2x9q0_default_b3590fa9-405c-11e7-902e-26367c308d68_81086abb 
ec4ddd33732b  openshift/origin-pod:v1.5.1                         "/pod"     4 hours ago   Up 4 hours   0.0.0.0:80->80/tcp, 0.0.0.0:443->443/tcp, 0.0.0.0:1936->1936/tcp k8s_POD.f33047a0_router-1-mn6b1_default_b386f79d-405c-11e7-902e-26367c308d68_2e28ed28 
e0656a09f489  openshift/origin-pod:v1.5.1                         "/pod"     4 hours ago   Up 4 hours                    k8s_POD.a71dfe85_docker-registry-1-2x9q0_default_b3590fa9-405c-11e7-902e- 26367c308d68_79d54bda 
4368521a954b  openshift/origin:v1.5.1                          "/usr/bin/openshif..." 4 hours ago   Up 4 hours                    origin 

回答

1

基礎上的內容kafka.yaml文件,看起來像它試圖寫入/tmp/kafka-logs目錄。