Apache Druid failing to connect to zookeeper, Apache Druid are deployed as docker image in one container - docker-compose

I am trying to deploy Apache -Druid in docker container. Image is built successfully. All the services including zookeeper are starting normally when Docker Image of Apache-druid is deployed.
Here is my setup, I am deploying Druid docker image on Docker remote host, it using Docker swarm internally. Ihave configured different container name, hostname for each service of Apache Druid. I have configured external network, I found out internally swarm is initiating those service on different hosts. I have configured "link" as zookeeper for Druid services and vice versa.
But, middle-magaer, co-ordinator and Broker are failing to connect to Zookeeper. Following is the error:
org.apache.zookeeper.ClientCnxn - Opening socket connection to server zookeeper/IP Address:2181. Will not attempt to authenticate using SASL (unknown error) 2020-03-19T22:04:05,673 INFO [main-SendThread(localhost:2181)] org.apache.zookeeper.ClientCnxn - Socket error occurred: zookeeper/IP Address:2181.: Connection refused
So I have different services running on Docker network, on different
nodes(Docker on Linux).
These services are part of Apache Druid like middle manager, broker,router etc. These services are part on one single docker
compose file.
Services start but then not able to connect to
zookeeper which is part of Apache Druid package. Found out from my
infra team that these services are launched on different nodes within
network.
I have used defined external network. Also, I am defining
links . How do I configure services to talk to each other. Here is my
docker compose.
Here is my docker-compose file in comment below
Request inputs.
Thanks and Regards, Shubhada

I have fixed this issue y setting druid host to gateway.docker.internal

Related

How do I access a DSE cluster from an app running in a Kubernetes cluster?

I have a provided Cassandra Database installation on a server.
On the other hand my customer has a Kubernetes Cluster with a deployed application that needs to connect to the database and we expirience the following error when the container tries to start up.
WARN [com.dat.oss.dri.int.cor.con.ControlConnection] (vert.x-eventloop-thread-1) [s0] Error connecting to Node(endPoint=cassandra:9042, hostId=null, hashCode=379c44fa), trying next node (UnknownHostException: cassandra: Temporary failure in name resolution)
An suggestions what I am missing or what I need to do in my cluster?
Do you have DNS setup where the Cassandra service is available to the k8s cluster through a DNS name cassandra? Since this is an outside component, k8s relies on your external DNS resolution to discover this service.
Notice it is attempting to connect to a URL cassandra:9042. This means k8s should be able to resolve the hostname cassandra somehow, internally or externally.
If not, you have to determine your service URL, like <some-IP>:<some-Port>/some_endpoint and provide this to your k8s application, which will connect with it directly.
The issue is that you haven't configured the correct contact points in your application. In the error you posted, your application is connecting to an unknown host cassandra:
... Error connecting to Node(endPoint=cassandra:9042, ...
but your app doesn't know how to resolve the hostname cassandra leading to:
UnknownHostException: cassandra: Temporary failure in name resolution
We recommend that you specify at least two IP addresses of nodes in the "local DC" as contact points. For example if you're using the Java driver to connect to your Cassandra cluster, configure the contact points with:
datastax-java-driver {
basic {
contact-points = [ "node_IP1:9042", "node_IP2:9042" ]
}
}
Since your application is running in Kubernetes, you'll need to make sure that it has network connectivity to your Cassandra cluster. Cheers!

Failed to send the transaction successfully to the order status: SERVICE UNAVAILABLE

I am using kakfa orderer service for hyperledger fabric 1.4. while updating chaincode or making any puutState call i am getting error message stated as Failed to send the transaction successfully to the order status: SERVICE UNAVAILABLE. while checking zoopeker and kafka node it seems like kafka nodes are not able to talk to each other.
kakfa & zookeeper logs
Could you provide more info about the topology of the zookeeper-kafka cluster?
Did you use docker to deploy the zk cluster? If so, you can refer to this file.
https://github.com/whchengaa/hyperledger-fabric-technical-tutorial/blob/cross-machine-hosts-file/balance-transfer/artifacts/docker-compose-kafka.yaml
Remember to specify the IP address of the other zookeeper nodes in the hosts file which is mounted to /etc/hosts of that zookeeper node.
Make sure the port number of zookeeper nodes listed in ZOO_SERVERS environment variables are correct.

Corda RPC connection on Kubernetes

I bootstrapped a Corda network with Cordite network map service following official instructions. Everything, including SpringBoot server, works fine locally when nodes are deployed in Docker containers. But when I put the corda nodes in Kubernetes, SpringBoot server cannot communicate with Corda node. In Docker setup, I'm dropped into corda console but in Kubernetes the console doesn't appear (no error though; everything same except the console). There is probably some issues with RPC communication. Can anyone with experience point what could go wrong?
Inter pod-communication in Kubernetes works differently from docker container's communication. To establish a Spring RPC connection with Corda, you need to configure your RPC connection using the Kubernetes services.

Connecting ignite server that runs as docker container inside kubernetes from outside client process

I have minikube running kubernetes inside a virtual box.
one of the docker container it runs is an ignite server.
during my development I try to access the ignite server from outside java client but the discovery fails with all configurations I tried.
is it possible at all?
If yes can someone give an example?
To enable Apache Ignite nodes auto-discovery in Kubernetes, you need to enable TcpDiscoveryKubernetesIpFinder in IgniteConfiguration. Read more about this on https://apacheignite.readme.io/docs/kubernetes-deployment. Your Kubernetes service definitions should have the container exposed port specified, then minikube should give you service URL after successful deployment.

Docker container can't leverage external Cloudant service (network resolution / visibility?)

I've built a Container that leverages a CF app that's bound to a service, Cloudant to be specific.
When I run the container locally I can connect to my Cloudant service.
When I build and run my image in the Bluemix container service I can no longer connect to my Cloudant service. I did use --bind to bind my app to the container. I have verified that the VCAP_Services info is propagating to my container successfully.
To narrow the problem down further, I tried just doing an
ice -run --name NAME IMAGE_NAME ping CLOUDANT_HOST
and I found I was getting an unknown host.
So I then tried to just ping the IP, and got Network is unreachable.
If we can not resolve bluemix services over the network, how can we leverage them? Is there just a temporary problem, or perhaps I'm missing something?
Again, runs fine locally but fails when hosted in the container service.
It has been my experience that networking is not reliable in IBM Containers for about 5 seconds at startup. Try adding a "sleep 10" to your CMD or ENTRYPOINT. Or set it up to retry for X seconds before giving up.
Once the networking comes up it has been reliable for me. But the first few seconds of a containers life have had troubles with DNS, binding, and outgoing traffic.
looking at your problem it could be related to a network error on container when on Bluemix.
Try to access your container through shell when on Bluemix (using cf ic console or docker one) and check if the network has been rised correctly and then if its network interface(s) has an IP to use.