Failed to open Bucket with transport-couchbase plugin , Elasticsearch with Couchbase - couchbase

I am using Couchbase 4.0 Beta and when I try to make a XDCR replication over elastic search server then its constantly giving me
< timestamp> : Failed to get bucket user
I have followed all the steps that are given,
Please help me out.!!
2015-08-17 11:48:24 Failed to get bucket user-account
2015-08-17 11:48:14 Failed to get bucket user-account
2015-08-17 11:48:04 Failed to get bucket user-account
2015-08-17 11:47:54 Failed to get bucket user-account
2015-08-17 11:47:44 Failed to get bucket user-account
2015-08-17 11:47:34 Failed to get bucket user-account
2015-08-17 11:47:24 Failed to get bucket user-account
2015-08-17 11:47:14 Failed to get bucket user-account
2015-08-17 11:47:04 Failed to get bucket user-account
2015-08-17 11:46:54 Failed to get bucket user-account
I have added
transport.couchbase: TRACE
com.couchbase: TRACE
in the logging.yml as suggested on some links.
And the log that I get on the Elastic search is
[2015-08-17 11:50:22,323][TRACE][com.couchbase.capi.servlet.BucketMapServlet] asked for bucket list
[2015-08-17 11:50:22,323][DEBUG][transport.couchbase.capi ] [Nomad] found bucket UUID in cache
[2015-08-17 11:50:22,323][DEBUG][transport.couchbase.capi ] [Nomad] found bucket UUID in cache
[2015-08-17 11:50:22,323][DEBUG][transport.couchbase.capi ] [Nomad] found bucket UUID in cache
[2015-08-17 11:50:24,129][TRACE][com.couchbase.capi.servlet.ClusterMapServlet] asked for pools
[2015-08-17 11:50:24,129][TRACE][com.couchbase.capi.servlet.ClusterMapServlet] asked for pool default
[2015-08-17 11:50:24,130][TRACE][com.couchbase.capi.servlet.BucketMapServlet] asked for bucket list
[2015-08-17 11:50:24,130][DEBUG][transport.couchbase.capi ] [Nomad] found bucket UUID in cache
[2015-08-17 11:50:24,130][DEBUG][transport.couchbase.capi ] [Nomad] found bucket UUID in cache
[2015-08-17 11:50:24,130][DEBUG][transport.couchbase.capi ] [Nomad] found bucket UUID in cache
[2015-08-17 11:50:24,135][TRACE][com.couchbase.capi.servlet.BucketMapServlet] asked for bucket list
[2015-08-17 11:50:24,135][DEBUG][transport.couchbase.capi ] [Nomad] found bucket UUID in cache
[2015-08-17 11:50:24,135][DEBUG][transport.couchbase.capi ] [Nomad] found bucket UUID in cache
[2015-08-17 11:50:24,135][DEBUG][transport.couchbase.capi ] [Nomad] found bucket UUID in cache
[2015-08-17 11:50:27,276][TRACE][com.couchbase.capi.servlet.ClusterMapServlet] asked for pools
[2015-08-17 11:50:27,277][TRACE][com.couchbase.capi.servlet.ClusterMapServlet] asked for pool default
[2015-08-17 11:50:27,278][TRACE][com.couchbase.capi.servlet.BucketMapServlet] asked for bucket list
[2015-08-17 11:50:27,278][DEBUG][transport.couchbase.capi ] [Nomad] found bucket UUID in cache
[2015-08-17 11:50:27,278][DEBUG][transport.couchbase.capi ] [Nomad] found bucket UUID in cache
[2015-08-17 11:50:27,278][DEBUG][transport.couchbase.capi ] [Nomad] found bucket UUID in cache
[2015-08-17 11:50:32,247][TRACE][com.couchbase.capi.servlet.ClusterMapServlet] asked for pools
[2015-08-17 11:50:32,247][TRACE][com.couchbase.capi.servlet.ClusterMapServlet] asked for pool default
[2015-08-17 11:50:32,247][TRACE][com.couchbase.capi.servlet.BucketMapServlet] asked for bucket list
[2015-08-17 11:50:32,248][DEBUG][transport.couchbase.capi ] [Nomad] found bucket UUID in cache
[2015-08-17 11:50:32,248][DEBUG][transport.couchbase.capi ] [Nomad] found bucket UUID in cache
[2015-08-17 11:50:32,248][DEBUG][transport.couchbase.capi ] [Nomad] found bucket UUID in cache
[2015-08-17 11:50:34,134][TRACE][com.couchbase.capi.servlet.ClusterMapServlet] asked for pools
[2015-08-17 11:50:34,135][TRACE][com.couchbase.capi.servlet.ClusterMapServlet] asked for pool default
[2015-08-17 11:50:34,135][TRACE][com.couchbase.capi.servlet.BucketMapServlet] asked for bucket list
[2015-08-17 11:50:34,135][DEBUG][transport.couchbase.capi ] [Nomad] found bucket UUID in cache
[2015-08-17 11:50:34,135][DEBUG][transport.couchbase.capi ] [Nomad] found bucket UUID in cache
[2015-08-17 11:50:34,135][DEBUG][transport.couchbase.capi ] [Nomad] found bucket UUID in cache
[2015-08-17 11:50:34,141][TRACE][com.couchbase.capi.servlet.BucketMapServlet] asked for bucket list
[2015-08-17 11:50:34,141][DEBUG][transport.couchbase.capi ] [Nomad] found bucket UUID in cache
[2015-08-17 11:50:34,141][DEBUG][transport.couchbase.capi ] [Nomad] found bucket UUID in cache
[2015-08-17 11:50:34,141][DEBUG][transport.couchbase.capi ] [Nomad] found bucket UUID in cache
[2015-08-17 11:50:37,241][TRACE][com.couchbase.capi.servlet.ClusterMapServlet] asked for pools
[2015-08-17 11:50:37,242][TRACE][com.couchbase.capi.servlet.ClusterMapServlet] asked for pool default
[2015-08-17 11:50:37,242][TRACE][com.couchbase.capi.servlet.BucketMapServlet] asked for bucket list
[2015-08-17 11:50:37,242][DEBUG][transport.couchbase.capi ] [Nomad] found bucket UUID in cache
[2015-08-17 11:50:37,243][DEBUG][transport.couchbase.capi ] [Nomad] found bucket UUID in cache
[2015-08-17 11:50:37,243][DEBUG][transport.couchbase.capi ] [Nomad] found bucket UUID in cache
[2015-08-17 11:50:42,261][TRACE][com.couchbase.capi.servlet.ClusterMapServlet] asked for pools
[2015-08-17 11:50:42,262][TRACE][com.couchbase.capi.servlet.ClusterMapServlet] asked for pool default
[2015-08-17 11:50:42,262][TRACE][com.couchbase.capi.servlet.BucketMapServlet] asked for bucket list
[2015-08-17 11:50:42,262][DEBUG][transport.couchbase.capi ] [Nomad] found bucket UUID in cache
[2015-08-17 11:50:42,262][DEBUG][transport.couchbase.capi ] [Nomad] found bucket UUID in cache
[2015-08-17 11:50:42,263][DEBUG][transport.couchbase.capi ] [Nomad] found bucket UUID in cache
[2015-08-17 11:50:44,140][TRACE][com.couchbase.capi.servlet.ClusterMapServlet] asked for pools
[2015-08-17 11:50:44,145][TRACE][com.couchbase.capi.servlet.ClusterMapServlet] asked for pool default
[2015-08-17 11:50:44,146][TRACE][com.couchbase.capi.servlet.BucketMapServlet] asked for bucket list
[2015-08-17 11:50:44,146][DEBUG][transport.couchbase.capi ] [Nomad] found bucket UUID in cache
[2015-08-17 11:50:44,146][DEBUG][transport.couchbase.capi ] [Nomad] found bucket UUID in cache
[2015-08-17 11:50:44,146][DEBUG][transport.couchbase.capi ] [Nomad] found bucket UUID in cache
[2015-08-17 11:50:44,151][TRACE][com.couchbase.capi.servlet.BucketMapServlet] asked for bucket list
[2015-08-17 11:50:44,151][DEBUG][transport.couchbase.capi ] [Nomad] found bucket UUID in cache
[2015-08-17 11:50:44,151][DEBUG][transport.couchbase.capi ] [Nomad] found bucket UUID in cache
[2015-08-17 11:50:44,151][DEBUG][transport.couchbase.capi ] [Nomad] found bucket UUID in cache
[2015-08-17 11:50:47,247][TRACE][com.couchbase.capi.servlet.ClusterMapServlet] asked for pools
[2015-08-17 11:50:47,247][TRACE][com.couchbase.capi.servlet.ClusterMapServlet] asked for pool default
[2015-08-17 11:50:47,247][TRACE][com.couchbase.capi.servlet.BucketMapServlet] asked for bucket list
[2015-08-17 11:50:47,248][DEBUG][transport.couchbase.capi ] [Nomad] found bucket UUID in cache
[2015-08-17 11:50:47,248][DEBUG][transport.couchbase.capi ] [Nomad] found bucket UUID in cache
[2015-08-17 11:50:47,248][DEBUG][transport.couchbase.capi ] [Nomad] found bucket UUID in cache
^C[2015-08-17 11:50:52,240][INFO ][node ] [Nomad] stopping ...
[2015-08-17 11:50:52,248][TRACE][com.couchbase.capi.servlet.ClusterMapServlet] asked for pools
[2015-08-17 11:50:52,249][TRACE][com.couchbase.capi.servlet.ClusterMapServlet] asked for pool default
[2015-08-17 11:50:52,254][TRACE][com.couchbase.capi.servlet.BucketMapServlet] asked for bucket list
[2015-08-17 11:50:52,254][DEBUG][transport.couchbase.capi ] [Nomad] found bucket UUID in cache
[2015-08-17 11:50:52,254][DEBUG][transport.couchbase.capi ] [Nomad] found bucket UUID in cache
[2015-08-17 11:50:52,255][DEBUG][transport.couchbase.capi ] [Nomad] found bucket UUID in cache
I coud not create a replication, and I want it for implementing the full text search. Please help me out.. Any suggestions are appreciated.

