Build Cloud-Native apps with Apache Cassandra

GOT QUESTIONS from the Workshop? You're in the right place! Post a question here and we'll get you answers.

Click here for Week 8 Materials and Homework.

Follow us on Eventbrite to get notified when new workshops are scheduled!


DA avatar image
DA asked Erick Ramirez edited

Error connecting to containers in step 5i of week 6 exercise

Handling connection for 9090

E0807 17:35:43.508163  649090 portforward.go:400] an error occurred forwarding 9090 -> 9090: error forwarding port 9090 to pod 784c7c9d75560b5022012a2220cbdf6a9056710ce4f9aeebdf14a4a52902d040, uid : failed to execute portforward in network namespace "/var/run/netns/cni-bcf21203-d5fa-febb-8c26-0cecf881146d": socat command returns error: exit status 1, stderr: "2020/08/07 17:35:43 socat[19027] E connect(5, AF=2, 16): Connection refused\n"
Message 'The Connection was reset' at <instance>:9090 and <instance>:9090/api

Above text at the kubectl console.

Please help. Thanks!

10 |1000

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

1 Answer

bettina.swynnerton avatar image
bettina.swynnerton answered

Hi @DA,

it looks like the pod is not serving on port 9090.

We made a couple of changes to accommodate blocked and open ports on the cloud instance, and some changes were made in the code yesterday.

It's possible that you are seeing this error, because your github repo on the cloud instance has not been updated with the changes that we made, and the docker image that you use for the astra-backend pod is not actually serving on port 9090, but still on 5000.

You can verify this by navigating into the getting-started-with-astra-python folder and check the last line in the file Here we define the port.

If this line still mentions port 5000, your repo is out of date and won't match the port assignments that we use in the kubernetes yamls.

To fix this: Do a git pull on the cloud instance. If you made any changes to files, for example the changes to 05-configMap.yaml, make a backup copy of the file first, then to proceed git stash, git pull and reinstate your modified 05-configMap.yaml

Note: you do not need to delete your kubernetes cluster, and if you have already set up your Cassandra cluster, you can keep it all running. But you will need to rebuild both your backend and ui docker images, load them both into the kind cluster again, delete your backend and ui pods and recreate them with the new images.

Then do a port forward again, and I am confident that this will resolve the issue that you are seeing.

Here is more information about the changes that we made:

I hope this gets you on the right track.

10 |1000

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.