I am running SymmetricDS as a war on my tomee server and I am deploying two services, the master (pos-cc) and the slave (pos-dd). When the slave service starts, the following error appears:
ERROR org.jumpmind.symmetric.service.impl.RegistrationService - Unexpected error during registration: Parameter specified as non-null is null: method okhttp3.OkHttpClient$Builder.sslSocketFactory, parameter sslSocketFactory
java.lang.IllegalArgumentException: Parameter specified as non-null is null: method okhttp3.OkHttpClient$Builder.sslSocketFactory, parameter sslSocketFactory
symmetric-server.properties has these properties:
host.bind.name=0.0.0.0
# Enable synchronization over HTTP.
#
http.enable=true
# Port number for synchronization over HTTP.
#
http.port=31415
# Enable synchronization over HTTPS (HTTP over SSL).
#
https.enable=false
# Enable HTTPS/2 for multiplexing and resistance to protocol attacks.
#
https2.enable=false
# Port number for synchronization over HTTPS (HTTP over SSL).
#
https.port=31417
# Use a trust manager that allows self-signed server SSL certificates.
#
https.allow.self.signed.certs=true
# List host names that are allowed for server SSL certificates.
#
https.verified.server.names=all
# Requires client authentication with SSL certificate
#
https.need.client.auth=false
# Accepts client authentication with SSL certificate
#
https.want.client.auth=false
# Accept cookies if load balancer requires it for clustering
#
server.http.cookies.enabled=false
pos-cc.properties:
# Friendly name to refer to this node from command line
engine.name=pos-cc
# The class name for the JDBC Driver
db.driver=org.hsqldb.jdbcDriver
# The JDBC URL used to connect to the database
db.url=jdbc:hsqldb:hsql://127.0.0.1:9001/pos;shutdown=true
# The database user that SymmetricDS should use.
db.user=SA
# The database password
db.password=
# This node will contact the root node's sync.url to register itself.
# Leave blank to indicate this is the root node.
registration.url=
# Sync URL where other nodes can contact this node to push/pull data or register.
sync.url=http://127.0.0.1:8080/symmetricDsCC/sync/pos-cc
# Node group this node belongs to, which defines what it will sync with who.
# Must match the sym_node_group configuration in database.
group.id=cc
# External ID for this node, which is any unique identifier you want to use.
external.id=000
# How often to run purge job,
job.purge.period.time.ms=7200000
# How to run routing (in millis), which puts changes into batches.
job.routing.period.time.ms=5000
# How often to run push (in millis), which sends changes to other nodes.
job.push.period.time.ms=10000
# How often to run pull (in millis), which receives changes from other nodes.
job.pull.period.time.ms=10000
# Automatically register new nodes when they request it.
# If this is false, accept the registration requests using "symadmin open-registration" command.
auto.registration=true
# When this node sends an initial load of data to another node, first send table create scripts.
initial.load.create.first=true
pos-dd.properties:
# Friendly name to refer to this node from command line
engine.name=pos-dd
# The class name for the JDBC Driver
db.driver=org.hsqldb.jdbcDriver
# The JDBC URL used to connect to the database
db.url=jdbc:hsqldb:hsql://127.0.0.1:9002/pos;shutdown=true
# The database user that SymmetricDS should use.
db.user=SA
# The database password
db.password=
# This node will contact the root node's sync.url to register itself.
registration.url=http://127.0.0.1:8080/symmetricDsCC/sync/pos-cc
sync.url=http://127.0.0.1:8080/symmetricDsDD/sync/pos-dd
# Node group this node belongs to, which defines what it will sync with who.
# Must match the sym_node_group configuration in database.
group.id=dd
# External ID for this node, which is any unique identifier you want to use.
external.id=001
# How to run routing (in millis), which puts changes into batches.
job.routing.period.time.ms=5000
# How often to run push (in millis), which sends changes to other nodes.
job.push.period.time.ms=10000
# How often to run pull (in millis), which receives changes from other nodes.
job.pull.period.time.ms=10000
Does anyone know why this happens?
Can you set this in the engine files or if needed can be set as a system property for the Tomee server. The symmetric-server.properties is for the standalone Jetty deployment.
https2.enable=false
Related
I'm new to Grafana and trying to connect Grafana to Microsoft SQL Server. I run both Grafana and SQL server on the same machine with Windows OS. In Grafana, I selected SQL Server data source and provided Host and DB name. I created a user in SQL server and granted reader permission to the user as per https://grafana.com/docs/grafana/latest/datasources/mssql/. Either for SQL server Authentication or Windows Authentication, I get the error db query error: failed to connect to server - please inspect Grafana server log for details.
I checked then Grafana log file: lvl=eror msg="query error" logger=tsdb.mssql err="Unable to open tcp connection with host 'servername:1433': dial tcp [2a02:908:1391:9e80:c180:xxxx:xxxx:xxxx]:1433: connectex: No connection could be made because the target machine actively refused it."
How can I force SQL server to give access to Grafana?
I should mention that, I haven't changed Grafana conf file. Do I need to change the default conf or create another conf file?
The default DB configuration in Grafana conf file is:
[database]
# You can configure the database connection by specifying type, host, name, user and password
# as separate properties or as on string using the url property.
# Either "mysql", "postgres" or "sqlite3", it's your choice
type = sqlite3
host = 127.0.0.1:3306
name = grafana
user = root
# If the password contains # or ; you have to wrap it with triple quotes. Ex """#password;"""
password =
# Use either URL or the previous fields to configure the database
# Example: mysql://user:secret#host:port/database
url =
# Max idle conn setting default is 2
max_idle_conn = 2
# Max conn setting default is 0 (mean not set)
max_open_conn =
# Connection Max Lifetime default is 14400 (means 14400 seconds or 4 hours)
conn_max_lifetime = 14400
# Set to true to log the sql calls and execution times.
log_queries =
# For "postgres", use either "disable", "require" or "verify-full"
# For "mysql", use either "true", "false", or "skip-verify".
ssl_mode = disable
# Database drivers may support different transaction isolation levels.
# Currently, only "mysql" driver supports isolation levels.
# If the value is empty - driver's default isolation level is applied.
# For "mysql" use "READ-UNCOMMITTED", "READ-COMMITTED", "REPEATABLE-READ" or "SERIALIZABLE".
isolation_level =
ca_cert_path =
client_key_path =
client_cert_path =
server_cert_name =
# For "sqlite3" only, path relative to data_path setting
path = grafana.db
# For "sqlite3" only. cache mode setting used for connecting to the database
cache_mode = private
The settings in Grafana's configuration file refer to its internal database so you do not need to change any of these to connect to MS SQL Server.
Try using "localhost" or "127.0.0.1" as the host name
Make sure authentication is SQL Server Authentication
Make sure Encrypt is false
Check the SQL server logs for any errors
Docker host using IP address of your machine follow below steps:
Open the CMD
IPCONFIG /ALL
Look for the IPV4 address under WiFi or
vEtherner; in my case, it's 192.168.1.24 and 172.45.202.1, respectively
Then try accessing the app hosted in the Docker container with the mapped port (e.g., 1433/5436)
It simply worked using 192.168.1.24:1433 and 172.45.202.1:1433 in the same way to access all container apps hosted using Docker
That is the configuration of the master node
engine.name=master
db.driver=com.mysql.jdbc.Driver
db.url=jdbc:mysql://192.168.1.55:3306/master-db?useSSL=false
db.user=root
db.password=password
registration.url=
sync.url=http://192.168.1.55:31415/sync/master-db
group.id=master
external.id=0
# Don't muddy the waters with purge logging
job.purge.period.time.ms=7200000
# This is how often the routing job will be run in milliseconds
job.routing.period.time.ms=5000
# This is how often the push job will be run.
job.push.period.time.ms=5000
# This is how often the pull job will be run.
job.pull.period.time.ms=5000
# Kick off initial load
initial.load.create.first=true
That is the configuration of the child node
engine.name=italian-restaurant
db.driver=com.mysql.jdbc.Driver
db.url=jdbc:mysql://192.168.1.5:3306/italian_restaurant_db?useSSL=false
db.user=root
db.password=password
registration.url=
sync.url=http://192.168.1.55:31415/sync/child-db
group.id=restaurants
external.id=1
# Don't muddy the waters with purge logging
job.purge.period.time.ms=7200000
# This is how often the routing job will be run in milliseconds
job.routing.period.time.ms=5000
# This is how often the push job will be run.
job.push.period.time.ms=5000
# This is how often the pull job will be run.
job.pull.period.time.ms=5000
# Kick off initial load
initial.load.create.first=true
And all this works fine, but if in the master properties change the host IP of the master DB to another IP (Because I have the database in the cloud) the connection to master DB in the cloud works fine because all symmetricds tables are created and the default configuration is loaded but the registration of nodes, not works.
Throw warn alert Registration was no open
This only happens if the master database is not in the same host where symmetricds runs
Thanks, I hope for your answers
There is no requirement for SymmetricDS to be on the same host as the database. I would have expected your scenario to work exactly the same as with the local database.
In the master.properties did you only change the ip address in the db.url?
On a side note, it is usually a good idea to have your SymmetricDS instance on the same network with good bandwidth to your database for optimal performance (as JDBC can be chatty).
I have a mongoDB database running in one server. This is its configuration file:
# mongod.conf
# for documentation of all options, see:
# http://docs.mongodb.org/manual/reference/configuration-options/
# Where and how to store data.
storage:
dbPath: /var/lib/mongodb
journal:
enabled: true
# engine:
# mmapv1:
# wiredTiger:
# where to write logging data.
systemLog:
destination: file
logAppend: true
path: /var/log/mongodb/mongod.log
# network interfaces
net:
port: 27017
bindIp: 0.0.0.0
ssl:
mode: requireSSL
PEMKeyFile: /etc/ssl/mongo.pem
#processManagement:
#security:
security:
authorization: enabled
#operationProfiling:
#replication:
#sharding:
## Enterprise-Only Options:
#auditLog:
#snmp:
setParameter:
failIndexKeyTooLong: false
I have created a service to launch the mongoDB each time the server starts or each time the database is down.
This configuration is working so far.
Now I have cloned this server into another one. The configuration is identical except for the server IP and the server domain.
This new server is working too but I would like to connect both databases so the new database is synchronized with the first one as with a master-slave configuration.
I think this is the typical case of a Mongo DB Replication Set with 2 databases. But I’m not very expert with databases and after reading lots of documents I don’t understand very much how to do it.
For example, it seems that all options require to turn off master database before making the synchronization, but in my case the master database is in a production environment so I would like to avoid this. Is there any option to configure the replication set without having to restart the master mongoDB instance?
I’ve checked the reference of the replication options in the connfiguration file too but I don’t know how to use them.
In conclusion, is there any tutorial about how to create a replication set with 2 mongodb databases and if it’s possible without having to restart the master (in production environment) database?
I've failed to set up postgreSQL to work with my Ruby-on-Rails project for the past week. I've tried to uninstall and reinstall, postgreSQL, twice now.But when I try to launch postgreSQL I keep getting the error below:
could not connect to server: Connection refused (0x0000274D/10061)
Is the server running on host "localhost" (::1) and
accepting TCP/IP connections on port 5432?
could not connect to server: Connection refused (0x0000274D/10061)
Is the server running on host "localhost" (127.0.0.1) and
accepting TCP/IP connections on port 5432?"
I've looked at many online resources, including stackoverflow and none seem helpful.The key parts of my pg_hba.conf file looks like this:
# TYPE DATABASE USER ADDRESS METHOD
# IPv4 local connections:
host all all 127.0.0.1/32 md5
# IPv6 local connections:
host all all ::1/128 md5
# Allow replication connections from localhost, by a user with the
# replication privilege.
#host replication postgres 127.0.0.1/32 md5
#host replication postgres ::1/128 md5
And the key part of my postgresql.conf file is as follows:
listen_addresses = '*' # what IP address(es) to listen on;
# comma-separated list of addresses;
# defaults to 'localhost'; use '*' for all
# (change requires restart)
port = 5432 # (change requires restart)
max_connections = 100 # (change requires restart)
#superuser_reserved_connections = 3 # (change requires restart)
#unix_socket_directories = '' # comma-separated list of directories
# (change requires restart)
#unix_socket_group = '' # (change requires restart)
#unix_socket_permissions = 0777 # begin with 0 to use octal notation
Most of the suggestions, I've seen so far, were based on those two files. (For my case, they were already configured correctly). I also tried disabling the firewall and restarting postgreSQL but it didn't help. Does anyone have any suggestions for me? Thanks!
Got the same issue while settings up PostgreSQL 9.6.16 to work with Python/Django, but this is purely a database issue.
The solution lies in the error: In fact, I found this error mentioned within the official PostgreSQL documentation thus it's a common error.
And here is how I resolved this issue:
Always first start the postgres database server, use postgres or the wrapper program pg_ctl.I used the command, below, on windows 10.Remember, whatever comes after -D should be the path to where you installed PostgreSQL, to the data folder, which holds the pg_hba.conf and postgresql.conf files.
> pg_ctl start -D "C:/Program Files/PostgreSQL/9.6/data"
If that runs well, you are ready to access the database server.Open another cmd shell, and type the command below.Remember the password you entered while installing PostgreSQL?Enter that password when asked Password for user postgres:
> psql -U postgres
Once done, you can now go ahead to CREATE ROLE and CREATE DATABASE accordingly.
I use Windows 2012 ADCS and I have a cluster of OCSP responders with 2 nodes.
The OCSP cluster share a single revocation configuration.
I have read into documentation that revocation configuration is synchronized between members of an Array but I cannot found in documentation or on Google if entries into the web proxy cache are also synchronized between members.
Is it the case ?
I have performed a test and I have find a way to obtains a different validity status for a certificate in each web proxy cache of both OCSP nodes (OCSP node 1 = "valid", OCSP node 2 = "revoked").
I have also wait around 2 hours to check if any sync occurs and the result was the same after this delay.
Conclusion on my test on Windows 2012 Active Directory Certificate Services OCSP module:
Revocation configuration is shared and synchronized,
Web proxy entries cache is not shared.
Web proxy entries cache is not synchronized.