Anyone has any experience with Python and Postgres, specifically Reddit Code?

Posted June 29, 2013 6.6k views
Hello, I'm trying to install Reddit Code ( on Ubuntu 12.04. I already installed it locally on my laptop and it worked, the process was smooth. But now that I'm trying it on a live node, I keep getting errors regarding Cassandra. It says that Cassandra cannot connect to localhost port 9160. I didn't have that problem when I worked with locally. Reddit Code requires a list of dependencies for it to work: They even have an automated installation script for Ubuntu 12.04: But I guess you need to install the dependencies manually first before you run that script. Thank you for your time.

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Submit an Answer
10 answers
You can run the automated installation script before installing the dependencies, it'll install them for you.

Make sure you run it on a fresh new droplet. Let me know how it goes for you.
I created a new droplet and ran the automated script

chmod +x

I changed the domain name from reddit.local to my ip address

Now if you goto you get a big list of errors
InvalidRequestException: InvalidRequestException(why='ModActionBySR already exists in keyspace reddit')
Sorry the domain was set to a different IP address, I fixed it and now I'm getting this error.

AllServersUnavailable: An attempt was made to connect to each of the servers twice, but none of the attempts succeeded. The last failure was TTransportException: Could not connect to
@george.semaan: Run "netstat -plutn" - is there anything listening on port 9160?
It looks like Cassandra has crashed - try resizing your droplet to a larger plan with more RAM.
No, looks like nothing is listening on that port. Do you think 1GB ram will do the job?

Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0* LISTEN 10154/memcached
tcp 0 0* LISTEN 13905/haproxy
tcp 0 0* LISTEN 11513/beam
tcp 0 0* LISTEN 11500/epmd
tcp 0 0* LISTEN 681/sshd
tcp 0 0* LISTEN 11051/postgres
tcp 0 0* LISTEN 31128/python
tcp6 0 0 :::22 :::* LISTEN 681/sshd
tcp6 0 0 :::5672 :::* LISTEN 11513/beam
udp 0 0* 10154/memcached
Try resizing to 1GB, you can always scale down later (I don't recommend that since it doesn't seem like 512MB is enough for your application).
Yes, it seems that it's working.
Thank you.
Awesome! Really glad to hear that. :]
I seem to be getting the same exact issues on

Same exact error, same exact netstat output. I'm also already on the 1 gig plan. Any ideas?
@matthewh00lmes: I'm seeing RoR's welcome page -- are you still experiencing the issue?