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.
Related
I have enabled the Google Ops Agent on our Couchbase servers, and the logs are collecting fine. The documentation says to ingest metrics you need to specify the endpoint url
https://cloud.google.com/stackdriver/docs/solutions/agents/ops-agent/third-party/couchbase?hl=en_GB&_ga=2.90344287.-478137036.1661114061
"endpoint http://localhost:8091 The URL of the node to monitor."
The config.yaml file is configured as below, but the service doesn't restart. Remove the line for endpoint and it starts ok. I've tried localhost, ip address FQDN without much success.
metrics:
receivers:
couchbase:
type: couchbase
endpoint: http:localhost:8091
username: [username]
password: [password]
collection_interval: 60s
service:
pipelines:
couchbase:
receivers:
- couchbase
Any help would be greatly appreciated!
The correct format is localhost:8091, without the http://. Note that this is the default anyhow and doesn't need to be configured explicitly if you're running on port 8091.
I have created a free instance of Heroku cleardb instance for my app. I set the database URL as:
heroku config:set DATABASE_URL='mysql://user:pass#us-cdbr-iron-east-03.cleardb.net/heroku_database?reconnect=true'
I'm trying to connect using a Go app. But when I try to access my application, it gives the following mysql error:
default addr for network 'us-cdbr-iron-east-03.cleardb.net' unknown
I tried to set the database url with protocol and port as well:
heroku config:set DATABASE_URL='mysql://user:pass#tcp(us-cdbr-iron-east-03.cleardb.net:3306)/heroku__database?reconnect=true'
This changes the errror to:
Access denied for user
which i'm guessing is because direct access to port is disallowed. Does anybody know what is the issue here?
This is a Go specific problem. Three changes are required:
Go's sql.Open already takes scheme as its first parameter so it needs to be stripped off of DATABASE_URL.
Connection string shouldn't have any query parameters (remove ?reconnect=true).
Protocol (tcp) and port (3306 for MySQL) number are required.
Thus final database URL would be:
DATABASE_URL='user:pass#tcp(us-cdbr-iron-east-03.cleardb.net:3306)/your_heroku_database'
I am having trouble connecting to my RDS MySQL Database.
My current Set up:
Django 1.9+
AWS - Launched an EC2 Instance (Amazon Linux). Launched an RDS instance of MySQL (5.6.7). I created a Virtual PC (VPC) for the EC2 instance and RDS instance, and in that group created several security rules so the EC2 instance could connect to the MySQL RDS. Below are the security rules I use and associate with the VPC.
Inbound Rules: (Type, Protocol, Port Range, Source)
1. Http , TCP, 80 , 0.0.0.0/0
2. SSH , TCP, 22 , <homePC address>/32
3. HTTPS, TCP, 443, 0.0.0.0/0
4. MYSQL/Aurora, TCP, 3306, source (my created security group)
Nginx - Serving my content redirecting from port 80 to port 443. I created SSL certificates in order to make my site secure. I correctly served my Django application, and the static files. Nginx serves everything great!
Previously I was able to connect to my RDS instance. I did not set up an elastic IP at that point in time, as it took some time to transfer my domain over to Route53 (amazons DNS). I successfully was able to transfer it, and associate it with my EC2 instance and even start my application
The problems -
First Problem I cannot connect to the RDS from my EC2 instance. I have checked my django settings file and the secret file (the one that feeds my settings file with sensitive information which I keep out of version control). Here are examples of my settings for the mysql connection - I changed them obviously
"DATABASE_NAME":"myDatabase",
"DATABASE_USERNAME": "myUsername",
"DATABASE_PASSWORD": "myPassword123",
I double checked the username and password in the RDS console, and even reset the password.
After I went ahead and activated my virtual environment and attempted to connect.
python manage.py dbshell
My Error was
ERROR 1045 (28000): Access denied for user 'myUsername'#'<private IP address from Elastic IP>' (using password: YES)
Notive the user name is not what I utilized in the settings. It changed. I feel this is the root cause of the problem, but am unsure why Django would change my username in such a manner.
Second Problem - I also try to connect to the database directly using mysql. I double check my endpoint, username and password are correct, but also run into trouble connecting.
Note - As I said, I was able to connect in both manners listed above before acquiring my IP address. Thus my troubles are configuring security rules to allow a permanent IP address, and being unable to use TCP connect to use the Mysql client to log in.
Thanks in advance.
I am using MariaDB on Linux RedHat and running Java App. I am interested in how DB resolves user hostname because I want to use user#localhost instead of user#127.0.0.1.
The name resolution in Linux is done in the resolver library. The main functions are gethostbyname() and gethostbyaddr(). In the /etc/nsswitch.conf file you can change the search order. You can use the following options:
dns
Use the Domain Name System (DNS) service to resolve the address. This mechanism uses the /etc/resolv.conf file.
files
Search in the /etc/hosts and /etc/network files.
nis or nisplus
Use the Network Information System (NIS) to resolve the host or network address.
In oyur case, is almost the same. The relation between 127.0.0.1 and localhost is defined in /etc/hosts
I have created a bucket in my local system and I am trying to connect another node which is located in a remote server. I am able to work with the nodes separately. But I need to join these two nodes to form a cluster. Is there a way to add the remote server node into my local server by using the web UI?
When I tried to add the remote server's IP address by clicking "Add Server", I am getting the following error.
"Attention - Prepare join failed. Authentication failed. Verify username and password. Got HTTP status 401 from REST call post to http://XXX.XXX.XXX.XXX:8091/engageCluster2. Body was: []"
I used my local server's username and password. If I give that server's username and password, I get this error.
Attention - This node cannot add another node ('ns_1#XXX.XXX.XXX.XXX') because of cluster version compatibility mismatch. Cluster works in [4, 1] mode and node only supports [2, 0].
Is there a way to link them using Java API? Can someone please help me with this?