Couchbase
  • Why NoSQL?
  • Couchbase Server
  • Download
  • Resources
  • Careers
Home | Forums | Membase | Memcached Server 1.0.3

Problems storing any value.

9 replies [Last post]
  • Login or register to post comments
Tue, 06/15/2010 - 05:38
rally25rs
Offline
Joined: 06/11/2010
Groups: None

I'm sure I'm just overlooking something simple here, but I have a plain Membase server install on my local machine. Using netstat or SysInternals TCPView, I can see NorthCache listening on 0.0.0.0 ports 11211, 11212, and 8080.

My client is a C# assembly with Enyim 2.0 beta.

This is my client config:

-----
[CODE]

[/CODE]
-----

And this is my client code (as an NUnit test). The call to MembaseClient.Store() is returning false...

-----
[CODE] [Test]
public void StoreAndGet()
{
using (var cache = new Membase.Store.MembaseClient())
{
var res = cache.Store(Enyim.Caching.Memcached.StoreMode.Set, "key", "value");
var i = cache.Get("key");
Assert.IsTrue(res); // res == false here.
Assert.AreEqual("value", i); // i == null here.
}
}[/CODE]
-----

Back in TCPView I can see the client briefly make a connection to port 8080. I have also tried this using a non-default bucket with the same result. If I change the client config to a bucket that doesn't exist, then I get an error saying no pool URIs were responding, so I know the client is at least establishing the connection and resolving the bucket. The Membase console shows 0 operations against the cluster though.

Any ideas as to what I might be doing wrong? Thanks for any help!

-Jeff

Top
Tue, 06/15/2010 - 06:20
rally25rs
Offline
Joined: 06/11/2010
Groups: None

I don't know if this helps at all, but I ran my unit test and then immediately ran dump_logs.bat. This is the output from the second during the test run.

[CODE]
INFO REPORT <6099.116.0> 2010-06-15 09:14:28
===============================================================================

stats_collector dropped 1 messages.

INFO REPORT <6099.116.0> 2010-06-15 09:14:38
===============================================================================

stats_collector dropped 1 messages.

INFO REPORT <6099.190.0> 2010-06-15 09:14:38
===============================================================================

menelaus_web streaming: {struct,
[{name,<<"default">>},
{uri,<<"/pools/default/buckets/default">>},
{streamingUri,
<<"/pools/default/bucketsStreaming/default">>},
{flushCacheUri,
<<"/pools/default/buckets/default/controller/doFlush">>},
{basicStats,
{struct,
[{cacheSize,64},
{opsPerSec,0.0},
{evictionsPerSec,0.0},
{cachePercentUsed,0.0}]}},
{nodes,
[{struct,
[{hostname,<<"10.2.12.45">>},
{status,<<"healthy">>},
{uptime,<<"3798">>},
{version,<<"1.0.3">>},
{os,<<"windows">>},
{memoryTotal,3745693696},
{memoryFree,2160316416},
{mcdMemoryReserved,64},
{mcdMemoryAllocated,0},
{ports,
{struct,[{proxy,11212},{direct,11211}]}}]}]},
{stats,
{struct,
[{uri,
<<"/pools/default/buckets/default/stats">>}]}}]}

INFO REPORT <6099.190.0> 2010-06-15 09:14:39
===============================================================================

menelaus_web streaming socket closed

INFO REPORT <6099.71.0> 2010-06-15 09:14:39
===============================================================================

menelaus_event watcher down.
INFO REPORT <6099.71.0> 2010-06-15 09:14:39
===============================================================================

menelaus_event watcher down: <6099.190.0> on node 'ns_1@10.2.12.45'

INFO REPORT <6099.71.0> 2010-06-15 09:14:39
===============================================================================

mc_pool_init handle_info({'DOWN',#Ref<6099.0.0.76145>,process,<6099.190.0>,
normal}, {state})

INFO REPORT <6099.71.0> 2010-06-15 09:14:39
===============================================================================

