Running Multiple Couchbase instances conflict ports? - couchbase

have a problem when consider about more Couchbase(CB) instances running in same PC. It is because, The screen which allows to add another server provides options to add the second server IP, and no any ports. This might be because each CB communicate through the same port. How ever without mentioning the connecting port, how to add another server which is running on same PC? (the already running server ip is 127.0.0.1, then what to mention in the second servers IP ?)![enter image description here][1]

The best solution for running this would be to use virtual machines to run the CB instances. Use 1 VM per node/instance (which can be quickly provisioned using vagrant). This (particularly the vagrant solution) allows multiple nodes/instances to communicate between each other on correct ports (as each node is given a unique IP (from the reserved private addresses), and is well tested in terms of resource usage/performance.
More information along with prebuilt vagrant configurations can be found on GitHub and at this blog (one of Couchbase's engineers).

Related

How to connect to remote mysql from my google app engine standard project?

Currently I am using the native Cloud SQL instance that is getting billed against the same project. However to cut some cost, I intend to shift the databases to my other mysql sitting at my other hosting. But I need to put a static IP on the allowed hosts in order to make it work. I added the 4 hosts that they make you add as A records to point the domain. But it didn't work. I read about Sockets API.. but didn't really get it. It's confusing. How to make it work? putting those 4 IP in makes it workable once or twice randomly when once of those provided IP is active I guess but whenever some other IP from the pool gets active, it doesn't work!
Have you looked at Serverless VPC Access with VPC Access Connector as described here?
You should be able to use the VPC Access Connector Source IP CIDR range at your MySql end as allowed IP list.
However you must ensure the connection is secure with a VPN or interconnect.

How to connect mysql-client to my spring boot app

I have jar file of springboot and I'm running on compute engineVM
And I also connect SQL-client but what address of mysql should I give in spring boot
I assume you are using GCP's hosted mysql? (Cloud SQL).
If so, then if you are connecting to it via cloud sql proxy, which is running on the same machine, then you just use localhost. The proxy should know the way to the server from there, assuming that you've configured the instance name and project/etc. correctly.
Otherwise, without the proxy, you can use your SQL instance's public IP address, which you can see on the list of running instances when you select the SQL page.
In the second case (using the actual IP address) keep in mind that GCP probably wont let the VM running your application through the firewall to the SQl instance directly. To work around this, you'd have to list your VM's IP address in the Authorized Networks section of the SQL entry (click on your SQL instance in the list and select the Authorization tab). Again, in this case, you need to keep in mind that your VM's IP address is ephemeral by default (unless you made and effort to make it permanent). So if you restart your VM, the above Authorization will no longer make sense. So make sure you make your VM's IP address permanent.

Accessing MySQL running on Docker Swarm

I have what is going to be a production MySQL database, and we want to access such remotely but haven't found a secure way to do it.
Docker Swarm do not have support for host bound ports such as 127.0.0.1:3303:3303, however normal mode does. Making a port public becomes also public in all swarm nodes.
Using firewalls is not really an option since we would have to configure these on every single node in the swarm.
We have on table only two options
Opening the port and only allowing connections through TLS and enforcing REQUIRE options Issuer and Subject, to only one single user and probably read_only. Still seems to be highly insecure due to having the open port.
Creating a temporary dockerized sshd service and making it available in the same network as MySQL service, it is more hazzle to manage these ssh containers. Still more secure since it would be turn on/off when needed
Question: Is there any other/better options to approach this? and how badly insecure is it to have open port + tls connections?
If you have a good argument against accessing MySQL remotely I would appreciate it

ArangoDB - Asymmetrical clustering doesn't work

i've installed an arangodb instance on a virtual machine of Google Cloud (tcp://10.240.0.2). I would setup an asymmetrical cluster with another vm where i've installed arangodb (tcp://10.240.0.3).
I follow the official guide to config the production scenario: 1 coordinator and 1 DBServer on the same machine
I tried also a second configuration to cluster with two vm instances, but it doesn't work, showing this error in the GoogleChromeConsole :
{"error":true,"code":500,"errorNum":500,
"errorMessage":"Cannot check port on dispatcher tcp://10.240.0.3:8529"}
Here you can find the configurations that I have tried
What could be the error?
PS: I've open in the firewall the ports: 8529,8530,8629
Thanks in advance.
Daniele
Have you installed ArangoDB on both virtual machines and changed the configuration (on both) to set
[cluster]
disable-dispatcher-kickstarter = false
disable-dispatcher-frontend = false
and then restarted the database servers? I assume so, since you get "Connection OK" for both servers. Your browser would then talk to the first dispatcher, which in turn will contact the second one. The error message you get suggests that this latter step does not work, since checking ports is the first request the first dispatcher would send to the second one.
Is it possible that processes in the first VM cannot access tcp://10.240.0.3:8529 on the second VM? Maybe the respective other subnets are not routed from within the VMs?
Furthermore, when you have got this to work, you will almost certainly also need port 4001 on the first VM, because that is where our etcd (Agency) will listen. In addition, the ports 8530 and 8629 are the defaults which are tried first. If they are not usable for some reason, the dispatchers will use subsequent port numbers instead to assign them to the coordinators and DBservers. In that case you would have to open these as well, at least from the respective other VM.

How do I point Apache at a separate EC2 instance with MySQL?

So...I want to put the Web Server on one EC2 instance and the MySQL database on a separate EC2 instance. Which I can do, but how would I point the web server over to the other instance that I am using for MySQL?
You know Amazon do offer a specialized MySQL instance instead of standard instances, just gives backups, etc.
I'm not sure whether you mean how do you expose MySQL service as a port, or how to identify the database instance.
You can expose MYSQL on a machine port as service and access through telnet or SSH (usually SSH). The default is 3306, I believe.
To get the IP of the database instance, create and assign an elastic IP to the DB instance and use that.
Every instance of EC2 that is spun up has a number of domain names associated with it.
You probably want to use the internal address for communication (saves you money). It looks something like domU-12-31-39-00-86-35.compute-1.internal and is treated like any other hostname.
The issue with using such internal addresses, rather than elastic IP, is that if things reboot, you need to update the internal addresses. Your mileage may vary, but I was part of a project that ran for months and saw no EC2 reboots (other than what the team rebooted themselves).
See http://docs.amazonwebservices.com/AWSEC2/latest/UserGuide/index.html?concepts-instance-addressing.html for more on addressing (look for "Using Instance IP Addresses" -- Amazon doesn't like deep linking, apparently).