This is a bug in the beta version of Couchbase 4.0. It's already been fixed for the release version. For now, your options are to downgrade to Couchbase 3.0 or wait for the next release of 4.0.

Related

ECONNREFUSED error in NodeJS + MySQL web app

I have web app running on NodeJS + MySQL. Initially the web app works fine,but all of a sudden the MySQL connection gets refused with following error being thrown:
ECONNREFUSED 127.0.0.1:3306
Simply restarting the server with pm2 reload solves the issue temporarily.But again after a long span of time,the above error creeps in.
The configuration in NodeJS for making MySQL connection is as following:
"sqlconn": {
"connectionLimit": 10,
"host": "127.0.0.1",
"user": "root",
"password": "XYZ",
"database": "test",
"port": 3306,
"multipleStatements": true
}
Any idea on how to resolve this issue?
NOTE: I am using a digital ocean droplet with RAM size 512MB
To check what was going wrong,I opened the MySQL log file:
/var/log/mysql/error.log
The logs read something like following:
InnoDB: Initializing buffer pool, total size = 128M, instances = 1, chunk size = 128M
InnoDB: Cannot allocate memory for the buffer pool
InnoDB: Plugin initialization aborted with error Generic error
Plugin 'InnoDB' init function returned error.
Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
[ERROR] Failed to initialize plugins.
So the reason was that Mysql can't restart because it's out of memory.
To resolve the memory issue,this answer can be followed : https://stackoverflow.com/a/32932601/3994271
The possible solutions as discussed in the above link are :
Increasing RAM size , or
configuring a swapfile
I decided to go with configuring a swapfile.
The following link provides details on configuring a swap file:
https://www.digitalocean.com/community/tutorials/how-to-add-swap-on-ubuntu-14-04
You must be not closing the mysql connections while doing the query. If you keep the connections open, it would give up after sometime.
Also there is a bug in node-mysql. You can use mysql pool.enter link description here

Template error when mounting EFS to Elastic Beanstalk EC2 using AWS mount script

I am running into
"Service:AmazonCloudFormation, Message:Template error: every Fn::Join object requires two parameters, (1) a string delimiter and (2) a list of strings to be joined or a function that returns a list of strings (such as Fn::GetAZs) to be joined."
error when trying to deploy tomcat application with
https://github.com/awslabs/elastic-beanstalk-docs/blob/master/configuration-files/aws-provided/instance-configuration/storage-efs-mountfilesystem.config
script to mount the EFS file system to the elastic beanstalk EC2 instance.
I have been trying for a while now to resolve it. Any help is highly appreciated.
The EFS and EC2 are on the same VPC and mounting successfully works when I SSH into the EC2.
Surprisingly I dont see any ERROR logs in the CloudFormation stack either.
I finally figured out the problem. Its a very stupid mistake, in case you run into this problem here's what i was doing
The discreption says "To use this file to mount a file system that you created outside of AWS Elastic Beanstalk, replace the Ref with the resource ID" in below line
FILE_SYSTEM_ID: '{"Ref" : "FileSystem"}' so i inferred it should be
FILE_SYSTEM_ID: '{"<RESOURCE_ID>" : "FileSystem"}' no this is wrong what they actually mean is do this
FILE_SYSTEM_ID: RESOURCE_ID
I know this was stupid error but in case someone's stuck like me. Hopefully you don't do this mistake.

AWS S3 error with MySQL dump importation in Drupal 7

I'm getting this error:
Aws\Common\Exception\InstanceProfileCredentialsException: Error retrieving credentials from the instance profile metadata server. When you are not running inside of Amazon EC2, you must provide your AWS access key ID and secret access key in the "key" and "secret" options when creating a client or provide an instantiated Aws\Common\Credentials\CredentialsInterface object. ([curl] 28: Connection timed out after 5010 milliseconds [url] http://169.254.169.254/latest/meta-data/iam/security-credentials/) in Aws\Common\InstanceMetadata\InstanceMetadataClient->getInstanceProfileCredentials() (line 85 of /var/www/public/sites/all/libraries/awssdk2/Aws/Common/InstanceMetadata/InstanceMetadataClient.php).
In this scenario:
I'm using the AWS S3 module in Drupal 7. One bucket from S3 works for development, and the other one works for staging.
After the client add some content in staging, I try to import the new DB dump from staging to develop and the error appers, maybe is something with the image path in the new dump, the AWS credentials work for development fine, the problem is with the new DB dump.
Con someone help me please?
Looks like your instance is not able to authenticate to S3 bucket specified.
1) Set AWS Credentials in your Environment Path ( Not Recommended ). Instead you shoud assign AWS IAM Role to the Instance to give access to S3 resource.
2) You need to change S3 bucket permission such that it allows the present server to access the bucket.
Iam not sure if this is your real case. Please elaborate your question so that we can give a precise solution.
I'm not allowed to comment. so, had to post an answer.

Infinispan 5.3.0 hotrod client issue with remote cache

I have a simple infinispan cache configuration as follows
Application Server (server 1) --> standalone infinispan cache (server 2) ---> msql DB (server 3)
Where I have created a standalone "local cache" on server 2 using "standalone.xml" and configured mysql table in same file.
My application server is using the hot rod client to communicate with the remote cache on server 2. However while using the client i can put(key1, value) into the cache but I can never retrieve the value associated with the key. If I do a get on key1 null is returned and the cache size is returned as -1. KeySey() returns all the keys however.
Removing the mysql connector config from standalone.xml solves the problem but I need to persist the cache items.
If i use the memcached protocol using spymemcached client instead I do not see this and cache items are written to database. Any ideas ?
Also are there any examples out there of using spymemcached client with infinispan ?
Thanks,
Sven

couchbase bucket select

I want to select a certain bucket in a couchbase telnet session.
F.e. I can get value from the default bucket with this command:
get a1 0
How to select a bucket through couchbase memcached protocol?
If you created a bucket that has a password the you must use a client that supports sasl authentication in order to access the bucket. Couchbase uses plain sasl authentication and the username is the bucket name and the password is the password that you specified for the bucket. If you create a bucket without a password then it is required to be on a different port. For the passwordless type of bucket you just need to specify the port that the bucket is listening on to telnet.