当我尝试执行以下操作时:
using (var couch = new CouchbaseClient()) {
couch.ExecuteStore(StoreMode.Add, idList[0].Id, seralisedList[0], PersistTo.One);
}
我得到了
System.NullReferenceException was unhandled
HResult=-2147467261
Message=Object reference not set to an instance of an object.
Source=Couchbase
StackTrace:
at Couchbase.CouchbasePool.Couchbase.ICouchbaseServerPool.GetVBucket(String key)
at Couchbase.CouchbaseClient.Observe(String key, UInt64 cas, PersistTo persistTo, ReplicateTo replicateTo, ObserveKeyState persistedKeyState, ObserveKeyState replicatedState)
at Couchbase.CouchbaseClient.ExecuteStore(StoreMode mode, String key, Object value, PersistTo persistTo, ReplicateTo replciateTo)
at Couchbase.CouchbaseClient.ExecuteStore(StoreMode mode, String key, Object value, PersistTo persistTo)
at System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args)
at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
在检查CouchBaseClient.ExecuteGet("name1")
的返回值时,我注意到"Unable to locate node"
作为GetOperationResult
的消息
网络日志: http://pastebin.com/F1v1sMWU
App.Config中
<couchbase>
<servers bucket="default" bucketPassword="">
<add uri="http://192.168.0.48:8091/pools"/>
</servers>
</couchbase>
Couchbase Log4Net日志:
2014-02-25 09:17:01,499 [8] DEBUG Couchbase.CouchbasePool [(null)] <(null)> - Initializing Couchbase.CouchbasePool
2014-02-25 09:17:01,530 [8] DEBUG Couchbase.CouchbasePool [(null)] <(null)> - Starting Couchbase.CouchbasePool
2014-02-25 09:17:01,550 [8] DEBUG Couchbase.MessageStreamListener [(null)] <(null)> - Starting the listener. Queue=True
2014-02-25 09:17:01,553 [9] DEBUG Couchbase.MessageStreamListener [(null)] <(null)> - Started working.
2014-02-25 09:17:01,558 [9] DEBUG Couchbase.MessageStreamListener [(null)] <(null)> - Looking for the first working node.
2014-02-25 09:17:01,616 [9] DEBUG Couchbase.ConfigHelper [(null)] <(null)> - Found config for bucket default.
2014-02-25 09:17:01,617 [9] DEBUG Couchbase.MessageStreamListener [(null)] <(null)> - Resolved pool url http://192.168.0.48:8091/pools to http://192.168.0.48:8091/pools/default/bucketsStreaming/default?bucket_uuid=d8bd12df7bd818663d0fd85a200edabf
2014-02-25 09:17:01,617 [9] DEBUG Couchbase.MessageStreamListener [(null)] <(null)> - Start receiving messages.
2014-02-25 09:18:01,689 [9] DEBUG Couchbase.MessageStreamListener [(null)] <(null)> - ReadMessage failed with exception:
System.Net.WebException: The operation has timed out
at System.Net.HttpWebRequest.GetResponse()
at Couchbase.MessageStreamListener.ReadMessages(Uri heartBeatUrl, Uri configUrl)
at Couchbase.MessageStreamListener.ProcessPool()
2014-02-25 09:18:01,691 [9] DEBUG Couchbase.MessageStreamListener [(null)] <(null)> - Reached the retry limit, rethrowing.
System.Net.WebException: The operation has timed out
at System.Net.HttpWebRequest.GetResponse()
at Couchbase.MessageStreamListener.ReadMessages(Uri heartBeatUrl, Uri configUrl)
at Couchbase.MessageStreamListener.ProcessPool()
2014-02-25 09:18:01,698 [9] WARN Couchbase.MessageStreamListener [(null)] <(null)> - Current node 'http://192.168.0.48:8091/pools/default/bucketsStreaming/default?bucket_uuid=d8bd12df7bd818663d0fd85a200edabf' has failed.
2014-02-25 09:18:01,698 [9] DEBUG Couchbase.MessageStreamListener [(null)] <(null)> - Looking for the first working node.
2014-02-25 09:18:01,698 [9] WARN Couchbase.MessageStreamListener [(null)] <(null)> - Could not resolve url http://192.168.0.48:8091/pools; trying the next in the list
2014-02-25 09:18:01,698 [9] WARN Couchbase.MessageStreamListener [(null)] <(null)> - Could not found a working node.
2014-02-25 09:18:01,698 [9] WARN Couchbase.MessageStreamListener [(null)] <(null)> - All nodes are dead, sleeping for a while.
2014-02-25 09:18:01,699 [9] DEBUG Couchbase.BucketConfigListener [(null)] <(null)> - Everything failed in Couchbase.BucketConfigListener
2014-02-25 09:18:01,699 [9] INFO Couchbase.CouchbasePool [(null)] <(null)> - Received new configuration.
2014-02-25 09:18:01,702 [cbp_thread] INFO Couchbase.CouchbasePool [(null)] <(null)> - Config is empty, all nodes are down.
2014-02-25 09:18:01,702 [cbp_thread] DEBUG Couchbase.MessageStreamListener [(null)] <(null)> - Processing message:
2014-02-25 09:18:01,704 [8] DEBUG Couchbase.CouchbasePool [(null)] <(null)> - this.state was null, returning null node for key 'book::19510ce5-f890-45e9-b05c-2a35f1b05a0c'
访问http://192.168.0.48:8091/pools/default/bucketsStreaming/default?bucket_uuid=d8bd12df7bd818663d0fd85a200edabf
没有任何事情发生,直到超时。所以这似乎是根本原因。
答案 0 :(得分:0)
所以“修复”是破坏VM并再次构建它。只是卸载couchbase服务器似乎没有办法解决问题。
似乎问题是由于DHCP /没有静态IP。希望现在我已经保留了VM的DHCP租约,不会有任何进一步的问题。 (今天早上它改变了IP地址的变化。)