SigNoz Deployment Issue with External ClickHouse and PVC

TLDR Ragulraj faced issues with deploying SigNoz v0.18.1 through kubernetes due to otel-collector not connecting to the correct ClickHouse cluster. After discussing with Srikanth, Syed and Prashant, he decided to try again with SigNoz helm charts, but faced issues with PVC remaining pending.

Photo of Ragulraj
Ragulraj
Wed, 19 Apr 2023 10:21:12 UTC

Hi team i was deploying signoz v0.18.1 throught k8 , all service were running except otel-collector and otel-collector metrics . i got logs as Error: cannot build pipelines: failed to create "clickhousetraces" exporter, in pipeline "traces": error connecting to primary db: code: 170, message: Requested cluster 'cluster' not found 2023/04/19 10:15:30 application run finished with error: cannot build pipelines: failed to create "clickhousetraces" exporter, in pipeline "traces": error connecting to primary db: code: 170, message: Requested cluster 'cluster' not found . as i checked in clickhouse DB for clusters , there is some cluster list , how to get the cluster name whick otel-collector is looking

Photo of Srikanth
Srikanth
Wed, 19 Apr 2023 13:50:16 UTC

Are you using external ClickHouse with SigNoz helm?

Photo of Syed
Syed
Wed, 19 Apr 2023 14:09:58 UTC

in case of external clickhouse, please set your clustername as *cluster*

Photo of Syed
Syed
Wed, 19 Apr 2023 14:10:11 UTC

I faced similar kind of issue.

Photo of Ragulraj
Ragulraj
Wed, 19 Apr 2023 14:12:15 UTC

i am running all the service in k8 cluster as individual pod with this otel docker image signoz/signoz-otel-collector:0.66.7

Photo of Ragulraj
Ragulraj
Wed, 19 Apr 2023 14:14:02 UTC

clustername in which file i should configure , in clickhouse ? can you share me the file name which i need to change plz ?

Photo of Syed
Syed
Wed, 19 Apr 2023 14:15:01 UTC

Let me share the repo link Ragulraj

Photo of Syed
Syed
Wed, 19 Apr 2023 14:17:17 UTC

Just clone this repo and do docker-compose up -d, This will create 6 nodes based clickhouse server on a single node. I am still testing thats why I am using single node. Cluster name is set in macros.xml and remote_server.xml

Photo of Srikanth
Srikanth
Wed, 19 Apr 2023 14:26:56 UTC

What did you use to deploy to Kubernetes? If you use SigNoz helm charts, it automatically sets it up. If not, you need to make sure there is a cluster named `cluster` in CickHouse.

Photo of Ragulraj
Ragulraj
Wed, 19 Apr 2023 14:33:51 UTC

No i am not using signoz helm charts , this is k8 deployment file i prepared for clickhouse

Photo of Ragulraj
Ragulraj
Wed, 19 Apr 2023 14:35:01 UTC

f not, you need to make sure there is a cluster named `cluster` in CickHouse. this in which file i need to configure ?

Photo of Ragulraj
Ragulraj
Wed, 19 Apr 2023 14:38:02 UTC

in this below files i couldnt get clusters config

Photo of Srikanth
Srikanth
Wed, 19 Apr 2023 14:54:28 UTC

If you hand-roll your own manifests, it will not be possible for me to help since I don’t have any idea what your config will look like.

Photo of Ragulraj
Ragulraj
Wed, 19 Apr 2023 15:23:21 UTC

based on the docker-compose.yaml from signoz docs , i created a k8 deployment for each service

Photo of Ragulraj
Ragulraj
Wed, 19 Apr 2023 15:24:03 UTC

my k8 deployment will be almost similar like docker-compose.yaml

Photo of Ragulraj
Ragulraj
Wed, 19 Apr 2023 15:26:23 UTC

in clickhouse DB there is no cluster named "cluster"

Photo of Ragulraj
Ragulraj
Thu, 20 Apr 2023 09:15:02 UTC

Hi Srikanth i was trying now to setup signoz with SigNoz helm charts provided in docs

Photo of Ragulraj
Ragulraj
Thu, 20 Apr 2023 09:15:48 UTC

few pods were running some were in init , seems there is issue in pvc connecting with pv

Photo of Ragulraj
Ragulraj
Thu, 20 Apr 2023 09:44:09 UTC

the pvc are in pending state

Photo of Srikanth
Srikanth
Thu, 20 Apr 2023 13:30:24 UTC

Prashant can help with the helm deployment

Photo of Prashant
Prashant
Thu, 20 Apr 2023 14:21:05 UTC

It case of external ClickHouse, there are some pre-requisites for external clickhouse: • UDF script and histogram quantile binary needed in clickhouse: and • must have at least one zookeeper instance • distributed cluster named `cluster` set up required: • user credentaials passed must have enough privileges to create/manage databases in CH • secure connection not supported between clickhouse and signoz components yet

Photo of Prashant
Prashant
Thu, 20 Apr 2023 14:23:25 UTC

Ragulraj It is likely that you are missing zookeeper as well as including a distributed cluster named `cluster` in clickhouse config.

Photo of Ragulraj
Ragulraj
Thu, 20 Apr 2023 14:29:49 UTC

Hi Prashant as we are facing many difficulties in external clickhouse , i started a new installation of signoz through signoz helm

Photo of Syed
Syed
Thu, 20 Apr 2023 14:31:30 UTC

Ragulraj I am using external clickhouse, I also shared my repo to install, I am not facing any issue with external clickhouse

Photo of Ragulraj
Ragulraj
Thu, 20 Apr 2023 14:32:35 UTC

the repo you shared is for docker-compose , i am using k8

Photo of Syed
Syed
Thu, 20 Apr 2023 14:33:11 UTC

docker-compose to install clickhouse server. My signoz is running on AWS EKS

Photo of Syed
Syed
Thu, 20 Apr 2023 14:33:57 UTC

clickhouse server is currently running on ec2 and all other signoz resources are deployed on eks cluster

Photo of Ragulraj
Ragulraj
Thu, 20 Apr 2023 14:34:53 UTC

Ok acutally i am moving with signoz helm now , for easy understand

Photo of Ragulraj
Ragulraj
Thu, 20 Apr 2023 14:36:18 UTC

Prashant Syed here pods were still in pending

Photo of Syed
Syed
Thu, 20 Apr 2023 14:37:25 UTC

These are my pods, Ragulraj check your pv and pvc

Photo of Ragulraj
Ragulraj
Thu, 20 Apr 2023 14:39:31 UTC

my pvc is still in pending

Photo of Syed
Syed
Thu, 20 Apr 2023 14:40:42 UTC

I think this is not related to signoz issue, check how you are provisioning pv. In my case we are using dynamic storage class for provisioning PV.

Photo of Ragulraj
Ragulraj
Thu, 20 Apr 2023 14:41:03 UTC

do i need to create any pv manually

Photo of Syed
Syed
Thu, 20 Apr 2023 14:41:08 UTC

Try to create PV and bind it pvc manually

Photo of Syed
Syed
Thu, 20 Apr 2023 14:41:18 UTC

Yes if you do not have storage class

Photo of Syed
Syed
Thu, 20 Apr 2023 14:41:27 UTC

for dynamic provisioning

Photo of Ragulraj
Ragulraj
Thu, 20 Apr 2023 14:42:17 UTC

Ok, what type of storage class i should give in my PV

Photo of Ragulraj
Ragulraj
Thu, 20 Apr 2023 14:42:41 UTC

if you have any sample can you share me please ?

Photo of Syed
Syed
Thu, 20 Apr 2023 14:43:04 UTC

where your k8s cluster is running

Photo of Ragulraj
Ragulraj
Thu, 20 Apr 2023 14:43:32 UTC

it is running in OCI server

Photo of Syed
Syed
Thu, 20 Apr 2023 14:44:52 UTC

Photo of Syed
Syed
Thu, 20 Apr 2023 14:45:00 UTC

check this documentation

Photo of Ragulraj
Ragulraj
Thu, 20 Apr 2023 14:48:27 UTC

Ok i will check with this , thank you so much

Photo of Ragulraj
Ragulraj
Thu, 20 Apr 2023 14:49:32 UTC

and you created individual pv for the pvc created from signoz helm am i right ?

Photo of Syed
Syed
Thu, 20 Apr 2023 15:13:46 UTC

no, my pv got automatically created when I defing volumeclaimtemplate

Photo of Ragulraj
Ragulraj
Thu, 20 Apr 2023 15:23:59 UTC

where you defined volume claim template , pv created automatically means by helm ?