Graphite-Web Cluster: don’t see data from remote location

I have a graphite setup using a docker , now i setup another stand-alone graphite instance , i setup them as a cluster meaning both of them can see data each other. The weird thing is that the docker instance can see data from stand alone instance. But stand alone instance can’t see data in docker instance. i doubt it’s a network issue, but it’s not , i can see stand-alone sending query to docker. i don’t see any error in the graphite web log, i finally find a way to turn on the log. We need to turn on DEBUG=True in , then edit file .$GRAPHITE_ROOT/webapp/graphite/, in the FindRequest class change the line “suppressErrors = True” to “suppressErrors = False”. 

Then at about line 94 , you need to change this:

 except Exception as e:
      if not self.suppressErrors:
        raise e
        results = []

Restart web server, you will see some error like this when using the Inspector

Django Version:
Exception Type:	ValueError
Exception Value:	
unsupported pickle protocol: 4
Exception Location:	/opt/graphite/webapp/graphite/ in get_results, line 86
Python Executable:	/usr/bin/python
Python Version:	2.7.5
Python Path:	
Server time:	Sat, 8 Feb 2020 02:51:48 +0000

You will see an error : unsupported pickle protocol: 4 . , it turns out that the docker instance is using python3 while my standalone is using version 2.7.5. python3 have many protocol number for pickle , it can go from 0 to 5 , while python 2 can go only from 0-3

My fixes is to upgrade my python to python3

Leave a Reply

Your email address will not be published. Required fields are marked *