mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-09-19 04:05:36 +00:00
Merge branch 'master' into bug5979
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
INSTALL_FROM_RELEASE=build-202107291820
|
||||
INSTALL_FROM_RELEASE=build-202403210026
|
||||
INSTALL_FROM_SCP_USER_AT_HOST_AND_PORT=sailing@localhost
|
||||
SERVER_NAME=paris2024
|
||||
MONGODB_URI="mongodb://localhost:10201,localhost:10202,localhost:10203/${SERVER_NAME}?replicaSet=paris2024&retryWrites=true&readPreference=nearest"
|
||||
@@ -13,4 +13,9 @@ REPLICATE_MASTER_BEARER_TOKEN="..."
|
||||
REPLICATION_HOST=localhost
|
||||
REPLICATION_PORT=5673
|
||||
USE_ENVIRONMENT=live-master-server
|
||||
ADDITIONAL_JAVA_ARGS="${ADDITIONAL_JAVA_ARGS} -Dcom.sap.sse.debranding=true -Dpolardata.source.url=https://www.sapsailing.com:22443 -Dwindestimation.source.url=https://www.sapsailing.com:22443"
|
||||
ADDITIONAL_JAVA_ARGS="${ADDITIONAL_JAVA_ARGS} -Dcom.sap.sse.debranding=true -Dpolardata.source.url=https://www.sapsailing.com:22443 -Dwindestimation.source.url=https://www.sapsailing.com:22443 -Daws.region=eu-west-1"
|
||||
ADDITIONAL_JAVA_ARGS="$ADDITIONAL_JAVA_ARGS -Dsecurity.sharedAcrossSubdomainsOf=sailing.omegatiming.com -Dsecurity.baseUrlForCrossDomainStorage=https://security-service.sapsailing.com -Dgwt.acceptableCrossDomainStorageRequestOriginRegexp=https?://(.*\.)?sailing\.omegatiming\.com(:[0-9]*)?$"
|
||||
MANAGE2SAIL_ACCESS_TOKEN=...
|
||||
IGTIMI_CLIENT_ID=...
|
||||
IGTIMI_CLIENT_SECRET=...
|
||||
GOOGLE_MAPS_AUTHENTICATION_PARAMS="..."
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
# This is a configuration for an "emergency" local copy of the security-service.sapsailing.com server.
|
||||
# It assumes that a regular back-up of the eu-west-1 "security_service" DB from the "live" replica set
|
||||
# has been copied to the local paris2024 replica set. Outbound replication is to the local RabbitMQ.
|
||||
INSTALL_FROM_RELEASE=build-202107291820
|
||||
# has been copied to the local tokyo2020 replica set. Outbound replication is to the RabbitMQ on sap-p1-2.
|
||||
INSTALL_FROM_RELEASE=build-202403210026
|
||||
INSTALL_FROM_SCP_USER_AT_HOST_AND_PORT=sailing@localhost
|
||||
SERVER_NAME=security_service
|
||||
SERVER_PORT=8889
|
||||
EXPEDITION_PORT=2011
|
||||
TELNET_PORT=14889
|
||||
MONGODB_URI="mongodb://localhost:10201,localhost:10202,localhost:10203/${SERVER_NAME}?replicaSet=paris2024&retryWrites=true&readPreference=nearest"
|
||||
MONGODB_URI="mongodb://localhost/${SERVER_NAME}?replicaSet=security_service&retryWrites=true&readPreference=nearest"
|
||||
# RabbitMQ in eu-west-1 (rabbit.internal.sapsailing.com) is expected to be found through SSH tunnel on localhost:5675
|
||||
# Replication of shared services from central security-service.sapsailing.com through SSH tunnel 443:security-service.sapsailing.com:443
|
||||
# with a local /etc/hosts entry mapping security-service.sapsailing.com to 127.0.0.1
|
||||
|
||||
@@ -1,8 +1,15 @@
|
||||
INSTALL_FROM_RELEASE=build-202107291820
|
||||
# This instance to be "primary" master
|
||||
# We're on sap-p1-2, so this is a fail-over case.
|
||||
# Usually, sap-p1-2 should be running the secondary_master
|
||||
# configuration with local security_service MongoDB
|
||||
# replica set and outbound replication to local RabbitMQ
|
||||
#
|
||||
INSTALL_FROM_RELEASE=build-202403210026
|
||||
INSTALL_FROM_SCP_USER_AT_HOST_AND_PORT="sailing@sap-p1-1"
|
||||
#INSTALL_FROM_SCP_USER_AT_HOST_AND_PORT="sailing@localhost"
|
||||
SERVER_NAME=paris2024
|
||||
MONGODB_URI="mongodb://localhost:10202,localhost:10203/${SERVER_NAME}?replicaSet=paris2024&retryWrites=true&readPreference=nearest"
|
||||
# This is the fail-over master; Use the DB on the local machine that does not replicate into the cloud:
|
||||
MONGODB_URI="mongodb://localhost:10201,localhost:10202,localhost:10203/${SERVER_NAME}?replicaSet=paris2024&retryWrites=true&readPreference=nearest"
|
||||
# RabbitMQ in eu-west-1 (rabbit.internal.sapsailing.com) is expected to be found through SSH tunnel on localhost:5675
|
||||
# Replication of shared services from central security-service.sapsailing.com through SSH tunnel 443:security-service.sapsailing.com:443
|
||||
# with a local /etc/hosts entry mapping security-service.sapsailing.com to 127.0.0.1
|
||||
@@ -15,3 +22,8 @@ REPLICATION_HOST=localhost
|
||||
REPLICATION_PORT=5673
|
||||
USE_ENVIRONMENT=live-master-server
|
||||
ADDITIONAL_JAVA_ARGS="${ADDITIONAL_JAVA_ARGS} -Dcom.sap.sse.debranding=true -Dpolardata.source.url=https://www.sapsailing.com:22443 -Dwindestimation.source.url=https://www.sapsailing.com:22443"
|
||||
ADDITIONAL_JAVA_ARGS="$ADDITIONAL_JAVA_ARGS -Dsecurity.sharedAcrossSubdomainsOf=sailing.omegatiming.com -Dsecurity.baseUrlForCrossDomainStorage=https://security-service.sapsailing.com -Dgwt.acceptableCrossDomainStorageRequestOriginRegexp=https?://(.*\.)?sailing\.omegatiming\.com(:[0-9]*)?$"
|
||||
MANAGE2SAIL_ACCESS_TOKEN=...
|
||||
IGTIMI_CLIENT_ID=...
|
||||
IGTIMI_CLIENT_SECRET=...
|
||||
GOOGLE_MAPS_AUTHENTICATION_PARAMS="..."
|
||||
|
||||
@@ -1,19 +0,0 @@
|
||||
# Regular operations; sap-p1-2 replicates sap-p1-1 using the rabbit-eu-west-3.sapsailing.com RabbitMQ in the cloud through SSH tunnel.
|
||||
# Outbound replication, though not expected to become active, goes to a local RabbitMQ
|
||||
INSTALL_FROM_RELEASE=build-202107291820
|
||||
INSTALL_FROM_SCP_USER_AT_HOST_AND_PORT="sailing@sap-p1-1"
|
||||
#INSTALL_FROM_SCP_USER_AT_HOST_AND_PORT="sailing@localhost"
|
||||
SERVER_NAME=paris2024
|
||||
MONGODB_URI="mongodb://localhost:10201,localhost:10202,localhost:10203/${SERVER_NAME}-replica?replicaSet=paris2024&retryWrites=true&readPreference=nearest"
|
||||
# RabbitMQ in eu-west-3 is expected to be found locally on port 5673
|
||||
REPLICATE_MASTER_SERVLET_HOST=sap-p1-1
|
||||
REPLICATE_MASTER_SERVLET_PORT=8888
|
||||
REPLICATE_MASTER_QUEUE_HOST=localhost
|
||||
REPLICATE_MASTER_QUEUE_PORT=5673
|
||||
REPLICATE_MASTER_BEARER_TOKEN="..."
|
||||
# Outbound replication to RabbitMQ running locally on sap-p1-2
|
||||
REPLICATION_HOST=localhost
|
||||
REPLICATION_PORT=5672
|
||||
REPLICATION_CHANNEL=${SERVER_NAME}-replica
|
||||
USE_ENVIRONMENT=live-replica-server
|
||||
ADDITIONAL_JAVA_ARGS="${ADDITIONAL_JAVA_ARGS} -Dcom.sap.sse.debranding=true"
|
||||
@@ -0,0 +1,23 @@
|
||||
INSTALL_FROM_RELEASE=build-202403210026
|
||||
INSTALL_FROM_SCP_USER_AT_HOST_AND_PORT="sailing@sap-p1-1"
|
||||
#INSTALL_FROM_SCP_USER_AT_HOST_AND_PORT="sailing@localhost"
|
||||
SERVER_NAME=paris2024
|
||||
# This is the fail-over master; Use the DB on the local machine that does not replicate into the cloud:
|
||||
MONGODB_URI="mongodb://localhost/${SERVER_NAME}?replicaSet=security_service&retryWrites=true&readPreference=nearest"
|
||||
# RabbitMQ in eu-west-1 (rabbit.internal.sapsailing.com) is expected to be found through SSH tunnel on localhost:5675
|
||||
# Replication of shared services from central security-service.sapsailing.com through SSH tunnel 443:security-service.sapsailing.com:443
|
||||
# with a local /etc/hosts entry mapping security-service.sapsailing.com to 127.0.0.1
|
||||
REPLICATE_MASTER_QUEUE_HOST=localhost
|
||||
REPLICATE_MASTER_QUEUE_PORT=5675
|
||||
REPLICATE_MASTER_BEARER_TOKEN="..."
|
||||
# Outbound replication to RabbitMQ through SSH tunnel with port forward on port 5673, regularly to RabbitMQ on localhost,
|
||||
# can be re-mapped to RabbitMQ on rabbit-eu-west-3.sapsailing.com in case secondary master must become "primary"
|
||||
REPLICATION_HOST=localhost
|
||||
REPLICATION_PORT=5673
|
||||
USE_ENVIRONMENT=live-master-server
|
||||
ADDITIONAL_JAVA_ARGS="${ADDITIONAL_JAVA_ARGS} -Dcom.sap.sse.debranding=false -Dpolardata.source.url=https://www.sapsailing.com:22443 -Dwindestimation.source.url=https://www.sapsailing.com:22443 -Daws.region=eu-west-1"
|
||||
ADDITIONAL_JAVA_ARGS="$ADDITIONAL_JAVA_ARGS -Dsecurity.sharedAcrossSubdomainsOf=sailing.omegatiming.com -Dsecurity.baseUrlForCrossDomainStorage=https://security-service.sapsailing.com -Dgwt.acceptableCrossDomainStorageRequestOriginRegexp=https?://(.*\.)?sailing\.omegatiming\.com(:[0-9]*)?$"
|
||||
MANAGE2SAIL_ACCESS_TOKEN=...
|
||||
IGTIMI_CLIENT_ID=...
|
||||
IGTIMI_CLIENT_SECRET=...
|
||||
GOOGLE_MAPS_AUTHENTICATION_PARAMS="..."
|
||||
@@ -1,7 +1,7 @@
|
||||
# This is a configuration for an "emergency" local copy of the security-service.sapsailing.com server.
|
||||
# It assumes that a regular back-up of the eu-west-1 "security_service" DB from the "live" replica set
|
||||
# has been copied to the local paris2024 replica set. Outbound replication is to the RabbitMQ on sap-p1-2.
|
||||
INSTALL_FROM_RELEASE=build-202107291820
|
||||
INSTALL_FROM_RELEASE=build-202403210026
|
||||
INSTALL_FROM_SCP_USER_AT_HOST_AND_PORT=sailing@sap-p1-1
|
||||
SERVER_NAME=security_service
|
||||
SERVER_PORT=8889
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
//gwtVersion_/com.google.gwt.user/lib=
|
||||
//gwtVersion_/com.google.gwt.user/lib=2.11.0
|
||||
//gwtVersion_/opt/gwt-2.11.0=2.11.0
|
||||
eclipse.preferences.version=1
|
||||
entryPointModules=
|
||||
|
||||
+2
-2
@@ -5248,10 +5248,10 @@ Replicator {
|
||||
String message = e.getMessage();
|
||||
if (connection instanceof HttpURLConnection) {
|
||||
// try to obtain an error message from the connection's error stream:
|
||||
try (BufferedReader reader = new BufferedReader(
|
||||
try (final BufferedReader bufferedReader = new BufferedReader(
|
||||
new InputStreamReader(((HttpURLConnection) connection).getErrorStream(),
|
||||
HttpUrlConnectionHelper.getCharsetFromConnectionOrDefault(connection, "UTF-8")))) {
|
||||
message = reader.readLine();
|
||||
message = bufferedReader.readLine();
|
||||
} catch (Exception exceptionTryingToReadErrorStream) {
|
||||
// in this case we just stay with the exception's message
|
||||
}
|
||||
|
||||
@@ -142,10 +142,10 @@ public class MongoDBServiceImpl implements MongoDBService {
|
||||
|
||||
@Override
|
||||
public MongoClient getMongo(ConnectionString mongoConnectionString) {
|
||||
try (MongoClient mongo = mongos.computeIfAbsent(mongoConnectionString,
|
||||
k-> MongoClients.create(mongoConnectionString))) {
|
||||
return mongo;
|
||||
}
|
||||
@SuppressWarnings("resource")
|
||||
MongoClient mongo = mongos.computeIfAbsent(mongoConnectionString,
|
||||
k-> MongoClients.create(mongoConnectionString));
|
||||
return mongo;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
+2
-4
@@ -711,12 +711,10 @@ public class ReplicationServiceImpl implements ReplicationService, OperationsToM
|
||||
final URLConnection initialLoadConnection = HttpUrlConnectionHelper
|
||||
.redirectConnectionWithBearerToken(initialLoadURL, /* HTTP request method */ "POST", master.getBearerToken());
|
||||
final InputStream is = (InputStream) initialLoadConnection.getContent();
|
||||
final InputStreamReader queueNameReader = new InputStreamReader(is, HttpUrlConnectionHelper.getCharsetFromConnectionOrDefault(initialLoadConnection, "UTF-8"));
|
||||
final String queueName;
|
||||
try (BufferedReader reader = new BufferedReader(queueNameReader)) {
|
||||
queueName = reader.readLine();
|
||||
try (final BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(is, HttpUrlConnectionHelper.getCharsetFromConnectionOrDefault(initialLoadConnection, "UTF-8")))) {
|
||||
queueName = bufferedReader.readLine();
|
||||
}
|
||||
queueNameReader.close();
|
||||
final Channel channel = master.createChannel();
|
||||
initialLoadChannels.put(master, new InitialLoadRequest(channel, replicables, queueName));
|
||||
final RabbitInputStreamProvider rabbitInputStreamProvider = new RabbitInputStreamProvider(channel, queueName);
|
||||
|
||||
Reference in New Issue
Block a user