Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

report an error #9

Open
aimahou opened this issue Aug 14, 2017 · 0 comments
Open

report an error #9

aimahou opened this issue Aug 14, 2017 · 0 comments

Comments

@aimahou
Copy link

aimahou commented Aug 14, 2017

(1)test when port is nodePort, rc.yaml do not change,but service.yaml is :

[root@kube-master kubernetes-kafka]# cat kafka-service.yaml 
apiVersion: v1
kind: Service
metadata:
  name: kafka
  labels:
    app: kafka
    component: kafka-broker
spec:
  ports:
  - port: 9092
    name: kafka-port
    targetPort: 9092
    protocol: TCP
    nodePort: 8889
  selector:
    app: kafka
    component: kafka-broker
  type: LoadBalancer

[root@kube-master kubernetes-kafka]# cat zoo-service.yaml 
apiVersion: v1
kind: Service
metadata:
  name: kafka-zoo-svc
  labels:
    app: kafka
    component: kafka-zoo
spec:
  ports:
  - name: client
    port: 2181
    protocol: TCP
    nodePort: 8888
  - name: follower
    port: 2888
    protocol: TCP
  - name: leader
    port: 3888
    protocol: TCP
  selector:
    app: kafka
    component: kafka-zoo
  type: LoadBalancer
[root@kube-master kubernetes-kafka]# 

(2)outside the kubernetes ,on one Centos7 host ,test that :

[root@localhost bin]# kafka-topics.sh --create --zookeeper kafka.xxx.com:8888 --replication-factor 1 --partitions 1 --topic t1
Created topic "t1".
[root@localhost bin]# kafka-topics.sh --list --zookeeper kafka.xxx.com:8888
__consumer_offsets
demo-topic
t1
tttt
[root@localhost bin]# 

(3)but , it report some error:

[root@localhost bin]# kafka-console-producer.sh --broker-list kafka.xxx.com:8889  --topic t1
>111111111111111111
>2222222222222222
>[2017-08-14 14:25:18,394] ERROR Error when sending message to topic t1 with key: null, value: 18 bytes with error: (org.apache.kafka.clients.producer.internals.ErrorLoggingCallback)
org.apache.kafka.common.errors.TimeoutException: Expiring 2 record(s) for t1-0: 1504 ms has passed since batch creation plus linger time
[2017-08-14 14:25:18,396] ERROR Error when sending message to topic t1 with key: null, value: 16 bytes with error: (org.apache.kafka.clients.producer.internals.ErrorLoggingCallback)
org.apache.kafka.common.errors.TimeoutException: Expiring 2 record(s) for t1-0: 1504 ms has passed since batch creation plus linger time
^C[root@localhost bin]# 

[root@localhost bin]# kafka-console-consumer.sh --bootstrap-server kafka.xxx.com:8889 --topic t1 --from-beginning
[2017-08-14 14:28:05,031] WARN Connection to node 2147483646 could not be established. Broker may not be available. (org.apache.kafka.clients.NetworkClient)

who can help I ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant