We have around 26 services total running in different ports. Sometimes when we run the java -jar discovery-registration.jar read
to make sure the discovery service has the correct capabilities and has the proper deployer/content services, we don't get the values we expect. We then run java -jar discovery-registration.jar forceSync
and java -jar discovery-registration.jar update
. This resolves the issue for this group of services, but then another group of services get 'bumped' and when I run java -jar discovery-registration.jar read
their deployer and content service are now assigned to the previous group.
We have 3 groups of services (legacy, normal, and express) with 3 subgroups each (live, stage, preview), and each subgroup has 1 Discovery, 1 Content, and 1 Deployer-combined service.
.
├── express
│ ├── live
│ │ ├── content
│ │ ├── deployer-combined
│ │ └── discovery
│ ├── preview
│ │ ├── content
│ │ ├── deployer-combined
│ │ └── discovery
│ └── stage
│ ├── content
│ ├── deployer-combined
│ └── discovery
├── legacy
│ ├── live
│ │ ├── content
│ │ ├── deployer-combined
│ │ └── discovery
│ ├── preview
│ │ ├── content
│ │ ├── deployer-combined
│ │ └── discovery
│ └── stage
│ ├── content
│ ├── deployer-combined
│ └── discovery
└── normal
├── live
│ ├── content
│ ├── deployer-combined
│ └── discovery
├── preview
│ ├── content
│ ├── deployer-combined
│ └── discovery
└── stage
├── content
├── deployer-combined
└── discovery
Each group/subgroup has a different port prefix, and all services have the same port suffix. For example: normal-live-discovery - 8082 normal-live-deployer - 8000 normal-live-content - 8081 express-live-discovery - 9082 express-live-deployer - 9000 express-live-content - 9081 And so on.
$ java -jar discovery-registration.jar read
2018-08-09 18:09:53,435 INFO Main - Registration tool is run with following parameters:
2018-08-09 18:09:53,438 INFO Main - Configuration file: cd_storage_conf.xml
2018-08-09 18:09:53,440 INFO Main - The Command is: read
2018-08-09 18:09:53,441 INFO RegistrationTool - Reading configuration from file: 'cd_storage_conf.xml'
2018-08-09 18:09:53,725 INFO ODataClientProvider - Creating OData client
2018-08-09 18:09:54,932 INFO ODataClientProvider - Successfully created OData client
2018-08-09 18:09:54,932 INFO ODataClientProvider - Creating token provider for OAuth enabled OData client
2018-08-09 18:09:54,933 INFO ODataClientProvider - Using TokenServiceUrl http://10.1.1.8:8082/token.svc from configuration file.
2018-08-09 18:09:55,071 INFO ODataClientProvider - Created token provider using TokenServiceUrl from configuration file.
2018-08-09 18:09:55,071 INFO ODataClientProvider - Successfully created token provider for OAuth enabled OData client
2018-08-09 18:09:55,071 INFO ReadCommand - Reading all existing Capabilities from discovery-service...
2018-08-09 18:09:55,559 INFO Main - Result of tool execution is:
[ {
"Capability" : "com.sdl.web.discovery.datalayer.model.ContentServiceCapability",
"id" : "DefaultContentService",
"lastUpdateTime" : 1528313552903,
"uri" : "http://10.1.1.8:7081/content.svc". <--- should be 8081
}, {
"Capability" : "com.sdl.web.discovery.datalayer.model.DeployerCapability",
"id" : "DefaultDeployer",
"lastUpdateTime" : 1528313553001,
"strategy" : "DEFAULT",
"uri" : "http://10.1.1.8:7000/httpupload", <-- should be 8000
"extensionProperties" : [ "java.util.ArrayList", [ {
"key" : "encoding",
"value" : "UTF-8"
}, {
"key" : "undo.enabled",
"value" : "false"
} ] ]
}, {
"Capability" : "com.sdl.web.discovery.datalayer.model.TokenServiceCapability",
"id" : "DefaultTokenService",
"lastUpdateTime" : 1528313519092,
"uri" : "http://10.1.1.8:7082/token.svc". <--- should be 8082
} ]
cd_storage_conf.xml
<Roles>
<Role Name="TokenServiceCapability" Url="http://10.1.1.8:8082/token.svc">
</Role>
<Role Name="WebCapability">
</Role>
<Role Name="DeployerCapability" Url="http://10.1.1.8:8000/httpupload">
</Role>
<Role Name="ContentServiceCapability" Url="http://10.1.1.8:8081/content.svc">
</Role>
</Roles>
</ConfigRepository>