Specifying bucket causes Object null exception
I'm running into a weird issue and was hoping someone can help me with it. I've downloaded NSMS and got it to work locally with an application on my local machine using a bucket I created on the local server. I then downloaded the NSMS on a test server and updated my web.config file to use the server instead of my local machine as the NSMS. I'm getting an "object reference not set to an instance of an object" error on the server. However, if I remove the bucket attribute (or leave the value blank) I don't get the error but I don't get the cache either. The bucket does exist on the NSMS installed on the test server.
Following is the error code beginning with my code calling Enyim.Caching
at Enyim.Caching.Memcached.MemcachedNode.Execute(IOperation op) in d:\EnyimMemcached\Enyim.Caching\Memcached\MemcachedNode.cs:line 440
at Enyim.Caching.Memcached.MemcachedNode.Enyim.Caching.Memcached.IMemcachedNode.Execute(IOperation op) in d:\EnyimMemcached\Enyim.Caching\Memcached\MemcachedNode.cs:line 593
at Enyim.Caching.MemcachedClient.TryGet(String key, Object& value) in d:\EnyimMemcached\Enyim.Caching\MemcachedClient.cs:line 123
at Enyim.Caching.MemcachedClient.Get(String key) in d:\EnyimMemcached\Enyim.Caching\MemcachedClient.cs:line 94
at DistributedCacheClient.MCGMembaseCacheClient.Get(String key) in C:\source\DistributedCacheClient\DistributedCacheClient\MCGMembaseCacheClient.cs:line 19
Any help is greatly appreciated it
Thanks
Below is the web.config file. I get a page not found when I hit http://:8080/diag.html. In the web.config, you'll notice that I have both northscale and enyim but I'm using norhtscale at the moment.
Sorry, take off the ".html" from that URL...my fault.
Perry
per_node_diag = [{'ns_1@172.16.57.123',
[{version,
[{os_mon,"2.2.4"},
{kernel,"2.13.4"},
{emoxi,"1.0.3"},
{sasl,"2.1.8"},
{ns_server,"1.0.3"},
{dist_manager,"1.0.3"},
{menelaus,"1.0.3"},
{stdlib,"1.16.4"}]},
{config,
{config,
{full,"priv/config",undefined,ns_config_default},
[[{port_servers,
[{'_ver',{0,0,0}},
{memcached,"./bin/memcached/memcached",
["-E","./bin/bucket_engine/bucket_engine.so","-e",
"admin=_admin;engine=./bin/memcached/default_engine.so;default_bucket_name=default;auto_create=true",
"-p","11211","-B","auto"],
[{env,
[{"MEMCACHED_CHECK_STDIN","thread"},
{"MEMCACHED_TOP_KEYS","100"},
{"ISASL_PWFILE","./priv/isasl.pw"},
{"ISASL_DB_CHECK_TIME","1"},
{"EVENT_NOSELECT","1"}]},
{cd,"."}]}]}],
[{directory,
"c:/Program Files/NorthScale/Memcached Server/config"},
{rest,[{'_ver',{0,0,0}},{port,8080}]},
{rest_creds,[{'_ver',{0,0,0}},{creds,[]}]},
{isasl,[{'_ver',{0,0,0}},{path,"./priv/isasl.pw"}]},
{bucket_admin,
[{'_ver',{0,0,0}},{user,"_admin"},{pass,"_admin"}]},
{port_servers,
[{'_ver',{0,0,0}},
{memcached,"./priv/memcached",
["-p","11211","-E","./engines/bucket_engine.so",
"-e",
"admin=_admin;engine=./priv/engines/default_engine.so;default_bucket_name=default;auto_create=false",
"-B","auto"],
[{env,
[{"MEMCACHED_CHECK_STDIN","thread"},
{"MEMCACHED_TOP_KEYS","100"},
{"ISASL_PWFILE","./priv/isasl.pw"},
{"ISASL_DB_CHECK_TIME","1"}]}]}]},
{alerts,
[{'_ver',{0,0,0}},
{email,[]},
{email_alerts,false},
{email_server,
[{user,undefined},
{pass,undefined},
{addr,undefined},
{port,undefined},
{encrypt,false}]},
{alerts,
[server_down,server_unresponsive,server_up,
server_joined,server_left,bucket_created,
bucket_deleted,bucket_auth_failed]}]},
{pools,
[{'_ver',{0,0,0}},
{"default",
[{port,11212},
{buckets,
[{"default",
[{auth_plain,undefined},
{size_per_node,64}]}]}]}]},
{nodes_wanted,['ns_1@172.16.57.123']}]],
[[{otp,
[{'_ver',{1282,845674,273001}},
{cookie,yeukxmdrulkzfigo}]},
{rest,[{'_ver',{0,0,0}},{port,8080}]},
{rest_creds,[{'_ver',{0,0,0}},{creds,[]}]},
{port_servers,
[{'_ver',{0,0,0}},
{memcached,"./bin/memcached/memcached",
["-E","./bin/bucket_engine/bucket_engine.so","-e",
"admin=_admin;engine=./bin/memcached/default_engine.so;default_bucket_name=default;auto_create=true",
"-p","11211","-B","auto"],
[{env,
[{"MEMCACHED_CHECK_STDIN","thread"},
{"MEMCACHED_TOP_KEYS","100"},
{"ISASL_PWFILE","./priv/isasl.pw"},
{"ISASL_DB_CHECK_TIME","1"},
{"EVENT_NOSELECT","1"}]},
{cd,"."}]}]},
{alerts,
[{'_ver',{0,0,0}},
{email,[]},
{email_alerts,false},
{email_server,
[{user,undefined},
{pass,undefined},
{addr,undefined},
{port,undefined},
{encrypt,false}]},
{alerts,
[server_down,server_unresponsive,server_up,
server_joined,server_left,bucket_created,
bucket_deleted,bucket_auth_failed]}]},
{pools,
[{'_ver',{1282,845722,539001}},
{"default",
[{port,11212},
{buckets,
[{"default",
[{auth_plain,undefined},{size_per_node,64}]},
{"MCG_PlanFinder",
[{auth_plain,
{"MCG_PlanFinder","MCG_PlanFinder"}},
{size_per_node,64}]}]}]}]},
{nodes_wanted,['ns_1@172.16.57.123']}]],
ns_config_default}},
{basic_info,
[{version,
[{os_mon,"2.2.4"},
{kernel,"2.13.4"},
{emoxi,"1.0.3"},
{sasl,"2.1.8"},
{ns_server,"1.0.3"},
{dist_manager,"1.0.3"},
{menelaus,"1.0.3"},
{stdlib,"1.16.4"}]},
{system_arch,"windows"},
{wall_clock,2444},
{memory_data,{4025987072,936890368,{<0.115.0>,900796}}}]},
{memory,{4025987072,936890368,{<0.115.0>,900796}}},
{disk,[{"C:\\",78646172,34},{"D:\\",209712476,3}]}]}]
nodes_info = [{struct,[{hostname,<<"172.16.57.123">>},
{status,<<"healthy">>},
{uptime,<<"2444">>},
{version,<<"1.0.3">>},
{os,<<"windows">>},
{memoryTotal,4025987072},
{memoryFree,3089096704},
{mcdMemoryReserved,128},
{mcdMemoryAllocated,0},
{ports,{struct,[{proxy,11212},{direct,11211}]}},
{otpNode,<<"ns_1@172.16.57.123">>},
{otpCookie,<<"yeukxmdrulkzfigo">>}]}]
buckets = [{"MCG_PlanFinder",
[{auth_plain,{"MCG_PlanFinder","MCG_PlanFinder"}},
{size_per_node,64}]},
{"default",[{auth_plain,undefined},{size_per_node,64}]}]
logs:
-------------------------------
2010-08-26 14:01:14.430 ns_log:4:info:message - Log server started on node 'ns_1@172.16.57.123'
2010-08-26 14:02:02.539 mc_bucket:2:info:message - Bucket created: "MCG_PlanFinder" in pool: "default"
2010-08-26 14:02:02.555 menelaus_web:12:info:message - bucket created: "MCG_PlanFinder" in: "default"
2010-08-26 14:02:02.555 mc_pool:5:info:message - Pool reconfigured: "default"
2010-08-26 14:02:02.570 ns_config_log:1:info:message - Config changed on node 'ns_1@172.16.57.123'
Sorry. The following is the correct web.config
Do you have Windows Firewall or ICS client installed on the NSMS server?
Windows Firewall is turned off. Not sure how to check if ICS client is installed. I didn't see anything in Add or Remove Programs. The weird thing is that it was working yesterday.
Well that certainly is strange...are you able to telnet to the server on port 8080? Can you try setting a username and password for the server and adding that to the web.config? I've also seen some traffic that says the app.config file is the correct place for this configuration, as opposed to the web.config.
Perry
Specifying a username/password worked. Any thoughts on why?
Thanks,
-Wahid
Back to square one :-{..... I added a new node (my local machine) to the cluster of the server and it stopped working again. Removing my local machine from the cluster didn't resolve the issue.
This all sounds very strange...can you start with a clean installation of NSMS (one node), make sure that's working and build up from there? If you don't "secure" the server, you shouldn't need to supply a username/pass in the configuration.
We also have some known issues around NSMS running on a machine whose IP address changes (your local machine?) so it would be best to avoid that layer of complication.
Perry
Can you post the output of your web.config and the output of http://:8080/diag.html where is the IP address of your NSMS?
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!