problem while connecting to memcache servers over network

hemant gethemant at
Wed Jul 18 14:38:39 UTC 2007


I am using ruby memcache client, for connecting to
memcache servers.

I am attempting to connect to a memcache server located in another
machine, through internet( so no its not also in same domain and all).
Although I can open telnet prompt from the same machine at port 11211,
but memcache throws error when attempting to make a connection to the
same machine at same port:

`request_setup': No connection to server (MemCache::MemCacheError)
        from /usr/local/lib/ruby/gems/1.8/gems/memcache-client-1.3.0/lib/memcache.rb:199:in
        from a.rb:23

My code is:

require "rubygems"
require "memcache"

memcache_options = {
  :c_threshold => 10_000,
  :compression => true,
  :debug => false,
  :namespace => 'bekar_data',
  :readonly => false,
  :urlencode => false

CACHE.servers = ""

if ARGV.include?("-d")
  puts "Here"
  CACHE["22120192091291ahae-1"] = "3232"
  puts CACHE["22120192091291ahae-1"]
  puts CACHE["22120192091291ahae-1"]

More information about the memcached mailing list