Couchbase
  • Why NoSQL?
  • Couchbase Server
  • Download
  • Resources
  • Careers
Home | Forums | Membase | Membase Server 1.7.x

Membase Server reconnecting very often

3 replies [Last post]
  • Login or register to post comments
Sat, 09/03/2011 - 05:11
srividhyau
Offline
Joined: 08/31/2011
Groups: None

I configured a membase server with a default memcached bucket. I am trying to connect with Java SDK MemcachedClient.

This is the code that i am using to connect

            ArrayList<URI> baseURIs = new ArrayList<URI>();
            baseURIs.add(new URI("http://localhost:8091/pools"));
            cache = new MemcachedClient(baseURIs, "default", "");

2011-09-03 17:31:02.562 INFO net.spy.memcached.MemcachedConnection: Added {QA sa=/192.168.1.2:11210, #Rops=0, #Wops=0, #iq=0, topRop=null, topWop=null, toWrite=0, interested=0} to connect queue
2011-09-03 17:31:03.359 INFO net.spy.memcached.MemcachedConnection: Connection state changed for sun.nio.ch.SelectionKeyImpl@2b5ac3c9
2011-09-03 17:31:03.359 INFO net.spy.memcached.MemcachedConnection: Reconnecting due to failure to connect to {QA sa=/192.168.1.2:11210, #Rops=0, #Wops=3, #iq=0, topRop=null, topWop=net.spy.memcached.protocol.binary.FlushOperationImpl@219ce060, toWrite=0, interested=0}
java.net.ConnectException: Connection refused: no further information
at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:567)
at net.spy.memcached.MemcachedConnection.handleIO(MemcachedConnection.java:414)
at net.spy.memcached.MemcachedConnection.handleIO(MemcachedConnection.java:278)
at net.spy.memcached.MemcachedClient.run(MemcachedClient.java:1981)
2011-09-03 17:31:03.359 WARN net.spy.memcached.MemcachedConnection: Closing, and reopening {QA sa=/192.168.1.2:11210, #Rops=0, #Wops=3, #iq=0, topRop=null, topWop=net.spy.memcached.protocol.binary.FlushOperationImpl@219ce060, toWrite=0, interested=0}, attempt 1.

This reconnects continuously.

Is there any other configuration for re-connect attempts?

Top
  • Login or register to post comments
Sat, 09/03/2011 - 13:29
mikew
Offline
Joined: 03/14/2011
Groups:

Can you check and see if you can telnet to Membase?

telnet localhost 11211

It seems like this might be a firewall issue. Also, I assume 192.168.1.2 was your ip for localhost.

Top
  • Login or register to post comments
Sun, 09/04/2011 - 02:05
srividhyau
Offline
Joined: 08/31/2011
Groups: None

The telnet to 11211 did work after i added a rule to the firewall.
Hi have a enabled the dynamic ip generation for my network. and now my ip seems to be 191.168.1.7 but still the code tries to connect to 192.168.1.2: 11210

I do not know where it is picking it up from. I tried connecting using the ip 192.168.1.7 as well but still it is using only the 1.2 ip.

Do u know why?

Top
  • Login or register to post comments
Tue, 09/06/2011 - 17:29
perry
Offline
Joined: 10/11/2010
Groups:

When Membase is configured the first time, it picks an IP address available on the system. It uses this IP address both internally, and also to communicate with other nodes in a cluster.

If that IP address changes, not only will the original node not work, but any other node that was configured to talk to it won't be able to find it.

Basically, don't deploy Membase on systems whose IP address is changing (likely via DHCP).

If you have to do that for development purposes, you can follow this link: http://www.couchbase.org/forums/thread/issues-dhcp-development-laptop

Perry

__________________

Forum support is great for free but sometimes you need a guaranteed response time and dedicated resources for your questions or issues.
Consider purchasing enterprise-level support from Couchbase: http://www.couchbase.com/products-and-services/overview
Call or email "sales -at- couchbase-dot- com" today!

Top
  • Login or register to post comments
  • Login or register to post comments
  • Login
  • Register

Company

  • About Us
  • Leadership
  • Customers
  • Partners
  • Contact Us

Product

  • Couchbase Server
  • Couchbase SDKs
  • Use Cases
  • Documentation
  • Forums

Open Source

  • Couchbase Project
  • Couchbase vs. CouchDB

Commercial

  • Subscriptions & Support
  • Training & Services

News

  • Blog
  • Newsletter
  • Press Releases
  • Buzz

Follow Us

    
  • Customer Login
  • Terms of Service
  • Privacy Policy
  • Trademark Policy
  • Site Map

© 2013 COUCHBASE All rights reserved.

Sign in to Couchbase Community

close
  • Create new account
  • Request new password
You are logging into the Forums, Wiki and Issue Tracker