added detect for fail to connect couchbase