Question

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

  • Posted June 29, 2013

Hello,

I’m trying to install Reddit Code (https://github.com/reddit/reddit) 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: https://github.com/reddit/reddit/wiki/Dependencies They even have an automated installation script for Ubuntu 12.04: https://github.com/reddit/reddit/wiki/reddit-install-script-for-Ubuntu

But I guess you need to install the dependencies manually first before you run that script.

Thank you for your time.

Subscribe
Share

Submit an answer
You can type!ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

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.

@matthewh00lmes: I’m seeing RoR’s welcome page – are you still experiencing the issue?

I seem to be getting the same exact issues on http://192.241.239.6/ <br> <br>Same exact error, same exact netstat output. I’m also already on the 1 gig plan. Any ideas?

Awesome! Really glad to hear that. :]

Yes, it seems that it’s working. <br>Thank you.

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).

No, looks like nothing is listening on that port. Do you think 1GB ram will do the job? <br> <br>Active Internet connections (only servers) <br>Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name <br>tcp 0 0 127.0.0.1:11211 0.0.0.0:* LISTEN 10154/memcached <br>tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN 13905/haproxy <br>tcp 0 0 0.0.0.0:46065 0.0.0.0:* LISTEN 11513/beam <br>tcp 0 0 0.0.0.0:4369 0.0.0.0:* LISTEN 11500/epmd <br>tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 681/sshd <br>tcp 0 0 127.0.0.1:5432 0.0.0.0:* LISTEN 11051/postgres <br>tcp 0 0 0.0.0.0:8001 0.0.0.0:* LISTEN 31128/python <br>tcp6 0 0 :::22 :::* LISTEN 681/sshd <br>tcp6 0 0 :::5672 :::* LISTEN 11513/beam <br>udp 0 0 127.0.0.1:11211 0.0.0.0:* 10154/memcached <br>

@george.semaan: Run “netstat -plutn” - is there anything listening on port 9160? <br>It looks like Cassandra has crashed - try resizing your droplet to a larger plan with more RAM.

Sorry the domain was set to a different IP address, I fixed it and now I’m getting this error. <br> <br>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 127.0.0.1:9160 <br> <br>http://37.139.5.27/

I created a new droplet and ran the automated script <br> <br>wget https://raw.github.com/reddit/reddit/master/install-reddit.sh <br>chmod +x install-reddit.sh <br>./install-reddit.sh <br> <br>I changed the domain name from reddit.local to my ip address 37.139.5.27 <br> <br>Now if you goto http://37.139.5.27/ you get a big list of errors <br> InvalidRequestException: InvalidRequestException(why=‘ModActionBySR already exists in keyspace reddit’)

You can run the automated installation script before installing the dependencies, it’ll install them for you. <br> <br>Make sure you run it on a fresh new droplet. Let me know how it goes for you.