C SDK on Windows Server 2003
Mon, 01/28/2013 - 08:43
Hello guys,
I have an C++ client for Couchbase that is running on Windows server 2003. If I run it on any other Windows version (7 or Server 2008) or even Linux it works just fine.
Our production systems are on Windows 2003 so only there is not working.
When I try to connect I receive this error:
Error from Couchbase lib 24 : Connection failed: Invalid argument
This is a code sample:
/*static*/ void Cache::error_callback(lcb_t /*instance*/, lcb_error_t error, const char *errinfo)
{
Log4Cpp::logError("Error from Couchbase lib %d : %s", error, errinfo ? errinfo : "NULL");
}
bool Cache::connectToServer(std::string bucketName)
{
struct lcb_create_st create_options;
memset(&create_options, 0, sizeof(create_options));
create_options.v.v0.host = Cache::m_couchBaseConfig.m_host.c_str ();
create_options.v.v0.user = Cache::m_couchBaseConfig.m_username.c_str ();
create_options.v.v0.passwd = Cache::m_couchBaseConfig.m_passwd.c_str ();
create_options.v.v0.bucket = bucketName.c_str ();
// Create CouchBase instance
lcb_error_t err = lcb_create(&m_couchBaseInstance, &create_options);
if (err != LCB_SUCCESS) {
Log4Cpp::logError("Failed to create libcouchbase instance %s", lcb_strerror(NULL, err));
return false;
}
// Set a callback for error handling, this will just trace Couchbase errors.
/* Set up the handler to catch all errors! */
(void)lcb_set_error_callback(m_couchBaseInstance, Cache::error_callback);
(void)lcb_set_get_callback(m_couchBaseInstance, Cache::get_callback);
// Connect to the server
if (lcb_connect(m_couchBaseInstance) != LCB_SUCCESS) {
Log4Cpp::logError("Failed to connect libcouchbase instance to server");
return false;
}
// Wait for the connect to complete
lcb_wait(m_couchBaseInstance);
// [...]
return true;
}If I run this code from any other system works and when I try to any Windows 2003 server I have that error. Firewall is disabled, and for Couchbase server I have more instances for tests with only one node each, on different systems (Windows, Linux).
Thanks in advance for help.
Best regards,
Mihai Ciurea
Hello
Windows Server 2003 is not a supported platform. Is it possible to move to a newer release?
You can find the supported platform here :
http://www.couchbase.com/docs/couchbase-manual-2.0/couchbase-getting-sta...
Regards
Tug
@tgrall