Hi Team,
we want to deploy lagom services with cassandra and kafka,But while deploying into kubernetes we are getting the below error message for kafka
Error message:
akkaSource=akka.tcp://orderservice@orderservice-0.orderservice...svc.cluster.local:2551/system/sharding/kafkaProducer-order-events/singleton/singleton/producer, sourceActorSystem=orderservice] - Unable to locate Kafka service named [kafka_native]
This is the service name we are trying to connect kafka
lagom.services {
kafka_native = "tcp://kf1.mydomain.com:9092"
}
Regards--
Jayaram
You received this message because you are subscribed to the Google Groups "Lagom Framework Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to lagom-framework+unsubscribe@googlegroups.com.
To post to this group, send email to lagom-framework@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/lagom-framework/bcca0421-8eee-4197-a380-ad208f64e172%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
To unsubscribe from this group and stop receiving emails from it, send an email to lagom-framewo...@googlegroups.com.
To post to this group, send email to lagom-f...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/lagom-framework/bcca0421-8eee-4197-a380-ad208f64e172%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
{
"apiVersion": "v1",
"kind": "Service",
"metadata": {
"name": "kafka",
"labels": {
"app": "kafka",
"component": "kafka-broker"
}
},
{
"name": "KAFKA_SERVICE_NAME",
"value": "_native._tcp.kafka.default.svc.cluster.local"
},
To unsubscribe from this group and stop receiving emails from it, send an email to lagom-framewo...@googlegroups.com.
To post to this group, send email to lagom-f...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/lagom-framework/bcca0421-8eee-4197-a380-ad208f64e172%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
2018-03-11T11:46:14.827Z [error] com.lightbend.lagom.internal.broker.kafka.Producer$TaggedOffsetProducerActor [sourceThread=rule-svc-akka.actor.default-dispatcher-3, akkaTimestamp=11:46:14.821UTC, akkaSource=akka.tcp://rule...@rule-svc-0.rule-svc.default.svc.cluster.local:2551/system/sharding/kafkaProducer-service.rule/io.iven.platform.rule.impl.evt.RulesEvt3/io.iven.platform.rule.impl.evt.RulesEvt3/producer, sourceActorSystem=rule-svc] - Unable to locate Kafka service named [_native._tcp.kafka.default.svc.cluster.local]
apiVersion: v1
kind: Service
metadata:
name: kafka-service
labels:
app: kafka
spec:
ports:
- port: 9092
name: kafka-port
targetPort: 9092
protocol: TCP
selector:
app: kafka
type: LoadBalancer
kind: Deployment
apiVersion: extensions/v1beta1
metadata:
name: kafka-deployment
spec:
replicas: 1
selector:
matchLabels:
name: kafka
template:
metadata:
labels:
name: kafka
app: kafka
spec:
containers:
- name: kafka
image: wurstmeister/kafka
ports:
- containerPort: 9092
env:
- name: KAFKA_ADVERTISED_PORT
value: "9092"
- name: KAFKA_ZOOKEEPER_CONNECT
value: zoo1:2181,zoo2:2181,zoo3:2181
- name: KAFKA_CREATE_TOPICS
value: mytopic:2:1
kind: Deployment
apiVersion: extensions/v1beta1
metadata:
name: zookeeper-deployment-1
spec:
replicas: 1
selector:
matchLabels:
app: zookeeper-1
name: zookeeper-1
template:
metadata:
labels:
app: zookeeper-1
name: zookeeper-1
spec:
containers:
- name: zoo1
image: digitalwonderland/zookeeper
ports:
- containerPort: 2181
env:
- name: ZOOKEEPER_ID
value: "1"
- name: ZOOKEEPER_SERVER_1
value: zoo1
- name: ZOOKEEPER_SERVER_2
value: zoo2
- name: ZOOKEEPER_SERVER_3
value: zoo3
---
kind: Deployment
apiVersion: extensions/v1beta1
metadata:
name: zookeeper-deployment-2
spec:
replicas: 1
selector:
matchLabels:
app: zookeeper-2
name: zookeeper-2
template:
metadata:
labels:
app: zookeeper-2
name: zookeeper-2
spec:
containers:
- name: zoo2
image: digitalwonderland/zookeeper
ports:
- containerPort: 2181
env:
- name: ZOOKEEPER_ID
value: "2"
- name: ZOOKEEPER_SERVER_1
value: zoo1
- name: ZOOKEEPER_SERVER_2
value: zoo2
- name: ZOOKEEPER_SERVER_3
value: zoo3
---
kind: Deployment
apiVersion: extensions/v1beta1
metadata:
name: zookeeper-deployment-3
spec:
replicas: 1
selector:
matchLabels:
app: zookeeper-3
name: zookeeper-3
template:
metadata:
labels:
app: zookeeper-3
name: zookeeper-3
spec:
containers:
- name: zoo3
image: digitalwonderland/zookeeper
ports:
- containerPort: 2181
env:
- name: ZOOKEEPER_ID
value: "3"
- name: ZOOKEEPER_SERVER_1
value: zoo1
- name: ZOOKEEPER_SERVER_2
value: zoo2
- name: ZOOKEEPER_SERVER_3
value: zoo3
apiVersion: v1
kind: Service
metadata:
name: zoo1
labels:
app: zookeeper-1
spec:
ports:
- name: client
port: 2181
protocol: TCP
- name: follower
port: 2888
protocol: TCP
- name: leader
port: 3888
protocol: TCP
selector:
app: zookeeper-1
---
apiVersion: v1
kind: Service
metadata:
name: zoo2
labels:
app: zookeeper-2
spec:
ports:
- name: client
port: 2181
protocol: TCP
- name: follower
port: 2888
protocol: TCP
- name: leader
port: 3888
protocol: TCP
selector:
app: zookeeper-2
---
apiVersion: v1
kind: Service
metadata:
name: zoo3
labels:
app: zookeeper-3
spec:
ports:
- name: client
port: 2181
protocol: TCP
- name: follower
port: 2888
protocol: TCP
- name: leader
port: 3888
protocol: TCP
selector:
app: zookeeper-3
apiVersion: v1
kind: Service
metadata:
labels:
app: rule-svc
name: rule-svc
spec:
clusterIP: None
ports:
- name: http-lagom-api
port: 9000
protocol: TCP
targetPort: 9000
selector:
app: rule-svc
---
apiVersion: v1
kind: Service
metadata:
labels:
app: rule-svc
name: rule-svc-akka-remoting
spec:
ports:
- port: 2551
protocol: TCP
targetPort: 2551
selector:
app: rule-svc
---
apiVersion: apps/v1beta1
kind: StatefulSet
metadata:
name: rule-svc
spec:
serviceName: rule-svc
replicas: 1
template:
metadata:
labels:
app: rule-svc
spec:
containers:
- name: rule-svc
image: localhost:5000/platform/rule-svc
imagePullPolicy: IfNotPresent
resources:
requests:
memory: 512Mi
ports:
- containerPort: 9000
name: http-lagom-api
- containerPort: 2551
name: akka-remote
env:
- name: APPLICATION_SECRET
value: "ATTENTION_BE_SURE_TO_CHANGE_ME!!!!"
- name: RULE_BIND_PORT
value: '9000'
- name: RULE_BIND_IP
value: "0.0.0.0"
- name : KAFKA_SERVICE_NAME
value: _native._tcp.kafka.default.svc.cluster.local
- name: CASSANDRA_SERVICE_NAME
value: _native._tcp.cassandra.default.svc.cluster.local
- name: AKKA_REMOTING_PORT
value: '2551'
- name: AKKA_REMOTING_BIND_PORT
value: '2551'
- name: AKKA_REMOTING_HOST
value: "$HOSTNAME.rule-svc.default.svc.cluster.local"
- name: AKKA_REMOTING_BIND_HOST
value: "$HOSTNAME.rule-svc.default.svc.cluster.local"
- name: AKKA_SEED_NODES
value: rule-svc-0.rule-svc.default.svc.cluster.local:2551,rule-svc-1.rule-svc.default.svc.cluster.local:2551,rule-svc-2.rule-svc.default.svc.cluster.local:2551
readinessProbe:
httpGet:
path: "/_status/circuit-breaker/current"
port: 9000
initialDelaySeconds: 5
periodSeconds: 5