Hey Sergei
Many thanks. Putting in the actual ip in the bind worked fine when
specifying either the ip or the hostname in connection statement.
I still don't understand what the bind is for and what I have to do to
make redis accessible while running on another server from the main
application. I would have thought the hostname (and port) would be
enough but apparently only enough if redis is bound to the correct ip.
Seems like redundancy to me.
Is there a security risk in commenting out the bind statement in
redis.conf?
Kind regards
Mark
On Oct 23, 4:45 pm, Sergei Tulentsev <
sergei.tulent...@gmail.com>
wrote:
> try 127.0.0.1
> Also, what is redis set up to bind to? This is excerpt from my config file.
> In this case, it will listen only on 10.0.0.1
>
> # If you want you can bind a single interface, if the bind option is not
> # specified all the interfaces will listen for incoming connections.
> #
> # bind 127.0.0.1
> bind 10.0.0.1
>
>
>
>
>
>
>
>
>
> On Sun, Oct 23, 2011 at 10:28 AM, dukha <
mplen...@gmail.com> wrote:
> > Hi
> > I'm running redis on my development machine using redis gem.
>
> > I've just switched from suse to ubuntu and am having trouble getting redis
> > to work the same as on suse.
>
> > In a terminal
> > $>*hostname *gives highfield-45
> > however
> > in ruby console
> > irb> *r = Redis.new(:password=>'abcdef', :db=>0, :port => 6379, :host
> > =>'highfield-45')*
> > gives Errno::ECONNREFUSED: Connection refused - Unable to connect to Redis
> > on highfield-45:6379
>
> > irb> *r = Redis.new(:password=>'abcdef', :db=>0, :port => 6379, :host
> > =>'localhost')*
> > gives a valid connection
>
> > $> *hostname -i *gives 127.0.1.1
> > but
> > irb>*r = Redis.new(:password=>'abcdef', :db=>0, :port => 6379, :host
> > =>'127.0.1.1')*