ptwobrussell / Mining-the-Social-Web

The official online compendium for Mining the Social Web (O'Reilly, 2011)
http://bit.ly/135dHfs
Other
1.21k stars 491 forks source link

Redis difficulties #47

Closed HughJordan closed 11 years ago

HughJordan commented 11 years ago

Hi, having problems getting Redis to work with Windows. Every time I try and run your code containing Redis I get an error message - can't connect to port 6379. From looking at some posts online I'm guessing that for some reason Redis isn't installed where it would usually be expected to be found - is there a way I can check whee it is installed and move it to port 6379. Thanks for your help - and great book btw, really enjoying it!

ptwobrussell commented 11 years ago

When you start Redis as a service on the console, it logs some messages that tell you which port it is listening on. Can you copy and paste those messages into this ticket?

On Apr 19, 2013, at 1:46 AM, HughJordan notifications@github.com wrote:

Hi, having problems getting Redis to work with Windows. Every time I try and run your code containing Redis I get an error message - can't connect to port 6379. From looking at some posts online I'm guessing that for some reason Redis isn't installed where it would usually be expected to be found - is there a way I can check whee it is installed and move it to port 6379. Thanks for your help - and great book btw, really enjoying it!

— Reply to this email directly or view it on GitHub.

HughJordan commented 11 years ago

When I try and load up Redis it says: Could not connect to Redis at 127.0.0.1:6379: Unknown error not connected

If I type 'redis-server into the command prompt, it says: 'redis-server' is not recognised as an internal or external command...

On Python the error message when I try to run redis reads: ConnectionError: Error 10061 connecting localhost:6379. No connection could be made because the target machine actively refused it.

ptwobrussell commented 11 years ago

It sounds as though you were not able to start Redis as a server process at all, which is a prerequisite to doing anything in Python. We first need to get the server running.

You should be able to go to the directory where you installed Redis in a command prompt and start the server. If the command is not recognized, it probably means you were not in the right directory when you typed the command

Pardon me for asking, but have you done very much work with developer tools or in a terminal? I ask because it will help me to better help you as we troubleshoot things.

On Apr 22, 2013, at 3:29 PM, HughJordan notifications@github.com wrote:

When I try and load up Redis it says: Could not connect to Redis at 127.0.0.1:6379: Unknown error not connected

If I type 'redis-server into the command prompt, it says: 'redis-server' is not recognised as an internal or external command...

On Python the error message when I try to run redis reads: ConnectionError: Error 10061 connecting localhost:6379. No connection could be made because the target machine actively refused it.

— Reply to this email directly or view it on GitHub.

HughJordan commented 11 years ago

No, very new to developer tools/using terminals. Don't worry about putting things in layman terms - it would be appreciated, in fact! Thanks.

On 22 Apr 2013, at 23:26, "Matthew A. Russell" notifications@github.com wrote:

It sounds as though you were not able to start Redis as a server process at all, which is a prerequisite to doing anything in Python. We first need to get the server running.

You should be able to go to the directory where you installed Redis in a command prompt and start the server. If the command is not recognized, it probably means you were not in the right directory when you typed the command

Pardon me for asking, but have you done very much work with developer tools or in a terminal? I ask because it will help me to better help you as we troubleshoot things.

On Apr 22, 2013, at 3:29 PM, HughJordan notifications@github.com wrote:

When I try and load up Redis it says: Could not connect to Redis at 127.0.0.1:6379: Unknown error not connected

If I type 'redis-server into the command prompt, it says: 'redis-server' is not recognised as an internal or external command...

On Python the error message when I try to run redis reads: ConnectionError: Error 10061 connecting localhost:6379. No connection could be made because the target machine actively refused it.

— Reply to this email directly or view it on GitHub. — Reply to this email directly or view it on GitHub.

ptwobrussell commented 11 years ago

Ok, so just to be clear, it sounds as though you haven't managed to start the Redis server on your Windows environment, which is a prerequisite to running some of the Python code.What that means is that it's not enough to just download the code and "install it". You actually need to find the redis-server command from your Windows Command Prompt and execute that command so that the Redis server starts. Does this make sense? If you have never worked in a terminal (command prompt) before, then this will probably stretch some of your limits, but it's a good exercise and introduction in software development. I don't run Windows myself, so it's a bit challenging for me to do a lot more than try to coach you through this, but I will try to get you to the point that you can run it. I'd recommend starting out with a tutorial something like this one: http://www.bleepingcomputer.com/tutorials/windows-command-prompt-introduction/

On Apr 23, 2013, at 4:25 PM, HughJordan notifications@github.com wrote:

No, very new to developer tools/using terminals. Don't worry about putting things in layman terms - it would be appreciated, in fact! Thanks.

On 22 Apr 2013, at 23:26, "Matthew A. Russell" notifications@github.com wrote:

It sounds as though you were not able to start Redis as a server process at all, which is a prerequisite to doing anything in Python. We first need to get the server running.

You should be able to go to the directory where you installed Redis in a command prompt and start the server. If the command is not recognized, it probably means you were not in the right directory when you typed the command

Pardon me for asking, but have you done very much work with developer tools or in a terminal? I ask because it will help me to better help you as we troubleshoot things.

On Apr 22, 2013, at 3:29 PM, HughJordan notifications@github.com wrote:

When I try and load up Redis it says: Could not connect to Redis at 127.0.0.1:6379: Unknown error not connected

If I type 'redis-server into the command prompt, it says: 'redis-server' is not recognised as an internal or external command...

On Python the error message when I try to run redis reads: ConnectionError: Error 10061 connecting localhost:6379. No connection could be made because the target machine actively refused it.

— Reply to this email directly or view it on GitHub. — Reply to this email directly or view it on GitHub. — Reply to this email directly or view it on GitHub.

HughJordan commented 11 years ago

Hi, When I started redis yesterday it worked. Not sure why as i hadn't done anything different to previous attempts. I worked through the exercises on the bleeping computer link you sent anyhow which was a useful intro to using the command prompt. Thanks for your help.

On 24 April 2013 16:03, Matthew A. Russell notifications@github.com wrote:

Ok, so just to be clear, it sounds as though you haven't managed to start the Redis server on your Windows environment, which is a prerequisite to running some of the Python code.What that means is that it's not enough to just download the code and "install it". You actually need to find the redis-server command from your Windows Command Prompt and execute that command so that the Redis server starts. Does this make sense? If you have never worked in a terminal (command prompt) before, then this will probably stretch some of your limits, but it's a good exercise and introduction in software development. I don't run Windows myself, so it's a bit challenging for me to do a lot more than try to coach you through this, but I will try to get you to the point that you can run it. I'd recommend starting out with a tutorial something like this one: http://www.bleepingcomputer.com/tutorials/windows-command-prompt-introduction/

On Apr 23, 2013, at 4:25 PM, HughJordan notifications@github.com wrote:

No, very new to developer tools/using terminals. Don't worry about putting things in layman terms - it would be appreciated, in fact! Thanks.

On 22 Apr 2013, at 23:26, "Matthew A. Russell" notifications@github.com wrote:

It sounds as though you were not able to start Redis as a server process at all, which is a prerequisite to doing anything in Python. We first need to get the server running.

You should be able to go to the directory where you installed Redis in a command prompt and start the server. If the command is not recognized, it probably means you were not in the right directory when you typed the command

Pardon me for asking, but have you done very much work with developer tools or in a terminal? I ask because it will help me to better help you as we troubleshoot things.

On Apr 22, 2013, at 3:29 PM, HughJordan notifications@github.com wrote:

When I try and load up Redis it says: Could not connect to Redis at 127.0.0.1:6379: Unknown error not connected

If I type 'redis-server into the command prompt, it says: 'redis-server' is not recognised as an internal or external command...

On Python the error message when I try to run redis reads: ConnectionError: Error 10061 connecting localhost:6379. No connection could be made because the target machine actively refused it.

— Reply to this email directly or view it on GitHub. — Reply to this email directly or view it on GitHub. — Reply to this email directly or view it on GitHub.

— Reply to this email directly or view it on GitHubhttps://github.com/ptwobrussell/Mining-the-Social-Web/issues/47#issuecomment-16936531 .

ptwobrussell commented 11 years ago

So you are good now? Let me know if not, and we can work on another issue. Thanks!