ns_port_init unhandled message: {'DOWN',#Ref<6099.0.0.76145>,process,
<6099.190.0>,normal}...

INFO REPORT <6099.71.0> 2010-06-15 09:14:39
===============================================================================

handle_info({'DOWN',#Ref<6099.0.0.76145>,process,<6099.190.0>,normal}, {state,
[{pools,
[{'_ver',
{1276,
607511,
348980}},
{"default",
[{port,
11212},
{buckets,
[{"default",
[{auth_plain,
{"default",
"default"}},
{size_per_node,
64}]}]}]}]}]})

INFO REPORT <6099.71.0> 2010-06-15 09:14:39
===============================================================================

handle_info({'DOWN',#Ref<6099.0.0.76145>,process,<6099.190.0>,normal}, {state,
[{"default",
[{auth_plain,
{"default",
"default"}},
{size_per_node,
64}]}],
"./priv/isasl.pw",
1,
"_admin",
"_admin"})

INFO REPORT <6099.78.0> 2010-06-15 09:14:39
===============================================================================

menelaus_event watcher down.
INFO REPORT <6099.78.0> 2010-06-15 09:14:39
===============================================================================

menelaus_event watcher down: <6099.190.0> on node 'ns_1@10.2.12.45'

INFO REPORT <6099.78.0> 2010-06-15 09:14:39
===============================================================================

mc_pool_init handle_info({'DOWN',#Ref<6099.0.0.76147>,process,<6099.190.0>,
normal}, {state})

INFO REPORT <6099.78.0> 2010-06-15 09:14:39
===============================================================================

handle_info(ns_node_disco_log, {'DOWN',#Ref<6099.0.0.76147>,process,
<6099.190.0>,normal}, {state})

[/CODE]

Interestingly, the message "stats_collector dropped 1 messages." appears in the dumped logs just about every 10 seconds, continuously. Not sure if that is normal...?

Top
Tue, 06/15/2010 - 10:13
rally25rs
Offline
Joined: 06/11/2010
Groups: None

Another round of adding details to my issue...

I also tried:
* disabling Windows Firewall
* using my actual IP address instead of localhost/loopback
* trying a different bucket, instead of default
* specifying a userName and password
None of these fixed the issue.

I added a 2nd configuration section to my app.config to use the regular Enyim MemcachedClient, and the regular memcached client works fine against port 11211...

[CODE]

[/CODE]

[CODE]
[Test] // this test FAILS
public void StoreAndGet_NorthScale()
{
using (var cache = new NorthScale.Store.NorthScaleClient())
{
var res = cache.Store(Enyim.Caching.Memcached.StoreMode.Set, "key", "value");
var i = cache.Get("key");
Assert.IsTrue(res); // res == false here.
Assert.AreEqual("value", i); // i == null here.
}
}

[Test] // this test PASSES
public void StoreAndGet_Memcached()
{
using (var cache = new Enyim.Caching.MemcachedClient())
{
var res = cache.Store(Enyim.Caching.Memcached.StoreMode.Set, "key", "value");
var i = cache.Get("key");
Assert.IsTrue(res); // res == true here.
Assert.AreEqual("value", i); // i == "value" here.
}
}
[/CODE]

I also have a "log4net" section in my app.config, but Enyim client doesn't seem to log anything for either the NorthScale or the plain Memcached clients.

Top
Tue, 06/15/2010 - 10:26
Perry Krug
Offline
Joined: 06/02/2010
Groups: None

Hey Jeff, I'm taking a look into this now. Just didn't want you to feel unloved...

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 Membase: http://www.membase.com/products-and-services/overview
Call or email "sales -at- membase -dot- com" today!

Top
Tue, 06/15/2010 - 10:28
Perry Krug
Offline
Joined: 06/02/2010
Groups: None

While I look, would you mind reading through this thread, I think it may help: [url]http://forums.northscale.com/showthread.php?48-Problems-with-initial-setup&highlight=problems+initial+setup[/url]

