0

I'm trying to work with Apache Ignite and use it to cache data from Bigquery. To understand how it works, I started with the steps here: https://apacheignite.readme.io/docs/docker-deployment to get the Ignite server up and running. Then, I followed the steps here: https://apacheignite.readme.io/docs/memcached-support#python just to see if I could see what I was supposed to and then move on to more involved coding.

However, with the sample code provided, I run into this error:

ConnectionErrorTraceback (most recent call last)
<ipython-input-11-44ed3158fbe9> in <module>()
      3 client = pylibmc.Client (["127.0.0.1:11211"], binary=True)
      4 
----> 5 client.set("key", "val")
      6 
      7 print "Value for 'key': %s"%client.get("key")

ConnectionError: error 3 from memcached_set: (0x27a87b0) CONNECTION FAILURE(Connection refused),  host: 127.0.0.1:11211 -> libmemcached/connect.cc:156

What am I doing wrong?

How I connect to GCP:

  1. I have Google's Datalab set up as a VM. I start the VM.
  2. I use the Secure Shell extension to port forward and connect to the VM.
  3. I start the Apache Ignite server using the steps in the first link.
  4. I access the Datalab notebooks etc by typing: localhost:8081 and create a new notebook with the code posted in the second link.
  5. I get an error.

I guess the port number should be changed in the connection parameters? I've tried all sorts of combinations, but to no avail. Should I be using the VM's internal/external IP address instead? Please advise.

Vadim Kotov
  • 8,084
  • 8
  • 48
  • 62
CodingInCircles
  • 2,565
  • 11
  • 59
  • 84
  • I would first get it to work without Docker if I was you. Try running both things locally. Check if the port is open when Ignite starts by running `netstat`. – alamar Jan 23 '18 at 09:10
  • Thanks @alamar! I'll try that and see if it works. I abandoned the Docker approach too. Yet to try out the barebones approach. – CodingInCircles Jan 23 '18 at 13:58

0 Answers0