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
Related
I have a 3 node innodb cluster setup. On each server I also have a mysql router. I bootstrapped 1 of the routers. Started all 3 routers using the same conf that was created during the bootstrap. I am seeing the following warning in the mysql router logs.
2111: decoding connection attributes failed [ignored]: (input too short)
My first thought was that I should have bootstrapped each mysql router and created their own config. Not sure if that is right way to do it? Also, has anyone else seen this warning before? Is it harmless or should I be worried?
running mysql server 8.0.29 and mysql router 8.0.29
UPDATE I was able to isolate the connection. The problem connection is coming from Grafana. I reviewed the connection string there, but everything looks correct.
TIA
I had similar problem, and I figured out that in version 8.0.23 there was added router<->client TLS endpoint support and also changed client_ssl_mode default behaviour.
The default behavior changed from client_ssl_mode = PASSTHROUGH to
client_ssl_mode = PREFERRED where PASSTHROUGH forwards everything to
the server and lets the client and server decide TLS settings, whereas
PREFERRED establishes TLS connections between the client and Router if
the client desires switching to TLS if the server supports TLS. This
also matches the existing behavior for client and server without the
Router in-between.
https://dev.mysql.com/doc/relnotes/mysql-router/en/news-8-0-23.html
Bootstrap process now adds these options to config file:
client_ssl_cert
client_ssl_key
client_ssl_mode
example: https://dev.mysql.com/doc/mysql-router/8.0/en/mysql-router-configuration-file-example.html
commenting them out should hotfix your problem.
Please review available configuration options and decide which TLS configuration suits best for your case.
https://dev.mysql.com/doc/mysql-router/8.0/en/mysql-router-configuration-tls.html
MarkLogic setup is as follows
3 hosts
Data confniguration
- 1 master forest on each host
- 1 replica for each host on different host
We have MarkLogic cluster (3 hosts) with failover) deployed on Azure VMs
We are using MarkLogic ContentPump (MLCP) to ingest data into MarkLogic
This is what we have implemented
Installed Java on 1st host
Copied MLCP tool
Ingested data by providing 1st server as host parameter
Now we got batch of xmls to update back to MarkLogic
With failover implementation, due to some reason 1st host is not available, so when i tried to ingest data thru 2nd host, i started getting error that record was ingested in different host, so update can't happen from here.
So i would like to know the best practices to be followed for ingestion process
To enable the system to reliably failover, you will also need to setup replicas for the Security, App Services & any other system database you may be using as part of your architecture.
The reason you are unable to connect to the other hosts is that the Security database is on host 1, so you are unable to authenticate. Once that is configured for failover, you should no longer run into those issues.
The documentation covers that setup here:
https://docs.marklogic.com/guide/cluster/config-both-failover#id_57935
I have a clustered MySQL system as a backend and one server configured with HAProxy; so I can access the database using my HAProxy server IP address.
This is working correctly, but now I want to test the load balancing.
I want to compare the load balancing for one database backend, up to three database backends.
I have to use Apache Jmeter to test the capability of the HAProxy load balancer.
How to do it? I've tried using HTTP POST but it results in the same error request rate for any number of database backends.
I suppose that you have HAProxy properly configured So you can see
in HAProxy stats something like this:
Do not use http mode in HAProxy config, use tcp mode instead.
Download JDBC driver for MySQL
Install JDBC driver = copy *.jar file to Jmeters ./lib folder
Configure JDBC Connection Configuration in your Test Plan like this
Don't forget to use your own credentials, etc.
Use JDBC Request to get data from DB
You can find example test plan here
I read Couchbase Rebalancing document (http://blog.couchbase.com/rebalancing-couchbase-part-i) and it wrote : "A client losing its connection to the cluster will attempt to reestablish (configurable). Anytime it reconnects (first time or not) it gets the latest map that the cluster has. Ironically, a flaky network in theory might just help here to keep the map constantly updated during a rebalance, but that's for a different discussion."
I use Spymemcached 2.7.3 and how can i achieve that.
I give an example: My Java client add two server (10.0.0.40 and 10.0.0.15, use URL) to connect to Couchbase cluster. But in reality, when 10.0.0.40 down, the persistent connection did not keep. I have to restart my client to switch to 10.0.0.15. How can my client can re-connect to 10.0.0.15 when 10.0.0.40 down without restart my application.
Updated:
I use below code to connect to Couchbase cluster:
ArrayList<URI> listAddr = new ArrayList<>();
listAddr.add(new URI("http://10.0.0.40:8091/pools"));
listAddr.add(new URI("http://10.0.0.15:8091/pools"));
listAddr.add(new URI("http://10.0.0.16:8091/pools"));
client = new MemcachedClient(new BinaryConnectionFactory(), listAddr, "test", "test", "");
I want to my java client auto reconnect to another server in pool (40,15,16) to get topology (when my java client's still running) if the first server in pool (40) failed.
Can i achieve this purpose with spymemcahce or i have to move to Couchbase Java SDK.
spymemcached java client dos not handle membase fail over for particular node.
You can check here .
If you update your java client to couchbase java client, then you can handle fail over by removing failed node from cluster.
for more information you can check here or here
I am trying to make the connection to a remote mysql database in CloverETL Designer (Community Version)
Documentation with examples on this subject seem fragmented so I have tried to piece the bits together but I'm not use if they are correct. I would be grateful for any suggestions or further clarification on this subject.
Here is what I have so far:
The SSL Certificate
As an alternative VPN connection the server guys passed me the raw CA certificate, which I saved as a .crt file in the conn folder of the CloverETL workspace.
CloverETL Connections
I created a new DB connection and tested it was working without SSL
In the graph window I created a simple graph
Switching to Source View I added the parameter attribute to the connection code like this:
<Connection database="MYSQL" dbURL="jdbc:mysql://hostname/database_name" id="JDBC0" jdbcSpecific="MYSQL" name="CPM" parameters="ssl=${WORKSPACE}/conn/mysql_cpm_cert.crt" password="password" type="JDBC" user="username"/>
Then I tested the connection to the database by creating new metadata from a DB table
The problem is that I don't know if the connect is now secure or not.
Here's the list of resources that I used to piece together the information:
components:bulkloaders:mysql_data_writer [CloverETL wiki]
MySQL :: MySQL 5.0 Reference Manual :: 6.3.6.3 SSL Command Options
Thanks
CPM
Your setup almost certainly does not use ssl. Both links you posted are not usable - first describes bulk loader and second connection via command line client. But what you need is to configure JDBC. So I would use http://dev.mysql.com/doc/refman/5.0/en/connector-j-reference-configuration-properties.html section "Security."
I would set:
useSSL=true
requireSSL=true
You will do that by adding items in table (Custom JDBC properties) on second tab (Advanced) of Connection Wizard. In source it should appear like "jdbc.useSSL=true jdbc.requireSSL=true" not "parameters=".
Then connection should fail, because in your default java key store is missing your certificate. It can be imported via http://docs.oracle.com/javase/1.4.2/docs/tooldocs/windows/keytool.html section "Importing Certificates"
I hope this helps.