__________________

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 Membase: http://www.membase.com/products-and-services/overview
Call or email "sales -at- membase -dot- com" today!

Top
Wed, 06/16/2010 - 05:58
rally25rs
Offline
Joined: 06/11/2010
Groups: None

I finally figured out my issue. This is all happening on my development laptop (putting together a proof-of-concept / evaluation) which has a dynamic IP address. I hadn't noticed it before because the NS web console always showed my 1 cluster node with a correct LAN IP address, but my IP must have changed at some point. I was working from home yesterday and noticed the web console was still showing my work/office IP even though I was now on my home lan which would have been a 192.168.0.0 address instead. This made me realize that the web console was working fine, and the client was hitting the web console, since it was using a URI of [url]http://localhost[/url], and the web console listens on all IPs (0.0.0.0:8080), but then it couldnt forward on to the physical IP of the cluster node.

I followed the directions from this post: [URL=http://forums.northscale.com/showthread.php?10-Windows-2008-NLB-cluster]http://forums.northscale.com/showthread.php?10-Windows-2008-NLB-cluster[/URL]
And registered with the address 127.0.0.1. This now allows my local development to work regardless of whether or not I have a network connection at all. Of course, it also means no one else can use the cache on my machine, but thats fine since this won't be a production server. Once I install on a server with a static IP, everything should work out fine.

Command line to duplicate what I did:
(must run console as admin if Vista, Win 7, Server 2008, etc)
[CODE]
cd "\Program Files\NorthScale\Memcached Server\bin"
service_stop.bat
service_unregister.bat
del ..\config\ns_1\*
service_register.bat ns_1@127.0.0.1
cd bin
service_start.bat
[/CODE]

Sorry for all the churn, but it makes total sense in the end!

Top
Wed, 06/16/2010 - 21:14
ingenthr
Offline
Joined: 03/16/2010
Groups:

rally25rs;339 wrote:
Of course, it also means no one else can use the cache on my machine, but thats fine since this won't be a production server. Once I install on a server with a static IP, everything should work out fine.

We actually provide data services to the cache by all IPs on the system, but your system will now identify itself to other systems (if you try to cluster) as 127.0.0.1. I think this is perfectly fine since you won't be clustering and this is for development, but did want to let you know that it is not a mechanism to restrict which IPs the system listens on.

Happy developing!

Top
Thu, 06/17/2010 - 09:13
rally25rs
Offline
Joined: 06/11/2010
Groups: None

I had posted another reply to this thread 2 days ago, but it never showed up?

Anyway, I ended up figuring out what my issue was. For putting together a demo / proof-of-concept for using NorthScale, I had installed it on my development computer, which has a dynamic IP address. When the Memcached node was registered with the cluster, it was registered with the current LAN IP address. At some point my IP must have changed, so the cluster could no longer communicate with the node.

To resolve this, I followed the instructions from this thread: [URL=http://forums.northscale.com/showthread.php?10-Windows-2008-NLB-cluster]http://forums.northscale.com/showthread.php?10-Windows-2008-NLB-cluster[/URL] and re-registered the node with the IP address of 127.0.0.1, so that it will always work locally, no matter what network I am connected to. This works perfectly for local development.

Top
Thu, 06/17/2010 - 09:31
Perry Krug
Offline
Joined: 06/02/2010
Groups: None

Glad to hear you got it all sorted out. Definitely good information for an FAQ or best practices guide!

Thanks!

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 Membase: http://www.membase.com/products-and-services/overview
Call or email "sales -at- membase -dot- com" today!

Top
Thu, 06/17/2010 - 13:42
Perry Krug
Offline
Joined: 06/02/2010
Groups: None

rally:
Sorry, but your post got moderated for some reason. I just found it and let it through. I also changed some settings to hopefully prevent that in the future.

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 Membase: http://www.membase.com/products-and-services/overview
Call or email "sales -at- membase -dot- com" today!

Top
  • 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